[Spryng] An example of the «createTransaction» API method response
"card": {
"_id": "58009d04e1b39b6692edee40",
"bin": null,
"brand": null,
"cardholder_name": null,
"customer": null,
"expiry_month": null,
"expiry_year": null,
"issuer_country": null,
"issuer_name": null,
"last_four": null,
"type": null,
"verified": null
}
It is because of the Spryng API and PHP SDK implementation.
The Spryng API does not return the used card details at all in a createTransaction
response.
The card
property is initialized by the Spryng PHP SDK, which sets only the ID property for a card in a response:
https://github.com/spryngpayments/php/blob/e1f0225b9/src/Complexity/SpryngPaymentsApiPhp/Helpers/TransactionHelper.php#L49-L52
So for now we have to make an extra API request to get the card information.
Other payment services returns the used card details the charge response: see a Paymill response as an example.
It reduces the time of a purchase for a buyer.