Paypal BuyNow - GET instead of POST with params for returnUrl

前端 未结 1 839
遥遥无期
遥遥无期 2020-12-21 06:39

I´m running into an issue that I detected today. I have the following paypal button config :

相关标签:
1条回答
  • 2020-12-21 06:58

    We had the same problem. You need to enable "PDT", then the custom field will be returned in the "cm" variable of the return url post.

    "Auto Return" also needs to be enabled to use "PDT", but you can still set the return URL in the button form post instead of in the "Auto Return" config if you need it to be dynamic.

    https://developer.paypal.com/docs/classic/products/payment-data-transfer/

    Try out this sandbox pay button and see what the response looks like when it is recorded on our return URL.

    <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_xclick"><input type="hidden" name="amount" value="0.67">
    <input type="hidden" name="cancel_return" value="http://test.smsportal.co.za/onlinePaymentv2/Testing3rdPartyResponse.aspx"> 
    <input type="hidden" name="custom" value="this is the custom variable. it is named 'cm' in the returned Url."> 
    <input type="hidden" name="return" value="http://test.smsportal.co.za/onlinePaymentv2/Testing3rdPartyResponse.aspx"> 
    <input type="hidden" name="rm" value="2"> 
    <input type="hidden" name="cbt" value="Return to Merchant"> <input type="hidden" name="business" value="paypalmerchant@smsportal.com">
    <input type="hidden" name="item_name" value="Credit Purchase">
    <input type="hidden" name="currency_code" value="EUR">
    <input type="hidden" name="button_subtype" value="services"><input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest">
    <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="Pay now"><img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"></form>

    0 讨论(0)
提交回复
热议问题