几个小时后我真的遇到了麻烦,尝试了很多方法,但仍然没有运气。我使用 Paypal Framework Wordpress 插件在我的 wordpress 主题中集成了 PayPal。沙盒设置工作正常。我使用令牌在 SetExpressCheckout 上获得了成功,当我使用https://www.sandbox.paypal.com/webscr?TOKEN=EC-2FY692500K5578627&cmd=_express-checkout将用户发送到 PayPal 进行批准和付款时,它给了我错误...
This transaction is invalid. Please return to the recipient's website to complete your transaction using their regular checkout flow.
请帮忙,我该怎么做才能让它工作......我真的很担心...... :(
更新
我正在发送以下参数SetExpressCheckout
$ppParams = array(
'METHOD' => 'SetExpressCheckout',
'PAYMENTREQUEST_0_PAYMENTACTION' => 'Sale',
'RETURNURL' => admin_url('admin-ajax.php?action=paypal_handler&step=commit&user_id=' . $user_id),
'CANCELURL' => home_url(),
'AMT' => $price,
'PAYMENTREQUEST_0_AMT' => $price,
'PAYMENTREQUEST_0_ITEMAMT' => $price,
'L_PAYMENTREQUEST_0_ITEMCATEGORY0' => 'Digital',
'L_PAYMENTREQUEST_0_NAME0' => 'Prod Name',
'L_PAYMENTREQUEST_0_QTY0' => 1,
'L_PAYMENTREQUEST_0_AMT0' => $price,
'DESC' => 'description',
'FIRSTNAME' => $_POST['first_name'],
'LASTNAME' => $_POST['last_name'],
'EMAIL' => $email
);
$response = hashCall($ppParams);
我正在使用以下https://cms.paypal.com/uk/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_ECGettingStarted进行交叉检查和实施。