Page MenuHomePhabricator

Step 1: Investigate Adyen drop-in-web
Closed, ResolvedPublic3 Estimated Story Points

Event Timeline

DStrine renamed this task from Investigate Adyen drop-in-web to Sep 1: Investigate Adyen drop-in-web.Jan 5 2021, 9:06 PM
DStrine set the point value for this task to 3.Jan 5 2021, 9:38 PM
DStrine moved this task from Sprint +1 to Current Sprint on the Fundraising-Backlog board.

Dockerized Adyen demo

https://github.com/jackgleeson/adyen-components-js-sample-code

To run:

  • run git clone https://github.com/jackgleeson/adyen-components-js-sample-code and cd into dir.
  • create .env from .env.default (using a ca-test.adyen.com webservice user API details. I created a new web service account which took 30 seconds)
  • run docker build -t adyen-demo .
  • run docker run -it --rm -p 8080:3000 adyen-demo
  • open localhost:8080

Tip: make sure to add your IP to the allow list within the adyen test console otherwise you'll get "invalid origin" errors when loading forms.

Adyen Drop-in (https://docs.adyen.com/online-payments/drop-in-web)
This solution would require consolidating our current two-step payment selection and donor input forms into one step. Although this is technically doable, it would change the current workflow within DonationInterface and likely introduce a new separate single-step process that would be challenging to manage in the same config-driven way as we do today across all gateways. It looks like this solution is intended as a one-gateway-fits-all offering and isn't suited to our existing two-step donor form process.

image.png (750×813 px, 45 KB)

Adyen Web Components (https://docs.adyen.com/online-payments/components-web)
This solution allows us to "cherry-pick" specific payments method components from the Drop-in all-encompassing component. This allows us to maintain the existing two-step donor form workflow in DonationInterface and should be easier to integrate as a result.

Technical highlights:

  • The Adyen web components source code is pulled in via 3rd party Javascript & CSS includes which Adyen recommend we validate using Subresource Integrity (SRI) hashes.
  • Each form input field is its own iframe.
  • Localization support looks good.

image.png (423×815 px, 22 KB)

image.png (345×859 px, 15 KB)

Tasks to Integrate:

Integrate Adyen Web Components into SmashPig (Backend)

Integrate Adyen Web Components into DonationInterface (Frontend)

  • UI: Embed Adyen Web Components (validating with Subresource Integrity (SRI) hashes)
  • UI: Error handling
  • SmashPig API Call: Get Adyen available payment methods (maybe)
  • SmashPig API Call: Submit Adyen payment
  • SmashPig API Call: Submit Adyen additional payment information
jgleeson renamed this task from Sep 1: Investigate Adyen drop-in-web to Step 1: Investigate Adyen drop-in-web.Jan 12 2021, 5:27 PM