wip
This commit is contained in:
@@ -33,6 +33,7 @@ trait HandlesVisaMasterPayments
|
|||||||
}
|
}
|
||||||
|
|
||||||
$bank_branch = $resource->parent->branch;
|
$bank_branch = $resource->parent->branch;
|
||||||
|
$returnURL = url('/work-place/resources/nova-visa-master-payment-orders/'.$resource->visa_master_payment_order_id);
|
||||||
|
|
||||||
$response = Http::asForm()->post('https://mpi.gov.tm/payment/rest/getOrderStatusExtended.do', [
|
$response = Http::asForm()->post('https://mpi.gov.tm/payment/rest/getOrderStatusExtended.do', [
|
||||||
'language' => 'ru',
|
'language' => 'ru',
|
||||||
@@ -41,11 +42,13 @@ trait HandlesVisaMasterPayments
|
|||||||
'password' => $bank_branch->billing_visa_master_password,
|
'password' => $bank_branch->billing_visa_master_password,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$payment_status = $response['ErrorCode'] == '0';
|
if ($response->failed()) {
|
||||||
$cardholderName = $response['cardAuthInfo']['cardholderName'] ?? '-';
|
return static::failedPaymentResponse($paymentHistory, $bank_branch, $resource, $returnURL);
|
||||||
$cardPan = $response['cardAuthInfo']['Pan'] ?? '-';
|
}
|
||||||
|
|
||||||
$returnURL = url('/work-place/resources/nova-visa-master-payment-orders/'.$resource->visa_master_payment_order_id);
|
$payment_status = $response['errorCode'] == '0';
|
||||||
|
$cardholderName = $response['cardAuthInfo']['cardholder§§Name'] ?? '-';
|
||||||
|
$cardPan = $response['cardAuthInfo']['Pan'] ?? '-';
|
||||||
|
|
||||||
if ($payment_status) {
|
if ($payment_status) {
|
||||||
$resource->update([
|
$resource->update([
|
||||||
|
|||||||
Reference in New Issue
Block a user