Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adyen capture use authorization service url #164

Closed
aduponchel opened this issue Jun 21, 2019 · 1 comment
Closed

Adyen capture use authorization service url #164

aduponchel opened this issue Jun 21, 2019 · 1 comment

Comments

@aduponchel
Copy link

Environment

  • Adyen Payment 18.3.0
  • SiteGenesis v104.1.3

Setup

We have installed vanilla SiteGenesis and Adyen cartridge by following the documentation available here : https://docs.adyen.com/plugins/salesforce-commerce-cloud/

Issue

When capturing with a previously authorized order using adyenCapture.ds and fix bug referenced here by removing bad code part.

Service use authorise url https://pal-test.adyen.com/pal/servlet/Payment/authorise instead of https://pal-test.adyen.com/pal/servlet/Payment/capture

@ScottPowell14
Copy link
Contributor

I would suggest changing to a JSON request as follows (example for adyenCancel, but can be used for adyenCapture):

At this point in the code:

https://github.com/Adyen/adyen-salesforce-commerce-cloud/blob/develop/cartridges/int_adyen_overlay/cartridge/scripts/adyenCancel.ds#L69

You need to change the formatting of the params, like this:

var params = {};

params["merchantAccount"] = merchantAccount;
params["originalReference"] = pspReference;

And then replace the headers here: https://github.com/Adyen/adyen-salesforce-commerce-cloud/blob/develop/cartridges/int_adyen_overlay/cartridge/scripts/adyenCancel.ds#L81

With this:

service.addHeader('Content-type','application/json');
service.addHeader("charset", "UTF-8");
callResult = service.call(JSON.stringify(params));

And indeed you will need to add in the service here:

If you are able to, please open a PR with your changes.

Thanks,
Scott
Adyen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants