我使用贝宝标准支付和使用以下代码。

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="quantity_1" value="1">
    <input type="hidden" name="item_name_1" value="Sasha">
    <input type="hidden" name="amount_1" value="545.71">
    <input type="hidden" name="business" value="<merchant-email-id>">
    <input type="hidden" name="cmd" value="_cart">
    <input type="hidden" name="upload" value="1">
    <input type="hidden" name="currency_code" value="EUR">
    <input type="hidden" name="address_override" value="0">
    <input type="hidden" name="custom" value="48">
    <input type="hidden" name="first_name" value="test11">
    <input type="hidden" name="last_name" value="test21">
    <input type="hidden" name="email" value="<buyer-email-id>">
    <input type="hidden" name="address" value="Santa clara">
    <input type="hidden" name="city" value="Santa clara">
    <input type="hidden" name="state" value="CA">
    <input type="hidden" name="zip" value="95050">
    <input type="hidden" name="country" value="USA">
    <input type="hidden" name="phone" value="1023456789">
    <input type="hidden" name="notify_url" value="<complete-url>" />
    <input type="hidden" name="return" value="<complete-url>" />
    <input type="hidden" name="cancel_return" value="<complete-url>" />
    <input type="submit" value="Submit">
</form>

当我按提交并转到贝宝沙盒屏幕,然后它显示空白页。是在维修还是我这边有问题。几天前,同样的上述表格是工作,但从最后3-4天贝宝沙盒页显示空白。
我不明白是我这边的问题还是他们那边的问题?

最佳答案

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  <input type="hidden" name="cmd" value="_cart">
  <input type="hidden" name="business" value="[email protected]">
  <input type="hidden" name="item_name" value="hat">
  <input type="hidden" name="item_number" value="123">
  <input type="hidden" name="amount" value="15.00">
  <input type="hidden" name="first_name" value="John">
  <input type="hidden" name="last_name" value="Doe">
  <input type="hidden" name="address1" value="9 Elm Street">
  <input type="hidden" name="address2" value="Apt 5">
  <input type="hidden" name="city" value="Berwyn">
  <input type="hidden" name="state" value="PA">
  <input type="hidden" name="zip" value="19312">
  <input type="hidden" name="night_phone_a" value="610">
  <input type="hidden" name="night_phone_b" value="555">
  <input type="hidden" name="night_phone_c" value="1234">
  <input type="hidden" name="email" value="[email protected]">
  <input type="image" name="submit"
    src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif"
    alt="PayPal - The safer, easier way to pay online">
</form>
Link:- https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/formbasics/

Note:- Please above link and use this form. And check results or check below form


<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  <input type="hidden" name="cmd" value="_xclick">
  <input type="hidden" name="business" value="[email protected]">
  <input type="hidden" name="item_name" value="Memorex 256MB Memory Stick">
  <input type="hidden" name="item_number" value="MEM32507725">
  <input type="hidden" name="amount" value="3">
  <input type="hidden" name="tax" value="1">
  <input type="hidden" name="quantity" value="1">
  <input type="hidden" name="currency_code" value="USD">

  <!-- Enable override of buyers's address stored with PayPal . -->
  <input type="hidden" name="address_override" value="1">
  <!-- Set variables that override the address stored with PayPal. -->
  <input type="hidden" name="first_name" value="John">
  <input type="hidden" name="last_name" value="Doe">
  <input type="hidden" name="address1" value="345 Lark Ave">
  <input type="hidden" name="city" value="San Jose">
  <input type="hidden" name="state" value="CA">
  <input type="hidden" name="zip" value="95121">
  <input type="hidden" name="country" value="US">
  <input type="image" name="submit"
    src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif"
    alt="PayPal - The safer, easier way to pay online">
</form>

关于php - Paypal 标准付款沙箱显示空白页,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/44772768/

10-13 09:02