wip
This commit is contained in:
@@ -25,7 +25,25 @@ class OnlinePaymentController extends Controller
|
||||
{
|
||||
$data = OnlinePaymentRepo::checkPaymentVisaMaster($request);
|
||||
|
||||
// OnlinePaymentRepo::syncWithBilling();
|
||||
/** @var \App\Models\Payment\OnlinePaymentHistory */
|
||||
$paymentHistory = $data['paymentHistory'];
|
||||
|
||||
/** @var \App\Models\Branch\Branch */
|
||||
$bank = $data['bank_branch'];
|
||||
|
||||
info([$paymentHistory->api_response]);
|
||||
|
||||
// if ($data['success'] && $paymentHistory) {
|
||||
// info(OnlinePaymentRepo::syncWithBilling(
|
||||
// uuid: $paymentHistory->orderId,
|
||||
// bank_code: $bank->unique_code,
|
||||
// terminal_id: $paymentHistory->api_response,
|
||||
// account_number:,
|
||||
// rrn,
|
||||
// amount,
|
||||
// pay_purpose:
|
||||
// ));
|
||||
// }
|
||||
|
||||
return view(OnlinePaymentRepo::statusView(), $data);
|
||||
}
|
||||
|
||||
@@ -55,8 +55,6 @@ trait HandlesBillingSyncing
|
||||
|
||||
curl_close($curl);
|
||||
|
||||
info($response);
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,8 +186,6 @@ class OnlinePaymentRepo
|
||||
|
||||
/**
|
||||
* Successfully payment response
|
||||
*
|
||||
* @return array{success: bool, title: string, pnr: string, branch_name: string, price_amount: string, return_url: string}
|
||||
*/
|
||||
public static function successfulPaymentResponse(
|
||||
OnlinePaymentHistory $paymentHistory,
|
||||
@@ -202,13 +200,14 @@ class OnlinePaymentRepo
|
||||
'branch_name' => $bank_branch->name,
|
||||
'price_amount' => \convertToOriginalFormat($paymentHistory->amount).' TMT',
|
||||
'return_url' => $returnURL,
|
||||
'bank_branch' => $bank_branch,
|
||||
'resource' => $resource,
|
||||
'paymentHistory' => $paymentHistory,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Failed payment response
|
||||
*
|
||||
* @return array{success: bool, title: string, pnr: string, branch_name: string, price_amount: string, return_url: string}
|
||||
*/
|
||||
public static function failedPaymentResponse(
|
||||
OnlinePaymentHistory $paymentHistory,
|
||||
@@ -223,13 +222,14 @@ class OnlinePaymentRepo
|
||||
'branch_name' => $bank_branch->name,
|
||||
'price_amount' => convertToOriginalFormat($paymentHistory->amount).' TMT',
|
||||
'return_url' => $returnURL,
|
||||
'paymentHistory' => $paymentHistory,
|
||||
'bank_branch' => $bank_branch,
|
||||
'resource' => $resource,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Resource not found
|
||||
*
|
||||
* @return array{success: bool, title: string, pnr: string, branch_name: string, price_amount: string, return_url: string}
|
||||
*/
|
||||
protected static function resourceNotFound(): array
|
||||
{
|
||||
@@ -240,6 +240,9 @@ class OnlinePaymentRepo
|
||||
'branch_name' => '',
|
||||
'price_amount' => '',
|
||||
'return_url' => url('/'),
|
||||
'bank_branch' => null,
|
||||
'resource' => null,
|
||||
'paymentHistory' => null,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,8 +14,6 @@ trait HandlesVisaMasterPayments
|
||||
* Check payment payment visa master
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return array{success: bool, title: string, pnr: string, branch_name: string, price_amount: string, return_url: string}
|
||||
*/
|
||||
public static function checkPaymentVisaMaster(Request $request): array
|
||||
{
|
||||
|
||||
1
resources/views/welcome.blade.php
Normal file
1
resources/views/welcome.blade.php
Normal file
@@ -0,0 +1 @@
|
||||
<h2>Welcome</h2>
|
||||
Reference in New Issue
Block a user