mirror of
https://github.com/v2board/v2board.git
synced 2025-06-15 22:27:50 +08:00
feature: added epay & mGate payment
This commit is contained in:
@ -6,11 +6,12 @@ use App\Services\OrderService;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Order;
|
||||
use Library\Epay;
|
||||
use Omnipay\Omnipay;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Library\BitpayX;
|
||||
use Library\PayTaro;
|
||||
use Library\MGate;
|
||||
|
||||
class OrderController extends Controller
|
||||
{
|
||||
@ -128,12 +129,22 @@ class OrderController extends Controller
|
||||
]));
|
||||
}
|
||||
|
||||
public function payTaroNotify(Request $request)
|
||||
public function mgateNotify(Request $request)
|
||||
{
|
||||
// Log::info('payTaroNotify: ' . json_encode($request->input()));
|
||||
$mgate = new MGate(config('v2board.mgate_url'), config('v2board.mgate_app_id'), config('v2board.mgate_app_secret'));
|
||||
if (!$mgate->verify($request->input())) {
|
||||
abort(500, 'fail');
|
||||
}
|
||||
if (!$this->handle($request->input('out_trade_no'), $request->input('trade_no'))) {
|
||||
abort(500, 'fail');
|
||||
}
|
||||
die('success');
|
||||
}
|
||||
|
||||
$payTaro = new PayTaro(config('v2board.paytaro_app_id'), config('v2board.paytaro_app_secret'));
|
||||
if (!$payTaro->verify($request->input())) {
|
||||
public function epayNotify(Request $request)
|
||||
{
|
||||
$epay = new Epay(config('v2board.epay_url'), config('v2board.epay_pid'), config('v2board.epay_key'));
|
||||
if (!$epay->verify($request->input())) {
|
||||
abort(500, 'fail');
|
||||
}
|
||||
if (!$this->handle($request->input('out_trade_no'), $request->input('trade_no'))) {
|
||||
|
Reference in New Issue
Block a user