academe / SagePay-Integration

HTTP Messages for the Sage Pay REST (Pi) gateway.
GNU General Public License v3.0
9 stars 5 forks source link

securityCode is optional #31

Closed judgej closed 8 years ago

judgej commented 8 years ago

18-02-2016 BETA Made securityCode optional when tokenising the card details.

When fetching a card token, the security code can be omitted.

judgej commented 8 years ago

This is an interesting one. The card identifier can always be obtained, with or without the CVC. It is when the card identifier is used to initiate the transaction that the requirement for the CVC becomes apparent. It can be turned off using this option:

'ApplyAvsCvcCheck' => \Academe\SagePay\Psr7\Request\Transaction::APPLY_AVS_CVC_CHECK_DISABLE,

otherwise this error is returned when submitting the transaction:

5017: "statusDetail":"The Security Code(CV2) is required."

judgej commented 8 years ago

Now optional when creating a Request\CardIdentifier nessage.

judgej commented 8 years ago

Note: fix only done on PSR-7 branch.