使用Paypal Rest API退款给用户 [英] Refund users using paypal rest API

查看:373
本文介绍了使用Paypal Rest API退款给用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个Web应用程序,允许用户购买事件门票.我使用Paypal Rest API进行汇款和购买门票,一切都很好.现在,当事件被取消时,我正在尝试使用退款方法来退款与该事件相关的所有用户.在REST API文档中,我发现有一种退款的方法,但是当我在REST API软件包中搜索laravel时,我没有找到如何退款或使用退款方法. rest-api-sdk-php不支持退款方法吗?如果是的话,如何在laravel项目中使用它? 附言:付款无需信用卡即可完成.我只使用带有沙盒的Paypal帐户. --edit--尝试使用其他api的退款代码时,我得到以下结果:

I'm developping a web application on which I allow the users to buy a ticket for an event. I used the Paypal Rest API for sending money and purchasing the tickets.Everything is working just fine. Now I'm trying to use the refund method to refund all users related to an event when this event will be cancelled. Looking in the REST API documentation I found that there is a way to refund but when I search in the REST API package for laravel I haven't found how to refund or use the refund method. Does rest-api-sdk-php doesn't support the refund method? And if yes how to use it in laravel project? PS: the payment are done without a credit card.I use just the paypal acount with sandbox. --edit-- I get this result when trying the refund code of the rest api:

{"name":"TRANSACTION_REFUSED","message":"The request was refused.{0}","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#TRANSACTION_REFUSED","debug_id":"97f33dd89f4c8"}

推荐答案

您收到的错误(请求被拒绝.)

The error you are getting (The request was refused.)

没有看到您的代码,可能是以下任何原因造成的:

Without seeing your code, any of the following could be the reason:

部分退款金额必须小于或等于原始交易金额

The partial refund amount must be less than or equal to the original transaction amount

部分退款金额必须小于或等于剩余金额

The partial refund amount must be less than or equal to the remaining amount

部分退款金额无效

部分退款必须与原始交易使用相同的货币

The partial refund must be the same currency as the original transaction

由于该交易中存在投诉案件,因此只能退还该交易的全部或全部余额

Because a complaint case exists on this transaction, only a refund of the full or full remaining amount of the transaction can be issued

您已超过该笔交易的退款期限

You are over the time limit to perform a refund on this transaction

部分退款后无法全额退款

Cannot do a full refund after a partial refund

此交易已全额退款

您无法退款此类交易

您不能对此交易进行部分退款

You cannot do a partial refund on this transaction

商家帐户有限制或限制

这篇关于使用Paypal Rest API退款给用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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