wip
This commit is contained in:
@@ -194,7 +194,8 @@ class OnlinePaymentRepo
|
||||
OnlinePaymentHistory $paymentHistory,
|
||||
Branch $bank_branch,
|
||||
Model $resource,
|
||||
string $returnURL
|
||||
string $returnURL,
|
||||
$response,
|
||||
): array {
|
||||
return [
|
||||
'success' => true,
|
||||
@@ -206,6 +207,7 @@ class OnlinePaymentRepo
|
||||
'bank_branch' => $bank_branch,
|
||||
'resource' => $resource,
|
||||
'paymentHistory' => $paymentHistory,
|
||||
'response' => $response,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -218,7 +220,8 @@ class OnlinePaymentRepo
|
||||
OnlinePaymentHistory $paymentHistory,
|
||||
Branch $bank_branch,
|
||||
Model $resource,
|
||||
string $returnURL
|
||||
string $returnURL,
|
||||
$response,
|
||||
): array {
|
||||
return [
|
||||
'success' => false,
|
||||
@@ -229,7 +232,7 @@ class OnlinePaymentRepo
|
||||
'return_url' => $returnURL,
|
||||
'paymentHistory' => $paymentHistory,
|
||||
'bank_branch' => $bank_branch,
|
||||
'resource' => $resource,
|
||||
'response' => $response,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ trait HandlesSberPeyments
|
||||
]);
|
||||
|
||||
if ($response->failed()) {
|
||||
return static::failedPaymentResponse($paymentHistory, $bank_branch, $resource, $returnURL);
|
||||
return static::failedPaymentResponse($paymentHistory, $bank_branch, $resource, $returnURL, $response);
|
||||
}
|
||||
|
||||
$payment_status = $response['paymentAmountInfo']['depositedAmount'] > 0;
|
||||
@@ -64,7 +64,7 @@ trait HandlesSberPeyments
|
||||
'api_response' => $response->body(),
|
||||
]);
|
||||
|
||||
return static::successfulPaymentResponse($paymentHistory, $bank_branch, $resource, $returnURL);
|
||||
return static::successfulPaymentResponse($paymentHistory, $bank_branch, $resource, $returnURL, $response);
|
||||
}
|
||||
|
||||
$resource->update([
|
||||
@@ -80,6 +80,6 @@ trait HandlesSberPeyments
|
||||
'api_response' => $response->body(),
|
||||
]);
|
||||
|
||||
return static::failedPaymentResponse($paymentHistory, $bank_branch, $resource, $returnURL);
|
||||
return static::failedPaymentResponse($paymentHistory, $bank_branch, $resource, $returnURL, $response);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ trait HandlesVisaMasterPayments
|
||||
]);
|
||||
|
||||
if ($response->failed()) {
|
||||
return static::failedPaymentResponse($paymentHistory, $bank_branch, $resource, $returnURL);
|
||||
return static::failedPaymentResponse($paymentHistory, $bank_branch, $resource, $returnURL, $response);
|
||||
}
|
||||
|
||||
$payment_status = $response['paymentAmountInfo']['depositedAmount'] > 0;
|
||||
@@ -65,7 +65,7 @@ trait HandlesVisaMasterPayments
|
||||
'api_response' => $response->json(),
|
||||
]);
|
||||
|
||||
return static::successfulPaymentResponse($paymentHistory, $bank_branch, $resource, $returnURL);
|
||||
return static::successfulPaymentResponse($paymentHistory, $bank_branch, $resource, $returnURL, $response);
|
||||
}
|
||||
|
||||
$resource->update([
|
||||
@@ -81,6 +81,6 @@ trait HandlesVisaMasterPayments
|
||||
'api_response' => $response->json(),
|
||||
]);
|
||||
|
||||
return static::failedPaymentResponse($paymentHistory, $bank_branch, $resource, $returnURL);
|
||||
return static::failedPaymentResponse($paymentHistory, $bank_branch, $resource, $returnURL, $response);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user