PayPal Sandbox使用REST API对订阅进行否定测试 [英] PayPal Sandbox negative testing of subscriptions with REST API

查看:59
本文介绍了PayPal Sandbox使用REST API对订阅进行否定测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在与一个团队合作为我们的应用程序提供PayPal集成,并且我们使用REST API设置订阅的实施进展顺利.但是,我遇到了问题,尝试测试某些负面情况,例如用户卡已过期.我注意到可以在沙盒环境中启用否定测试,但是我相信这仅适用于Classic API(我们使用的是REST API).

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).

有什么办法可以设置具有过期卡的测试用户,或者在其银行账户(非PayPal)中没有钱的测试用户等?我想了解批准的行为并执行各个阶段更彻底地设置订阅,以及我们的应用程序在每个阶段可以处理哪些错误.

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.

谢谢

推荐答案

目前REST API尚不完全支持负面测试.但是,您可以对带有REST的Express Checkout进行负测试,以模拟某些错误.例如,如果您想重新创建INSTRUMENT_DECLINED,请使用Express Checkout进行否定测试以进行下降.

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.

这篇关于PayPal Sandbox使用REST API对订阅进行否定测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆