【问题标题】:paypal php response or return process?paypal php响应或返回过程?
【发布时间】:2014-04-17 14:47:33
【问题描述】:

我正在尝试在线购买以登录系统。基本上我在这里做的是他们注册并付款后,然后才能登录我的网站。

所以我在网上找到了很多关于购买按钮的示例。但是我找不到它如何处理返回 url 和返回变量。我需要返回变量,以便我可以验证付款是否已完成并将其保存到我的数据库中。

有什么地方可以参考吗?

基本上我需要以某种方式交叉检查项目的付款状态,以便我可以将其保存到数据库。

【问题讨论】:

标签: php mysql oracle paypal integration


【解决方案1】:

您需要在 paypal 帐户中设置返回 url,例如 http://www.domain.com/paypal_response.php,然后您会在 paypal_response.php 中获得响应,您可以使用 $_REQUEST 或 $_POST 之类的方式访问所有波纹管变量

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"

【讨论】:

    猜你喜欢
    • 2017-12-15
    • 2012-04-26
    • 2013-12-29
    • 2016-11-03
    • 2020-08-12
    • 2020-06-16
    • 1970-01-01
    • 2011-01-17
    • 2017-05-10
    相关资源
    最近更新 更多