Last active
February 14, 2017 14:58
-
-
Save thedotedge/3b63ff965c8439d0eba1eb4d2124ec65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# generate encrypted details | |
var date = new Date(); | |
var sepaData = { | |
iban : $(this).find('[name=iban]').val(), | |
ownerName : $(this).find('[name=ownerName]').val(), | |
countryCode : $(this).find('[name=countryCode]').val(), | |
generationtime : date.toISOString() | |
}; | |
var encryptedDetails = cseInstance.encrypt(sepaData); | |
# pass as bankAccount.encrypted.json | |
{ | |
"amount": { | |
"value": 100, | |
"currency": "EUR" | |
}, | |
"reference": "payment-2017-1-14-13-sepa", | |
"merchantAccount": "xxxx", | |
"selectedBrand" : "sepadirectdebit", | |
"additionalData": { | |
"bankAccount.encrypted.json": "adyenjs_0_1_xxxx" | |
} | |
} | |
# error | |
{ | |
"status": 422, | |
"errorCode": "000", | |
"message": "Please supply paymentDetails", | |
"errorType": "validation", | |
"pspReference": "8514870837720365" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment