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

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

问题描述

我是否有可能在返回URL中获取贝宝发布变量.我想在返回网址页面中显示响应消息,具体取决于用户的交易是否已完成/待处理/失败.我正在使用Paypal沙箱帐户进行测试.

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,并从订单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">

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

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