adyen-examples / adyen-python-online-payments

Accept payments on your Python/Flask based website with cards, wallets, and key local payment methods
MIT License
42 stars 32 forks source link

[BUG] Reference string length causes GrabPay Test Transaction to fail #38

Open shauncAdyen opened 1 year ago

shauncAdyen commented 1 year ago

name: 🐞 Bug about: File a bug/issue title: '[BUG] Reference string length causes GrabPay Test Transaction to fail'


Recommendation

The docs indicates a maximum string length of 80 for reference parameter. When reference length is replaced with a shorter string, GrabPay Drop-in works as expected.

Screenshot 2023-03-21 at 11 06 01 AM

Current Behavior:

Selecting GrabPay Drop-in option on GitPod instance returns a 422 error with message: "reference='Reference 0e852a1a-f187-49e9-9092-221772cbd46c' given is invalid.

Expected Behavior:

Selecting GrabPay Drop-in option on GitPod instance should redirect user to weblogin.grab.com to authenticate user and continue with checkout flow.

Steps To Reproduce:

  1. Create test merchant account on Customer Area
  2. Add GrabPay_SG payment method to test merchant account
  3. Open ./app/main/sessions.py file
  4. Change request['amount'] = {"value": "10000", "currency": "EUR"} to request['amount'] = {"value": "10000", "currency": "SGD"}
  5. Change request['countryCode'] = "NL" to request['countryCode'] = "SG"
  6. Run ./start.sh on GitPod instance
  7. Visit the URL generated by GitPod instance
  8. Click on Drop-in
  9. Select GrabPay as the payment method you want to check out with

Environment:

requirements.txt

Browser

gcatanese commented 1 year ago

@shauncAdyen Thanks for creating the issue. I can replicate the problem (thanks to all the details and info in your issue), I will try now to upgrade the Drop-in to the latest version as the first step. I will keep you posted. Thanks