Skip to content

Instantly share code, notes, and snippets.

@thedotedge
Last active February 14, 2017 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thedotedge/3b63ff965c8439d0eba1eb4d2124ec65 to your computer and use it in GitHub Desktop.
Save thedotedge/3b63ff965c8439d0eba1eb4d2124ec65 to your computer and use it in GitHub Desktop.
# 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