Paypal - 返回 url 页面和变量 [英] Paypal - Return url page and variables

查看:36
本文介绍了Paypal - 返回 url 页面和变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是否可以在返回 url 中获取 paypal 帖子变量.我想在返回 url 页面中显示响应消息,具体取决于用户的交易是否已完成/待处理/失败.我正在使用贝宝沙盒帐户进行测试.

Is it possible for me to get paypal post variables in return url. I want to show a response message in return url page depending on whether the user's transaction was completed/pending/failed one. I am testing with paypal sandbox account.

这是我的代码,

<input type="hidden" name="item_name" value="Credit Purchase">    
<input type="hidden" name="business" value="<?php echo paypal_business_id;?>">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="currency_code" id="currency_code" value="GBP">
<input type="hidden" name="custom" id="custom" value="<?php echo $user."@@@".$num_purchase;?>">  
<input type="hidden" name="return" value="<?php echo base_url(); ?>buy/success">
<input type="hidden" name="cancel_return" value="<?php echo base_url(); ?>"> 
 <input type="hidden" name="notify_url" value="<?php echo base_url(); ?>buy/notify

推荐答案

可以添加return变量,即订单id,然后当用户返回并从订单中获得订单id你把信息给他看.

Its possible to add on return variable, the order id, then you get your order id when the user return and from the order id you show him the informations.

例如

<input type="hidden" name="return" value="myReturnUrl.php?OrderID=88273882717A72734">

这篇关于Paypal - 返回 url 页面和变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆