在Paypal中完成购买后重定向到原始站点

Redirection to the original site after purchase is completed in Paypal(在Paypal中完成购买后重定向到原始站点)
本文介绍了在Paypal中完成购买后重定向到原始站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我正在制作一款网络应用.我已经使用简单的表单提交到 Paypal 站点将 Paypal 集成到其中.一切正常.但是每当付款成功时,它应该使用 Paypal 的响应重定向回我的原始站点.但是,它没有按应有的方式工作.目前它仅保留在 Paypal 网站上.

I'm making one web app. I've integrated Paypal in it using simple form submission to the Paypal site. Everything works well. but whenever the payment gets successful it should redirect back to my original site with the response from Paypal. However, it's not working as it should be. Currently it stays on the Paypal site only.

<form action='https://www.sandbox.paypal.com/cgi-bin/webscr' method='post' name='form'>
 <input type='hidden' name='business' value='<?php echo $paypal_id; ?>'>
<input type='hidden' name='cmd' value='_xclick'>
<input type='hidden' name='item_name' id='item_name' value=''>
<input type='hidden' name='item_number' id='item_number' value=''>
<input type='hidden' name='amount' id='amount' value=''>
<input type='hidden' name='no_shipping' value='1'>
<input type='hidden' name='currency_code' value='USD'>
<input type='hidden' name='cancel_return' value='http://yoursite.com/cancel.php'>
<input type='hidden' name='return' value='http://mysite.com/user_credits/purchase_credits'>
<input type="image" src="https://paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" name="submit">

我错过了什么?我使用的是 CakePHP 2.0.

what am I missing in it? I'm using CakePHP 2.0.

推荐答案

您必须在 paypal 中启用自动返回功能设置.

You have to enable auto return functionality setting in paypal .

只需按照以下步骤启用

  1. 登录并单击我的帐户"下的个人资料"子选项卡.
  2. 点击销售偏好"下的网站支付偏好"链接.
  3. 点击开启单选按钮以启用自动返回.
  4. 输入返回 URL.注意:您必须满足返回 URL 要求才能设置自动返回.详细了解返回网址.

对于沙盒帐户,请执行以下操作

For sandbox account do the following

  1. 登录 Sandbox Merchant Id,然后点击我的帐户下的个人资料子选项卡.
  2. 点击个人资料"下的更多选项"链接.
  3. 查看第三行的销售偏好.
  4. 点击销售偏好"下的网站支付偏好"链接
  5. 点击开启单选按钮以启用自动返回.
  6. 点击开启单选按钮以启用自动返回.
  7. 输入返回 URL.注意:您必须满足返回 URL 要求才能设置自动返回.详细了解返回网址.

这篇关于在Paypal中完成购买后重定向到原始站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Codeigniter htaccess to remove index.php and www(Codeigniter htaccess 删除 index.php 和 www)
htaccess mod_rewrite part of url to GET variable(htaccess mod_rewrite url 的一部分到 GET 变量)
Replacing a querystring parameter value using mod_rewrite(使用 mod_rewrite 替换查询字符串参数值)
.htaccess in subdirectory #39;overriding#39; parent htaccess(子目录“覆盖父 htaccess 中的 .htaccess)
How to rewrite SEO friendly url#39;s like stackoverflow(如何像stackoverflow一样重写SEO友好的url)
Is it okay to have a very long .htaccess file?(有一个很长的 .htaccess 文件可以吗?)