简体   繁体   English

贝宝交易金额未显示

[英]paypal transaction value doesn't show

I'm following a tutorial from the paypal documentation to make it possible to pay through paypal. 我正在遵循Paypal文档中的教程,以使其可以通过Paypal付款。 Here is the code I'm trying to implement. 是我要实现的代码。 However when I run the code it won't show me the amount that is supposed to be payed while it is set in the transaction through the code. 但是,当我运行代码时,它不会显示通过代码在交易中设置时应支付的金额。 Does anyone know what needs to happen for this to work? 有谁知道要执行此操作需要做什么? Is the example either not complete or not up to date? 该示例是否不完整或不是最新的?

I figured out what was wrong. 我弄清楚出了什么问题。 For the transaction to work something additional must be added to the paypal link. 为了使交易正常进行,必须在贝宝链接中添加其他内容。

When returned from paypal the link you have to navigate to to pay looks like this https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-3WC762911Y9384932 从贝宝(Paypal)返回时,您必须导航至该链接的链接看起来像这样https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-3WC762911Y9384932

however an additional parameter is needed for paypal to show the price that was set. 但是,贝宝需要一个附加参数来显示设置的价格。 To do so the following parameter needs to be added &useraction=commit 为此,需要添加以下参数&useraction=commit

The entire link would look like this https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&useraction=commit&token=EC-3WC762911Y9384932 整个链接看起来像这样https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&useraction=commit&token=EC-3WC762911Y9384932

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM