如何通过 Braintree SDK 测试失败的 PayPal 交易

How to test failed PayPal transactions through Braintree SDK

我在 ASP.NET Core 上使用 Braintree SDK,我可以使用从 developers.paypal.com 生成的访问代码创建交易,但是所有交易都被支付处理器和网关接受。

我已经尝试输入 Braintree documentation however I think that they only work when you use a Braintree sandbox access token and not a PayPal sandbox access token (mentioned here). I've tried using an error code as an amount as documented on the PayPal API documentation here 中列出的本应触发拒绝的神奇金额,但该金额已被接受,并且交易已完成。

我是否必须注册一个 Braintree 沙盒帐户才能获得其中一个记录的拒绝代码 here

完全披露:我在 Braintree 工作。如果您需要任何进一步的帮助,请随时联系支持人员。

如果您使用的是 PayPal 访问代码,为了接收拒绝代码,您需要使用模拟结账流程并且需要设置 Braintree 沙箱。