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

Is there a way to test negative responses ? #491

Open
NadjibBELLOUNDJA opened this issue Apr 16, 2019 · 0 comments
Open

Is there a way to test negative responses ? #491

NadjibBELLOUNDJA opened this issue Apr 16, 2019 · 0 comments

Comments

@NadjibBELLOUNDJA
Copy link

I would like to test how my application interacts with error responses.

With Stripe gateway, it is not an issue since some card numbers will make the stripe API render an error response.

But With Paypal, I don't know how to do it ?
I read the documentation of the Paypal Sandbox API (https://developer.paypal.com/docs/api/test-values/#) and this is what they say :

To trigger the SENDER_EMAIL_UNCONFIRMED simulation response, set the items[0]/note value to ERRPYO002 in the POST v1/payments/payouts call.

curl -X POST https://api.sandbox.paypal.com/v1/payments/payouts \
  -H "content-type: application/json" \
  -H "Authorization: Bearer Access-Token" \
  -d '{
  "sender_batch_header": {
    "sender_batch_id": "1524086406556",
    "email_subject": "This email is related to simulation"
  },
  "items": [
  {
    "recipient_type": "EMAIL",
    "receiver": "[email protected]",
    "note": "ERRPYO002",
    "sender_item_id": "15240864065560",
    "amount": {
      "currency": "USD",
      "value": "1.00"
    }
  }]
}'

How can we test errors with Paypal using Payum Bundle?

Thank you in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant