Describe the bug
When using the quickstart code for cash app, providing sandbox mode + sandbox access token, is yielding the following error:
{"errors": [{"code": "GENERIC_DECLINE","detail": "Authorization error: 'GENERIC_DECLINE'","category": "PAYMENT_METHOD_ERROR"}],"payment": {"id": "__ID__","created_at": "2022-12-18T20:40:08.087Z","updated_at": "2022-12-18T20:40:08.786Z","amount_money": {"amount": 100,"currency": "USD"},"status": "FAILED","delay_duration": "PT168H","source_type": "WALLET","location_id": "__LOCATION_ID__","order_id": "__ORDER_ID__","total_money": {"amount": 100,"currency": "USD"},"approved_money": {"amount": 0,"currency": "USD"},"delay_action": "CANCEL","delayed_until": "2022-12-25T20:40:08.087Z","wallet_details": {"status": "FAILED","brand": "CASH_APP","cash_app_details": {}},"application_details": {"square_product": "ECOMMERCE_API","application_id": "__SANDBOX_APP_ID__"},"version_token": "__TOKEN__"}}
To Reproduce
Steps to reproduce the behavior:
- Clone the repo, go to public/examples/cash-app-pay.html
- Add in sandbox location id + app id
- Add .env.sandbox adding in sandbox access token
- Verify everything is running in sandbox in server/config.js
Expected behavior
Success due to running in sandbox mode.
Screenshots
Desktop (please complete the following information):
- OS: Mac 11.5.2
- Browser Chrome
- Version 108.0.5359.98 (ARM)
Additional context
I can provide my sandbox credentials like my location id and app id if needed to help reproduce the error…