使用 paypal rest API 向用户退款 [英] Refund users using paypal rest API

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

问题描述

我正在开发一个网络应用程序,我允许用户在该应用程序上购买活动门票.我使用 Paypal Rest API 汇款和购买门票.一切正常.现在我正在尝试使用退款方法在此活动将被取消时向与该活动相关的所有用户退款.查看 REST API 文档,我发现有一种退款方法,但是当我在 REST API 包中搜索 laravel 时,我还没有找到如何退款或使用退款方法.rest-api-sdk-php 不支持退款方式吗?如果是,如何在 Laravel 项目中使用它?PS:付款是在没有信用卡的情况下完成的.我只使用带沙箱的贝宝账户.--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 get (The request was denied.)

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天全站免登陆