douhai9043 2013-09-29 15:02
浏览 48
已采纳

如何编辑paypal沙箱的输入字段?

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">
      <input type="hidden" name="cmd" value="_s-xclick">
      <input type="hidden" name="hosted_button_id" value="QHHYRZWR44QMY">
      <table>
             <tr><td><input type="hidden" name="on0" value="WeBoss - Downpayment">WeBoss - Downpayment</td></tr>
             <tr><td><select name="os0">
                           <option value="Combat">Combat P1,000.00 PHP</option>
                           <option value="Battlefield">Battlefield P1,500.00 PHP</option>
                           <option value="Warfield">Warfield P2,100.00 PHP</option>
                     </select> </td></tr>
      </table>
      <input type="hidden" name="currency_code" value="PHP">
      <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_paynow_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
      <a href="func/unsetcancel.php" class="btn btn-danger">Cancel</a>
      <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

i would like to edit the price, how would i do that? and also i tried in "BUY NOW" button and change amount but still it wont change the price.

is there a way to edit the paypal sandbox page?

  • 写回答

1条回答 默认 最新

  • duan0714 2013-09-30 03:02
    关注

    With a hosted buttons, you cannot dynamically change the amount in the code. To be able to change the amount in the code, use a non-hosted button instead. To create a non-hosted button, log in to your paypal.com account to re-create the button again, but this time, click on Step 2 and un-check the option to save button at PayPal. After clicking on 'create button' click on 'remove code protection' to get a clear-text button code.

    NB. However, using a clear-text button code is un-secure as someone can change the values in the code prior to submission of the button.

    So instead, you can use 'BMCreateButton API' to dynamically create hosted or encrypted buttons.

    https://developer.paypal.com/webapps/developer/docs/classic/api/button-manager/BMCreateButton_API_Operation_NVP/

    Samples http://paypal.github.io/sample-apps/ [Classic API Samples]

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?