我正在尝试在线购买以登录系统。基本上我在这里做的是在他们注册并付款之后,然后只能登录我的网站。
所以我在网上找了很多关于购买按钮的例子。但是我无法找到它如何处理返回URL和返回变量。我需要返回变量,以便我可以验证付款并将其保存到我的数据库。
我可以参考吗?
基本上我需要以某种方式交叉检查项目的付款状态,以便我可以将其保存到数据库。
答案 0 :(得分:2)
您需要在Paypal帐户中设置返回网址,例如http://www.domain.com/paypal_response.php,并在paypal_response.php中获得回复,您可以使用$ _REQUEST或$ _POST访问所有bellow变量
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"