gpt4 book ai didi

php - paypal useraction=commit 不提供支付按钮。 PHP

转载 作者:太空宇宙 更新时间:2023-11-03 16:24:39 27 4
gpt4 key购买 nike

我在 php 中有以下代码

        $postData = "USER=xxxxxx"
. "&PWD=xxxxxxxx"
. "&SIGNATURE=xxxxxxx"
. "&METHOD=SetExpressCheckout"
. "&VERSION=93"
. "&EMAIL=" . $_POST['email']
. "&PAYMENTREQUEST_0_SHIPTOPHONENUM=" . $_POST['phone']
. "&PAYMENTREQUEST_0_AMT=" . $price
. "&PAYMENTREQUEST_0_ITEMAMT=" . $price
. "&PAYMENTREQUEST_0_PAYMENTACTION=SALE"
. "&PAYMENTREQUEST_0_DESC=" . $plan['fullname']
. "&L_PAYMENTREQUEST_0_NAME0=" .$plan['fullname']
. "&L_PAYMENTREQUEST_0_AMT0=$price"
. "&L_PAYMENTREQUEST_0_QTY0=1"
. "&RETURNURL=http://localhost/bemo/casperreg"
. "&CANCELURL=http://bemoacademicconsulting.com/casperprep-internal";

$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // this line makes it work under https
curl_setopt($ch, CURLOPT_URL, "https://api-3t.paypal.com/nvp");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);

// Ready the postData to send
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);

// Send the data to Paypal and assign the repsonse
$resp = curl_exec($ch);
parse_str($resp,$arr);

redirect::to("https://www.paypal.com/checkoutnow?token=" . $arr['TOKEN'] . "&useraction=commit");

现在,从技术上讲,这里的一切都有效,除了即使它说 useraction=commit 我没有得到立即付款按钮这一事实。谁能帮帮我?

还有一个额外的问题,即使我将电话号码传递给 paypal,我也没有在 paypal 页面上看到它。这是我能做的吗?

谢谢!努尔

最佳答案

快速结帐的正确重定向地址应该是
https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&useraction=commit&token=[ token 号]
来源:Developer Guide

关于你的奖金问题
1. 尝试在号码 xxx-xxx-xxxx 上做一个字段掩码
2.检查您的商家资料中是否设置了电话号码

关于php - paypal useraction=commit 不提供支付按钮。 PHP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37864905/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com