PayPal Sandbox negative testing of subscriptions with REST API

给你一囗甜甜゛ 提交于 2019-12-07 06:58:19

问题


I have been working with a team to provide PayPal integration for our application, and our implementation using the REST API to set up subscriptions is going well. I'm having problems, however, trying to test some negative scenarios such as a user having an expired card. I notice that negative testing can be enabled in the sandbox environment, but I believe this only works for the Classic API (we are using the REST API).

Is there any way I can set up a test user with an expired card, or a test user that has no money in their bank (not PayPal) account etc etc. I want to understand the behaviour of the approval and execute stages of setting up a subscription more thoroughly and what errors can be handled by our application at each stage.

Thanks


回答1:


Negative Testing is not completely supported for REST APIs at this time. However, you can use the Negative Testing for Express Checkout with REST to simulate some of the errors. For exmaple, if you'd like to recreate INSTRUMENT_DECLINED then do the negative testing for decline with Express Checkout.



来源:https://stackoverflow.com/questions/27919997/paypal-sandbox-negative-testing-of-subscriptions-with-rest-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!