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

Ap 235 upgrade api web components adyen library #155

Conversation

bortefi
Copy link
Contributor

@bortefi bortefi commented Mar 24, 2021

Summary

Notes

  • Restricted fields send to Checkout API v67.
    v67 rejects calls with data fields sent to the API (v52 allowed additional data fields set by e.g. Paypal)
  • Updated prop "token" for 3DS Fingerprint and Challenge web component
  • Updated 3DS web component:
    • Updated for a unified flow with 3DS and web component
    • Updated prop "token" for 3DS Fingerprint and Challenge
    • Added paymentData prop used in 3DS Fingerprint and Challenge
    • Both 3DS Fingerprint and Challange use -useOriginalFlow- use the new flow with clientKey
  • ✔️ Adyen PHP api library has a new version 10 with Checkout API v67, this pull request will be updated to include this update.

Tested scenarios

  • ✔️ gift cards
  • ✔️ Kreditkarte: Mastercard / Visa
  • ✔️ Kreditkarte store payment: store payment details (use Visa or Mastercard with Kreditkarte)
  • ✔️ Kreditkarte payment with a stored payment method (use Visa or Mastercard with Kreditkarte)
  • ✔️ BCMC default
  • ✔️ 3DS2 default
  • ✔️ 3DS - ChallengeShopper
  • ✔️ 3DS - frictionless
  • ✔️ PayPal payment
  • 🚫 Klarna (not working as defined per v67 changelog)

Fixed issue: #61 , #62

$(me.opts.placeOrderSelector).parent().append('<div id="AdyenIdentifyShopperThreeDS2"/>');
me.adyenCheckout
.create('threeDS2DeviceFingerprint', {
fingerprintToken: data.authentication['threeds2.fingerprintToken'],
token: data.authentication['threeds2.fingerprintToken'],
useOriginalFlow: true,
Copy link
Contributor Author

@bortefi bortefi Mar 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@acampos1916
The new flow would require a clientKey, so for upgrade I left the original flow active.
Should we update to the new flow with the ClientKey property for web components?
Web components 4.1.0 require ClientKey.

Similar for threeDS2Challenge

if (!$paymentMethod->getValue('details') && !$paymentMethod->isStoredPayment()) {
$subject->View()->assign('sAdyenSetSession', json_encode($paymentMethod->getRawData()));
Copy link
Contributor Author

@bortefi bortefi Mar 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems this data was always set to incorrect data for Checkout API
(v52 did not mind this, v66 correctly rejects the call).

Updated to contain correct data when it was not handled by Web components.

@bortefi
Copy link
Contributor Author

bortefi commented Mar 25, 2021

@acampos1916
Suzanne informed us that a new php library version 10 including Checkout API v67 support has been released.
It's best to include this upgrade as well, i will use this pull request for that, so do not merge it the develop branch just yet.

@cyattilakiss
Copy link
Contributor

@bortefi
In case using the v67 checkout api you can remove the Controllers/Frontend/Transparent.php and the whole transparent redirect logic since the 3DS1 redirect will always be a GET redirect instead of POST. Also validating the MD and PaRes won't be necessary anymore because only a redirectResult param will be returned in the query.
This change will make the whole 3DS1 handling much easier.
You can find the checkout API release notes here
Let us know if you have any question regarding this.

@bortefi
Copy link
Contributor Author

bortefi commented Mar 25, 2021

@cyattilakiss
That's great news, then we can get rid of some workarounds 👍

@bortefi
Copy link
Contributor Author

bortefi commented Apr 2, 2021

@acampos1916 Upgrade is complete

Pr can be reviewed.

bortefi and others added 3 commits April 12, 2021 14:23
Co-authored-by: Ángel Campos <[email protected]>
Co-authored-by: Ángel Campos <[email protected]>
@acampos1916 acampos1916 linked an issue Apr 19, 2021 that may be closed by this pull request
…P-269-235-validate-both-functionality

# Conflicts:
#	Resources/frontend/js/jquery.adyen-payment-selection.js
@bortefi
Copy link
Contributor Author

bortefi commented Apr 20, 2021

@acampos1916

This pull request is updated and validated with #151 (#158 reverted the changes due to early merge)
#151 changes are re-applied and brought up to date within this pull request.

Re-evaluated payment selection for:

  • ✔️ credit card (full payment method state)
  • ✔️ paypal (minimal payment method state)

@msilvagarcia
Copy link
Contributor

@bortefi thank you for adding the changes I merged earlier :)

@acampos1916 acampos1916 self-requested a review May 27, 2021 10:34
@acampos1916 acampos1916 merged commit cb03b94 into Adyen:develop May 28, 2021
@acampos1916 acampos1916 linked an issue May 28, 2021 that may be closed by this pull request
@acampos1916 acampos1916 mentioned this pull request Jun 8, 2021
@bortefi bortefi deleted the AP-235-upgrade-api-web-components-adyen-library branch June 21, 2021 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants