php - PayPal not returning variables -


i'm adding paypal checkout form. rather using api, use form script. however, i'm not getting response variables paypal after payment has been made. confirm amount of money received see if user has paid amount should've paid.

since dont receive response variables paypal, cannot see whether user has indeed paid amount of money. doing wrong? see alot of people have problems , none of them had answer.

my form:

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" >                         <input type="hidden" name="business" value="seller@seller.com">                         <input type="hidden" name="cmd" value="_xclick">                         <input type="hidden" name="upload" value="1" />                         <input type="hidden" name="item_name" value="<?php echo $_amount_credits ?> credits">                         <input type="hidden" name="item_number" value="<?php echo $_invoice_id ?>">                         <input type="hidden" name="amount" value="<?php echo $_total_amount ?>">                         <input type="hidden" name="lc" value="nl">                         <input type="hidden" name="rm" value="2">                         <input type="hidden" name="cbt" value="go http://domain.com">                         <input type="hidden" name="no_note" value="1" />                         <input type="hidden" name="currency_code" value="eur">                         <input type="hidden" name="return" value="http://domain.com/index.php?payment=success&transaction_id=<?php echo $_get['tx'] ?>"/>                          <input type="hidden" name="cancel_return" value="http://domain.com/index.php?payment=canceled&transaction_id=<?php echo $_get['tx'] ?>"/>                         <input type="submit" class="button blue _quick_order_overview _payment_paypal" name="submit" value="pay via paypal">                     </form> 

you should use instant payment notification (ipn) sort of thing. there lots of templates available on github/packagist, etc.

ipn post transaction data listener script have setup on server time transaction happens on paypal account. payments, refunds, disputes, cleared e-checks, etc. can automate sorts of tasks based on different txn_type's ipn sends you.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -