0

i'm trying to do an online purchase for logging to a system. basically what i'm doing here is after they have registered and pay,then can only login to my website.

so i found lots of examples online on doing the buy button. however i cant find how it handles return url and and return variables. i would need the return variables so that i can verify payment is made and save it to my database.

is there anywhere i could refer?

basically i need to somehow crosscheck payment status for an item so that i can save it to db.

Psychocryo
  • 2,103
  • 8
  • 26
  • 33
  • https://developer.paypal.com/docs/classic/api/ paypal's API Docs Have fun. – Bryan Mar 13 '14 at 04:21
  • Here is your answer Please check link http://stackoverflow.com/questions/7642895/setting-paypal-return-url-and-making-it-auto-return – user3085713 Mar 13 '14 at 04:28

1 Answers1

2

You need to set return url in paypal account like http://www.domain.com/paypal_response.php and you get response in paypal_response.php and you can access all bellow variable with $_REQUEST or $_POST like

action : "ipn"
mc_gross : "1620.00"
protection_eligibility : "Eligible"
address_status : "confirmed"
item_number1 : ""
payer_id : "xxxxxxxxxxxxx"
tax : "0.00"
address_street : "Address Street"
payment_date : "15:04:37 May 03, 2013 PDT"
payment_status : "Completed"
charset : "windows-1252"
address_zip : "00000"
mc_shipping : "0.00"
mc_handling : "0.00"
first_name : "Laukik"
last_name : "Patel"
mc_fee : "35.94"
address_country_code : "US"
address_name : "Address Name"
notify_version : "3.7"
custom : ""
payer_status : "verified"
business : "billing@domain.com"
address_country : "country name"
num_cart_items : "1"
mc_handling1 : "0.00"
address_city : "Chandler"
verify_sign : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
payer_email : "client@email.com"
mc_shipping1 : "0.00"
tax1 : "0.00"
txn_id : "xxxxxxxxxxxx"
payment_type : "instant"
payer_business_name : "Company Name"
last_name : "Patel"
address_state : "XX"
item_name1 : "Item Name"
receiver_email : "billing@domain.com"
payment_fee : "35.94"
quantity1 : "1"
receiver_id : "xxxxxxxxxxxx"
txn_type : "cart"
mc_gross_1 : "1620.00"
mc_currency : "USD"
residence_country : "US"
transaction_subject : "Shopping Cart"
payment_gross : "1620.00"
ipn_track_id : "xxxxxxxxxxxxx"
Laukik Patel
  • 733
  • 7
  • 18