Closed powolnymarcel closed 8 years ago
Is it because i kept the default value in :
"paymentRequest.merchantAccount" : "Hic2hMerchant",
'paymentRequest.shopperEmail': 'test@hic2h.com',
'paymentRequest.shopperReference': 'test-hic2h',
?
For this type of error's it is faster to contact Adyen support. They can probably help you figure out what is wrong here, as from my perspective it seems the coding is sound.
I found my error i needed to change the value here :
"paymentRequest.merchantAccount" : "Hic2hMerchant",
TO
"paymentRequest.merchantAccount" : "MY_ACCCOUNT",
but now i get :
Object {err: null, response: Object}
err: null
response: Object
paymentResult.pspReference: "8614570137167924"
paymentResult.refusalReason: "010+Not+allowed"
paymentResult.resultCode: "Refused"
Is the "Hosted Client Side Encryption" from adyen
https://test.adyen.com/hpp/cse/js/76214570238431463.shtml
and the one you provide here not the same ? Will that cause my error ?
I know I'm close of getting it work but there is still a small error I guess and I need help :)
What is the actual JSON structure you are sending to the server? It should be similar to the one's that will show up if you go to the https://www.adyen.com/apidocs/?example=CSE%20Authorisation
This is what I send from client to NodeJS:
OObject {adyen-encrypted-data: "adyenjs_0_1_15$Kuvv07s1E7LeHJedplcSb0yPqSvHXrEnrwZ…gS3YwqEpS3meOv/UwtzPcTVWLYg0qk+M8A1Gz7Z9r24F8eg=="}
adyen-encrypted-data: "adyenjs_0_1_15$Kuvv07s1E7EDFedplcSb0yPqSvHXrEnrwZQlNU3sREPdW+o/5IEUsYd9MQalie3oDQ+mlhIT/khOSPzBRwN7/8TQyVXEzL2JDgTgQizWyk8842aaYkRwq0n5Kxb1ri+DB2Oaz2rxccM6K41PpMXglPEohzQ5yRQiYwnUwUu3C89HaD0MwoEclQMoULi6yJsoOjYGjLxaIhu/MbXXe/WEtUmO5U7HlJ5nK83zH8JKHUU23pUJyS0Rnci4GHlgWZEKnonzMJHys36/5FZf++4sCjryKxPt2snnl5hnU8mgcnF1DA66AGe54+AhvUvoYBojUfrEktY4LoJIWIzlf6cVg==$bI8Xvb4QKA+9Fmsjk/xZG9SJ6G7tIfuoqs5vYI2HKyuzRndH6dRBl5yWUC7e4OiN6xk/Nu9C7ug9q+6yEfK37NuqE0aAWonNsbfVzuenbzP/GVw7HvZjJS2TPI3kYvfVee7fx2S/VzEba2o+NfvO+B0UbZA1rQfZj+zupKMgHhKIZm4kHNtkQcXWXIVUY1m19if2vXb/rgb+JFjRv9SS0I79yb2nkji5W9LmViNclhnozfliSz7DsUNDp1BYwfP4WmJ3o5UFBknPZhqRuCNgS3YwqEpS3meOv/UwtzPcTVWLYg0qk+M8A1Gz7Z9r24F8eg=="
__proto__: Object
This is what I send from NodeJS to the adyen server
{ action: 'Payment.authorise',
'paymentRequest.merchantAccount': 'MyCompanyBE',
'paymentRequest.amount.currency': 'EUR',
'paymentRequest.amount.value': '199',
'paymentRequest.reference': 'TEST-PAYMENT-2016-03-03T15:06:16+01:00',
'paymentRequest.shopperIP': '11.111.111.111',
'paymentRequest.shopperEmail': 'test@hic2h.com',
'paymentRequest.shopperReference': 'test-hic2h',
'paymentRequest.fraudOffset': '0',
'paymentRequest.additionalData.card.encrypted.json': 'adyenjs_0_1_15$Kuvv07s1E7LeHJedplcSb0yPqSvHXrEnrwZQlNU3sREPdW+o/5IEUsYd9MQalie3oDQ+mlhIT/khOSPzBRwN7/8TQyVXEzL2JDgTgQizWyk8842aaYkRwq0n5Kxb1ri+DB2Oaz2rxccM6K41PpMXglPEohzQ5yRQiYwnUwUu3C89HaD0MwoEclQMoULi6yJsoOjYGjLxaIhu/MbXXe/WEtUmO5U7HlJ5nK83zH8JKHUU23pUJyS0Rnci4GHlgWZEKnonzMJHys36/5FZf++4sCjryKxPt2snnl5hnU8mgcnF1DA66AGe54+AhvUvoYBojUfrEktY4LoJIWIzlf6cVg==$bI8Xvb4QKA+9Fmsjk/xZG9SJ6G7tIfuoqs5vYI2dfdendH6dRBl5yWUC7e4OiN6xk/Nu9C7ug9q+6yEfK37NuqE0aAWonNsbfVzuenbzP/GVw7HvZjJS2TPI3kYvfVee7fx2S/VzEba2o+NfvO+B0UbZA1rQfZj+zupKMgHhKIZm4kHNtkQcXWXIVUY1m19if2vXb/rgb+JFjRv9SS0I79yb2nkji5W9LmViNclhnozfliSz7DsUNDp1BYwfP4WmJ3o5UFBknPZhqRuCNgS3YwqEpS3meOv/UwtzPcTVWLYg0qk+M8A1Gz7Z9r24F8eg==' }
What am I doing wrong ?
I keep receiving :
paymentResult.pspReference: "7914530236558147"
paymentResult.refusalReason: "010+Not+allowed"
paymentResult.resultCode: "Refused"
OK found the error, the last step in nodeJS is
adyen.test("ws@Company.XXXXX", "PASSWORD", adyenRequestBody, function(err, response){
res.json({err: err, response: response});
});
I don't know why but on the adyen website under User List i have 2 system's user and I was using the wrong one....
Now if I test a VISA or a Mastercard i get
paymentResult.resultCode: "Refused"
It's good, maybe my error will serve someone one day...
I'm working with angularJS and I get an error response, can you try to help me ?
First The form (an object vm.ayden is created then submitted to my client side controller with vm.adyenSub() ) :
Second My controller handle the data and make a POST to NodeJS, (no unencrypted data travelling to the server )
THIRD I successfully send to nodeJS this payload
then I do :
And i receive this response :
{err: "Unknown server Error"}