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

Clarify 'authorization' status with Adyen #64

Closed
lojzatran opened this issue May 23, 2019 · 5 comments
Closed

Clarify 'authorization' status with Adyen #64

lojzatran opened this issue May 23, 2019 · 5 comments

Comments

@lojzatran
Copy link
Contributor

lojzatran commented May 23, 2019

When notification module receives a notification with type 'Authorization', it creates a new transaction with type 'Authorization'. In this case, it should update Charge transaction instead as for Adyen, 'authorization' means charge.

Task: clarify the statement above with Adyen and update the modules accordingly.

@zackpollard
Copy link
Contributor

Hey, is there any chance that this can be prioritised and followed up with adyen? It doesn't make sense to have two separate transactions on the payment when the card has only been charged once. Would be preferable if we could just update the charge transaction.

@lojzatran lojzatran added the good first issue Good for newcomers label Sep 13, 2019
@butenkor
Copy link
Contributor

Note: it does not matter if transaction in CTP is of type Charge or Authorization as request to Adyen will alsways look the same. It's back office setting within Adyen which decides if our request will end up as valid reservation or charge right away.

Current process:

Adyen's AUTOCAPTURE is active:

  1. We process CTP Charge transaction and send credit card payment to Adyen
  2. On successful authorisation Adyen will send notification with eventCode AUTHORISATION
  3. Notification module will add new transaction with type Authorization

Adyen's MANUAL CAPTURE is active:

  1. We process CTP Charge transaction and send credit card payment to Adyen
  2. On successful authorisation Adyen will send notification with eventCode AUTHORISATION
  3. Notification module will add new transaction with type Authorization
  4. On successful manual capture Adyen will send notification with eventCode CAPTURE
  5. Notification module will update transaction status of transaction with type Charge

New process:

By default we should expect CTP transaction to be supplied by the user with type Authorization only (right now it is Charge). This change would allow us to process transactions as follows:

Adyen's AUTOCAPTURE or MANUAL CAPTURE is active

  1. We process CTP Authorization transaction and send credit card payment to Adyen
  2. On successful authorisation Adyen will send notification with eventCode AUTHORISATION which will change status of existing Authorization transaction.
  3. On successful manual capture Adyen will send additional notification with eventCode CAPTURE which will result in addition of new transaction of type Charge with the status from notification.

@butenkor
Copy link
Contributor

@zackpollard Would the above new process also meet your expectations?

@lojzatran lojzatran removed the good first issue Good for newcomers label Oct 18, 2019
@zackpollard
Copy link
Contributor

Hey @butenkor

So in the case of auto-capture, we would simply just see the Authorization transaction and never see Charge? This sounds like a much better solution to me and would meet our expectations of the extension and notification modules. Thanks for looking into this.

@butenkor
Copy link
Contributor

butenkor commented Oct 21, 2019

Hi @zackpollard. Yes, you would see both Charge and Authorization only if manual capture was used. It also means that new process would be a breaking change as front end would need to create first transaction of type Authorization and not Charge

ahmetoz added a commit that referenced this issue Dec 10, 2019
…ing to the adyen best practices. (#85)

* add details for checkout steps.

* update Charge to Authorization.

* Update extension/docs/IntegrationGuide.md

Co-Authored-By: andreas Halberkamp <andreas.halberkamp@commercetools.de>

* Update extension/docs/IntegrationGuide.md

Co-Authored-By: andreas Halberkamp <andreas.halberkamp@commercetools.de>

* Link integration guide with Refund/Cancel guide #71

* additional unit test for the manual capture cases

* add additional integration test for manual capture notification

* Split unit and integration test commands (#82)

* bump version to 3.0.0

* Update extension/docs/IntegrationGuide.md

Co-Authored-By: Roman Butenko <roman.butenko@commercetools.de>

* Update extension/docs/IntegrationGuide.md

Co-Authored-By: Roman Butenko <roman.butenko@commercetools.de>

* Update extension/docs/IntegrationGuide.md

Co-Authored-By: Roman Butenko <roman.butenko@commercetools.de>

* Update extension/docs/IntegrationGuide.md

Co-Authored-By: Roman Butenko <roman.butenko@commercetools.de>

* Update notification/test/unit/notification.handler.spec.js

Co-Authored-By: Hasan <LEQADA@users.noreply.github.com>

* add quotes for the adyen events.

* add nyc to integration tests.

* revert changes for test command.

* add explanation for why originalReference should use the AUTHORIZATION notification event.

* make cancel or refund documentation more clear.

* handle the cancel or refund notification correctly on notification module.
@ahmetoz ahmetoz closed this as completed Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants