订单创建后的Paypal

时间:2018-02-01 22:16:43

标签: php paypal

我尝试使用以下代码将paypal与mywebsite集成:

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" id="form_paypal">
    <!-- Identify your business so that you can collect the payments. -->
    <input type="hidden" name="business" value="xxx">
    <!-- Specify a Buy Now button. -->
    <input type="hidden" name="cmd" value="_cart">
    <input type="hidden" name="upload" value="1">
    <input type="hidden" name="currency_code" value="<?php echo $requestParameters["currency"]; ?>">
    <input type="hidden" name="order_number" value="<?php echo $order_d_id; ?>">
    <!-- Specify details about the item that buyers will purchase. -->
   //items
   ......
    <!-- Specify URLs -->
    <input type='hidden' name='cancel_return' value='https://xxx/cart'>
    <input type='hidden' name='return' value='https://xxx/cart'>
</form>
<script type="text/javascript">
    document.getElementById("form_paypal").submit();
</script>

它工作正常,重定向到沙箱并付款得很好,但我需要获得订单号,因为付款后订单已创建,我以的形式发送order_number ,但付款后我只在标题中获得这个婴儿车:

https://xxx/cart?amt=37.00&cc=USD&st=Pending&tx=7CN14150L22664531

我需要让order_number改变状态,

感谢您的帮助。

0 个答案:

没有答案