Merge pull request #4055 from turbo124/v2

Fixes for checkout.com
This commit is contained in:
David Bomba 2020-09-11 16:32:04 +10:00 committed by GitHub
commit fac03fce96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,6 +158,8 @@ class CheckoutComPaymentDriver extends BaseDriver
'reference' => $request->payment_hash,
];
$payment_hash = PaymentHash::whereRaw('BINARY `hash`= ?', [$request->payment_hash])->first();
$state = array_merge($state, $request->all());
$state['store_card'] = boolval($state['store_card']);
@ -196,13 +198,13 @@ class CheckoutComPaymentDriver extends BaseDriver
}
if ($response->status === 'Declined') {
$this->unWindGatewayFees($request->payment_hash);
$this->unWindGatewayFees($payment_hash);
return $this->processUnsuccessfulPayment($state);
}
} catch (CheckoutHttpException $e) {
$this->unWindGatewayFees($request->payment_hash);
$this->unWindGatewayFees($payment_hash);
return $this->processInternallyFailedPayment($e, $state);
}