php
  • paypal
  • payment-gateway
  • paypal-sandbox
  • paypal-ipn
  • 2013-10-09 57 views 1 likes 
    1

    即時通訊使用貝寶沙箱測試買方和賣方賬戶。使用這些賣家帳戶來整合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="[email protected]"> 
         <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> 
    

    還我已經打開自動返回在貝寶賣家設置網站付款代碼IM。如何將交易ID傳遞給success.php。什麼代碼應該寫在success.php頁面...並且如果事務是suucessfull我必須更新數據庫中的數量否則失敗數量應該在數據庫中更新...任何人都可以幫助我。

    回答

    0

    成功頁面上,你只是得到的數據

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