Paypal RESTful API

编程入门 行业动态 更新时间:2024-10-26 03:27:34
Paypal RESTful API - 当买家没有足够资金时的情况下的响应验证(Paypal RESTful API - Response validation for case when buyer don't have enough funds)

我使用Paypal Restful API从我的网站直接付款。 目前我正在测试我在沙盒上的第一个实现。

我不确定商家和买家帐户为何不“同步”。 在我进行交易后,我的商家帐户会收到资金,但不会反映给买家余额。 这对我来说是重要的,因为当我的客户没有足够的资金支付时,我正试图测试案例。

我不确定在这种情况下我会回复什么。 我想我会因为这个案子的状态“失败”而得到反应,但如果有人遇到同样的问题,我想澄清一下。

即使我创建了一个0 $的新买家(个人)帐户,我使用此帐户的交易也可以完成。 即使交易没有完全完成,我仍然会在paypal响应(/ v1 /付款/付款)中获得“批准”状态(等等状态“无人认领” - 当paypal要求更改货币时)。 这也让我担心。

第二个问题,如果我使用restfull api,我是否需要实现webhooks / ipn?

I am using Paypal Restful API for direct payment from my site . Currently I am testing my first implementation on sandbox.

I am not sure why merchant and buyer account is not "synchronised". After I make transaction, my merchant account receives funds but it is not reflected to buyers balance. This is import for me beacuse I am trying to test case when my client hasn't enough funds for payment.

I am not sure what respone I will recive for this case. I assume I will get respone with state "failed" for this case but I would like to clarify this if someone had same problem.

Even if i create a new buyer (personal) account with 0$, my transaction using this account completes fine. I allways get state "approved" in paypal response ( /v1/payments/payment ) even if transaction is not fully completed (etc. status "Unclaimed" - when paypal ask to change currency ). This also worries me.

And second question, do i need to implement webhooks/ipn if i am using restfull api?

最满意答案

我忘了回答我的问题:D。 Paypal支持给了我一些有用的信息。 目前我使用的是paypal restfull api,没有选择进行全面的负面测试等,以支付0.75美元并期待具体的响应。 这只适用于较老的api。 我只能测试付款状态(待定,已完成)。 为此,您应该从沙盒帐户设置页面启用付款审核,并使用USD或GBP(我不确定哪一个)以重现此状态。 此外,商家和买家帐户不应“同步”。

我没有为我的项目实现webhooks或ipn。

I have forgot to answer on my question :D. Paypal support gave me a few useful information. At the moment I used paypal restfull api there was no option to do full negative testing, etc. to pay 0.75$ and expect specific response. This was able only for older api. I was able only to test payment status (pending, completed). For this purpose you should enable Payment review from your sandbox account settings page and use USD or GBP (i'm not sure which one) in order to reproduce this status. Also, merchant and buyer account should not be "synchronised".

And I didn't implement webhooks or ipn for my project.

更多推荐

本文发布于:2023-08-02 23:19:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1382457.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Paypal   RESTful   API

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!