通过Paypal REST API使用Paypal进行付款不会在Paypal沙盒或实时网站上显示付款说明 [英] Pay with Paypal through Paypal REST API does not show up payment description on Paypal Sandbox or live sites

查看:58
本文介绍了通过Paypal REST API使用Paypal进行付款不会在Paypal沙盒或实时网站上显示付款说明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Paypal方法实现Paypal的新REST API Pay,可在此处引用: https://developer.paypal.com/webapps/developer/docs/integration /web/accept-paypal-payment/

I am implementing Paypal's new REST API Pay with Paypal method that can be referenced here: https://developer.paypal.com/webapps/developer/docs/integration/web/accept-paypal-payment/

付款完全可以按原样执行.用户选择使用Paypal进行付款,然后将其重定向到Paypal站点,希望他在该站点登录并批准付款.我正在发送Paypal的JSON数据几乎是上面链接中指定的内容,而我的数据看起来像这样:

The payment executes fine, exactly the way it should be. The user chooses to pay with Paypal and is then redirected to the Paypal site where he is expected to log in and approve the payment. The JSON data that I am sending Paypal is pretty much what is specified in the above link and mine looks like this:

{
  "intent":"sale",
  "redirect_urls":{
    "return_url":"http://<return URL here>",
    "cancel_url":"http://<cancel URL here>"
  },
  "payer":{
    "payment_method":"paypal"
  },
  "transactions":[
    {
      "amount":{
        "total":"7.47",
        "currency":"USD"
      },
      "description":"This is the payment description."
    }
  ]

}

在将用户重定向到Paypal网站时,说明和总金额列显示为空白

As it redirects the user to the paypal website, the description and total amount column is shown blank

我不确定这是否是Paypal的REST API上的错误,但是我相信我会提供必要的说明+金额,以反映在此页面上.如果未显示此信息,通常会对用户产生威慑作用,因为即使该款项列在我的网站上,他们也肯定希望在Paypal网站上看到他们所支付的款项.

I am not sure if this is a mistake on Paypal's REST API but I believe I am providing the necessary description + amount payment to be reflected on this page. If this information is not shown, it is typically a deterrent to the user since they would definitely like to see the amount they are paying on the Paypal site even though this amount is listed on my website.

这是它的样子:

对于那些想表明用户尚未登录的人,即使登录后,描述和当前购买列仍为空白.

For those who would like to indicate that the user has not logged in, well, even after logging in, the description and the current purchase column remain blank.

我是否缺少需要发送给Paypal的任何参数以指示此描述数据?

Am I missing any parameters that need to be sent to Paypal in order to indicate this description data?

注意:对于实时服务器和沙盒服务器,此问题仍然存在.

Note: This issue persists for both the live and sandbox servers.

推荐答案

上一页的左窗格显示: 1.订单中的物料明细.您可以在付款资源中将物料清单作为交易明细的一部分.此处将显示相同的内容. 2.交易金额的组成部分,例如运费,税金等(如果您将其包含在请求中).

The left hand pan in above page displays: 1. Item details from order. You can include item list as part of the transaction details in payment resource. The same will be displayed here. 2. Components of the transaction amount e.g. shipping amount, tax, etc. if you include them in request.

尝试此请求以查看示例:

Try this request to see example:

{
    "intent": "sale",
    "payer": {
        "payment_method": "paypal"
    },
    "redirect_urls": {
        "return_url": "http://<return url>",
        "cancel_url": "http://<cancle url>"
    },
    "transactions": [
        {
            "amount": {
                "total": "8.00",
                "currency": "USD",
                "details": {
                    "subtotal": "6.00",
                    "tax": "1.00",
                    "shipping": "1.00"
                }
            },
            "description": "This is payment description.",
            "item_list": { 
                "items":[
                    {
                        "quantity":"3", 
                        "name":"Hat", 
                        "price":"2.00",  
                        "sku":"product12345", 
                        "currency":"USD"
                    }
                ]
            }
        }
    ]
}

这篇关于通过Paypal REST API使用Paypal进行付款不会在Paypal沙盒或实时网站上显示付款说明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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