【发布时间】:2016-07-20 21:07:12
【问题描述】:
我正在用 laravel 5 做我的项目,在这里我必须用 paypal 付款。我得到了这个代码并且我的付款做得很好。但是当有人转到贝宝并且如果他没有付款就返回cancel_return 工作。没关系。但是我不知道返回时如何处理$_GET 这也是我的路线
Route::get('/paypal/cancel','Paypal\PaypalController@paypalCancel');
我正在使用此代码通过我的沙盒帐户移动到贝宝页面。
form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" id="paypal">
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="cbt" value="Return to example" />
<input type="hidden" name="business" value="xxx@gmail.com" />
<input type="hidden" name="item_name" value="{{$data['p_name']}}" />
<input type="hidden" name="amount" value="{{$data['tot']}}">
<input type="hidden" name="button_subtype" value="services" />
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="return" value="{{url('/paypal/return')}}" />
<input type="hidden" name="notify_url" value="{{url('/paypal/notify')}}"/>
<input type="hidden" name="cancel_return" value="{{url('/paypal/cancel')}}" />
<input type="hidden" name="currency_code" value="USD"/>
<input type="hidden" name="image_url" value="" />
<input type="hidden" id="custom" name="custom" value="{{$data['id']}}"/>
<input type="hidden" class="btn btn-primary" style="width:100%" alt="PayPal - The safer, easier way to pay online!"/>
</form>
告诉我当用户在贝宝登录中取消付款并返回时我应该怎么做..谢谢..
【问题讨论】:
-
有没有人可以帮助我。这毁了我的一天,伙计们..
-
我认为您应该参考贝宝文档以了解如何取消付款。 Paypal 提供了开发人员可以使用的 API,您只需了解其工作原理即可。
-
很抱歉,我使用 Paypal 已经有一段时间无法为您提供代码了
-
我只是想知道取消付款时我从贝宝得到什么样的东西..作为回报它会发送卖家详细信息、买家详细信息、支付金额,我们可以从 $_POST[ ] .. 在这种情况下发生了什么。?
标签: php paypal laravel-5 return paypal-sandbox