在我们的商店系统中集成PayPal时,我做了最新的文档。我刚刚发现它似乎在NVP中有PAYMENTREQUEST_n_PAYMENTACTION参数。
我使用SetExpressCheckout返回的令牌和PayerID获取付款详细信息。当我输出我返回的cURL时,我发现了这个:
[CHECKOUTSTATUS] => PaymentActionNotInitiated
什么似乎是问题?
我在cURL中使用此查询:
// Prepare PayPal API URL
$url = "https://api-3t.sandbox.paypal.com/nvp";
// $PAYMENTACTION = "Sale"
// Prepare PayPal NVP (Name-Value Pair) payment request
$nvp = "METHOD=" . $SETMETHOD;
$nvp .= "&VERSION=" . $VERSION;
$nvp .= "&USER=" . $USERNAME;
$nvp .= "&PWD=" . $PASSWORD;
$nvp .= "&SIGNATURE=" . $SIGNATURE;
$nvp .= "&PAYMENTREQUEST_0_PAYMENTACTION=" . $PAYMENTACTION;
$nvp .= "&PAYMENTREQUEST_0_CURRENCYCODE=" . $CURRENCY;
$nvp .= "&SOLUTIONTYPE=" . $SOLUTIONTYPE;
$nvp .= "&RETURNURL=" . $RETURNURL;
$nvp .= "&CANCELURL=" . $CANCELURL;
$nvp .= "&L_PAYMENTREQUEST_0_NAME0=" . $PAYMENTNAME0;
$nvp .= "&L_PAYMENTREQUEST_0_DESC0=" . $PAYMENTDESC0;
$nvp .= "&L_PAYMENTREQUEST_0_AMT0=" . $PAYMENTAMT0;
$nvp .= "&L_PAYMENTREQUEST_0_QTY0=" . $PAYMENTQTY0;
$nvp .= "&PAYMENTREQUEST_0_ITEMAMT=" . $PAYMENTITEMAMT;
$nvp .= "&PAYMENTREQUEST_0_AMT=" . $PAYMENTAMT;
$nvp .= "&PAYMENTREQUEST_0_CURRENCYCODE=" . $CURRENCY;
$nvp .= "&LOCALECODE=" . $LOCALECODE;
$nvp .= "&HDRIMG=" . $HEADERLOGO;
$nvp .= "&PAYFLOWCOLOR=" . 262626;
答案 0 :(得分:9)
PaymentActionNotInitiated
未提及PAYMENTREQUEST_0_PAYMENTACTION
这仅仅意味着您还没有将买家引导到PayPal页面以确认他/她的付款。
总结一下,这就是Express Checkout的工作原理: