В настоящее время я использую PHP простой клиент Api REST REST https://github.com/CyberSource/cybersource-rest-client-php
Обе инструкции разработчика найдены на
Опишите так же, как форматировать данные, полученные через Google Pay. Однако они описывают различные способы форматирования запроса.
1) Set the encryptedPayment_data field to the value of the
encryptedMessage field that was returned in the Full Wallet
response.
2) Set the paymentSolution field to 012.
и
2) In the authorization request under the paymentInformation
object, set the key field under the fluidData object to the
Base64-encoded value obtained from the Google Pay blob.
3) Under the processingInformation object, set the
paymentSolution field to 012.
Я использую, я попробовал способ liquidData , так как не смог найти ссылку на ссылку поля encryptedPayment в Простой API заказа но он не работает.
Запрос
{
"clientReferenceInformation": {
"code": "testcode"
},
"processingInformation": {
"paymentSolution": "012"
},
"paymentInformation": {
"fluidData": {
"key":"<Google Pay Blob>"
}
},
"orderInformation": {
"amountDetails": {
"totalAmount": "100.00",
"currency": "USD"
},
"billTo": {
"firstName": "John",
"lastName": "Doe",
"company": "ABC Company",
"address1": "1 Market St",
"locality": "san francisco",
"administrativeArea": "CA",
"postalCode": "94105",
"country": "US",
"email": "test@cybs.com",
"phoneNumber": "4158880000"
}
}
}
Ответ
[body] => stdClass Object
(
[submitTimeUtc] => 2019-04-10T16:05:39Z
[status] => INVALID_REQUEST
[reason] => MISSING_FIELD
[message] => Declined - The request is missing one or more fields
[details] => Array
(
[0] => stdClass Object
(
[field] => recipientInformation.card.number
[reason] => MISSING_FIELD
)
)
)
[message] => [400] Error connecting to the API (https://apitest.cybersource.com/pts/v2/payments/)