我正在制作一款网络应用.我已经使用简单的表单提交到 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 .
只需按照以下步骤启用
对于沙盒帐户,请执行以下操作
For sandbox account do the following
这篇关于在Paypal中完成购买后重定向到原始站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!