我正在尝试将以下信息传递给 paypal,它说“此时无法处理。任何人都可以告诉我哪里出了问题。我正在使用沙箱环境进行测试。
正在使用与 ID 相关的 jquery 提交表单提交表单
<
form action="https://sandbox.paypal.com/cgi-bin/webscr" method="post" id="PayPalForm" >
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="subtotal" value="20.00" />
<input type="hidden" name="business" value="testemail@test.com" />
<input type="hidden" name="paymentaction" value="sale" />
<input type="hidden" name="template" value="TemplateD" />
<input type="hidden" name="return" value="success.php" />
<input type="hidden" name="currency_code" value="GBP" />
<input type="hidden" name="address_override" value="true" />
<input type="hidden" name="item_number" value="<?php echo $id; ?>" />
<input type="hidden" name="quantity" value="<?php echo $chairno; ?>" />
<input type="hidden" name="custom" value="<?php echo $custom; ?>" />
<input type="hidden" name="first_name" value="<?php echo $fname; ?>" />
<input type="hidden" name="last_name" value="<?php echo $lname; ?>" />
<input type="hidden" name="address1" value="<?php echo $add1; ?> <?php echo $add2; ?>" />
<input type="hidden" name="city" value="<?php echo $city; ?>" />
<input type="hidden" name="zip" value="<?php echo $post; ?>" />
<input type="hidden" name="country" value="<?php echo $country; ?>" />
<input type="hidden" name="billing_first_name" value="<?php echo $bill_fname; ?>" />
<input type="hidden" name="billing_last_name" value="<?php echo $bill_lname; ?>" />
<input type="hidden" name="billing_address1" value="<?php echo $bill_add1; ?> <?php echo $bill_add2; ?>" />
<input type="hidden" name="billing_city" value="<?php echo $bill_city; ?>" />
<input type="hidden" name="billing_zip" value="<?php echo $bill_post; ?>" />
<input type="hidden" name="billing_country" value="<?php echo $country; ?>" />
<input type="hidden" name="notify_url" value="ipn.php" />
</form>
最佳答案
subtotal
、template
和所有 billing_xxxxx
参数都是 PayPal Website Payments Pro Hosted Solution 参数。然而 cmd=_xclick
属于网站支付标准。
您要集成的 PayPal 产品是什么?
如果是 Website Payments Standard,请使用 amount
作为要收取的金额并删除 template
。
如果是 Website Payments Pro Hosted Solution,设置 _hosted-payment
的 cmd
的值并将 action
更改为 https ://securepayments.paypal.com/cgi-bin/acquiringweb
。
关于php - 无法将信息传递给 Paypal 说无法处理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8849221/