我们正在整合应用程序中的支付,使用Adyen Web 插入插件,因为我们不符合PCI标准,因此我们正在接收来自插入的加密信息,如下所示:
{
"data": {
"paymentMethod": {
"type": "scheme",
"encryptedCardNumber" : "adyenjs_0_1_25$...",
"encryptedExpiryMonth" : "adyenjs_0_1_25$..."
"encryptedExpiryYear" : "adyenjs_0_1_25$..."
"encryptedSecurityCode" : "adyenjs_0_1_25$..."
}
},
"isValid": true
}我们需要调用card.encrypted.json属性中的/authorize API,它需要在一个属性中加密数据,如下所示:
{
"reference":"YourPaymentReference",
"merchantAccount":"TestMerchant",
"amount":{
"currency":"EUR",
"value":1500
},
"additionalData":{
"authorisationType":"PreAuth",
"card.encrypted.json : "adyenjs_0_1_25$..*"
}
}到目前为止,我们已经尝试在这个领域中传递整个JSON,但是它不起作用,我们从Adyen那里得到了下面的响应。
{
"status": 422,
"errorCode": "174",
"message": "Unable to decrypt data",
"errorType": "validation"
}那么,有谁知道如何将我们的数据转换成card.encrypted.json,呢?我看到还有其他Adyen插件可以使用自定义表单生成这个令牌,但是我们需要使用下拉插件,而不是它生成这个字段。
谢谢。
发布于 2019-10-21 16:35:29
对于插入组件和其他组件,您需要使用/payments API。
您的/authorise示例需要进行最小的更改才能成为/payments请求。您需要将paymentMethod对象直接传递给/payments请求:
{
"reference":"YourPaymentReference",
"merchantAccount":"TestMerchant",
"amount":{
"currency":"EUR",
"value":1500
},
"paymentMethod": {
"type": "scheme",
"encryptedCardNumber" : "adyenjs_0_1_25$...",
"encryptedExpiryMonth" : "adyenjs_0_1_25$..."
"encryptedExpiryYear" : "adyenjs_0_1_25$..."
"encryptedSecurityCode" : "adyenjs_0_1_25$..."
},
"additionalData":{
"authorisationType":"PreAuth",
}
}https://stackoverflow.com/questions/58484569
复制相似问题