成功支付宝贝后,无法重定向商家网站

时间:2022-10-14 14:28:04

im using paypal sandbox testing buyer and seller accounts. using these seller account to integrate paypal payment gateway. after payment successful it should automatically redirect to the success page. here is the code im using

即时通讯使用paypal沙盒测试买家和卖家帐户。使用这些卖家帐户集成paypal支付网关。付款成功后,它应自动重定向到成功页面。这是我正在使用的代码

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<form name='_xclick' target='_parent' action='https://www.sandbox.paypal.com/webscr' method='post'>


        <input type="hidden" name="cmd" value="_xclick">
        <input type="hidden" name="business" value="xxxxxxxxxxxxx-faxxxx@gmail.com">
        <input type="hidden" name="currency_code" value="USD">
        <input type="hidden" name="item_name" value="Invoice payment">
        <input type="hidden" name="return" value="http://www.mysite.com/success.php/">


                   <input type="hidden" name="amount" value="12">

   <input type='subimit' name='submit' value='pay by paypal'>
    </form>  

also i have turned ON Auto Return for Website Payments in paypal seller settings. How to pass the transaction id to success.php. what code should be written in success.php page... and also if the transaction is suucessfull i have to update the amount in the database else failure amount should be update in database... can anyone help me out.

我也在paypal卖家设置中打开了网站付款的自动退货。如何将事务id传递给success.php。什么代码应该写在success.php页面...而且如果事务是suucessfull我必须更新数据库中的金额,否则故障数量应该在数据库中更新...任何人都可以帮助我。

1 个解决方案

#1


0  

on success page you simply get data

在成功页面上,您只需获取数据

$item_transaction = $_GET['tx']; // Paypal transaction ID
$item_price = $_GET['amt']; // Paypal received amount
$item_currency = $_GET['cc']; // Paypal received currency type

#1


0  

on success page you simply get data

在成功页面上,您只需获取数据

$item_transaction = $_GET['tx']; // Paypal transaction ID
$item_price = $_GET['amt']; // Paypal received amount
$item_currency = $_GET['cc']; // Paypal received currency type