在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中完成购买后重定向到原始站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)