购买后重定向到原始网站在Paypal完成 [英] Redirection to the original site after purchase is completed in Paypal
问题描述
我正在制作一个网络应用程序。我已经集成Paypal在其中使用简单的表单提交到贝宝网站。一切都很好。但每当付款成功,它应该重定向回到我的原始网站与Paypal的响应。但是,它不工作,因为它应该是。目前仅保留在Paypal网站上。
< 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 =imagesrc =https://paypal.com/en_US/i/btn/btn_buynowCC_LG.gifname =submit>
我缺少什么?我使用CakePHP 2.0。
您必须在paypal中启用自动返回功能设置。
只需按照以下步骤启用
- 登入并按一下
- 点击开启单选按钮,启用自动返回功能。 >
- 输入返回URL。注意:您必须满足返回URL要求才能设置自动返回。详细了解返回网址。
对于沙盒帐户,请执行以下操作:
<
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">
what am I missing in it? I'm using CakePHP 2.0.
You have to enable auto return functionality setting in paypal .
Just follow the below steps to enable
- Log in and click the Profile subtab under My Account.
- Click the Website Payment Preferences link under Selling Preferences.
- Click the On radio button to enable Auto Return.
- Enter the Return URL. Note: You must meet the Return URL requirements in order to set up Auto Return. Learn more about Return URL.
For sandbox account do the following
- Log in to the Sandbox Merchant Id and click the Profile subtab under My Account.
- Click the More Option link under Profile.
- Look Selling Preferences which is third row.
- Click the Website Payment Preferences link under Selling Preferences
- Click the On radio button to enable Auto Return.
- Click the On radio button to enable Auto Return.
- Enter the Return URL. Note: You must meet the Return URL requirements in order to set up Auto Return. Learn more about Return URL.
这篇关于购买后重定向到原始网站在Paypal完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!