handle payments and gateway fee integration
This commit is contained in:
parent
c55f660f7f
commit
0b56e8d4cb
2 changed files with 12 additions and 0 deletions
|
|
@ -136,6 +136,9 @@ class AuthorizeCreditCard
|
|||
$response = $data['response'];
|
||||
|
||||
if ($response != null && $response->getMessages()->getResultCode() == 'Ok') {
|
||||
|
||||
$this->authorize->confirmGatewayFee($request);
|
||||
|
||||
return $this->processSuccessfulResponse($data, $request);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -182,17 +182,26 @@ class CheckoutComPaymentDriver extends BaseDriver
|
|||
$state['payment_response'] = $response;
|
||||
|
||||
if ($response->status === 'Authorized') {
|
||||
$this->confirmGatewayFee($request);
|
||||
|
||||
return $this->processSuccessfulPayment($state);
|
||||
}
|
||||
|
||||
if ($response->status === 'Pending') {
|
||||
$this->confirmGatewayFee($request);
|
||||
|
||||
return $this->processPendingPayment($state);
|
||||
}
|
||||
|
||||
if ($response->status === 'Declined') {
|
||||
$this->unWindGatewayFees($request->payment_hash);
|
||||
|
||||
return $this->processUnsuccessfulPayment($state);
|
||||
}
|
||||
} catch (CheckoutHttpException $e) {
|
||||
|
||||
$this->unWindGatewayFees($request->payment_hash);
|
||||
|
||||
return $this->processInternallyFailedPayment($e, $state);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue