如何删除PHP代码上的安装支付流程 [英] How to remove the installation payment process on an PHP code
本文介绍了如何删除PHP代码上的安装支付流程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有PHP脚本在安装之前指向网站付款,我想绕过重定向到付款。我做了什么改变才能使它工作
I have PHP script that direct to the website for payment before you install it, i want to bypass the redirection to the payment. What do i change to make it work
Route::any('check/purchase-code', function() {if ($code = \Input::get('code')) {ini_set('user_agent', 'Mozilla/5.0');$result = file_get_contents("http://example.com/demo/install/check?code=".$code.'&domain='.\Request::server('HTTP_HOST'));if ($result == 1) {\Session::put('valid-usage','1');return \Redirect::route('install-db-info');}}return \Redirect::to('/install');});
Route::filter('user-auth', function()
{
if (!Auth::check()) {
if (Request::ajax()) {
return json_encode(['content' => 'login']);
} else {
return Redirect::guest('/');
}
};
/**
* User is login we need to know if user has getstarted or not
*/
if (Config::get('user-getstarted')) {
if (Auth::user()->fully_started != 1 and !Request::ajax()) {
return \Redirect::route('user.getstarted');
}
}
推荐答案
code = \Input :: get(' code')){ini_set(' user_agent',' Mozilla / 5.0');
code = \Input::get('code')) {ini_set('user_agent', 'Mozilla/5.0');
result = file_get_contents( http://example.com/demo/install/check?code=。
代码。' & domain ='。\ Request = server(' HTTP_HOST')); if (
code.'&domain='.\Request::server('HTTP_HOST'));if (
这篇关于如何删除PHP代码上的安装支付流程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文