mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
checkout.com payments using token
This commit is contained in:
parent
97db2ad3b6
commit
88b428aae0
@ -309,11 +309,11 @@ class BaseDriver extends AbstractPaymentDriver
|
||||
);
|
||||
|
||||
SystemLogger::dispatch(
|
||||
$this->checkout->payment_hash,
|
||||
$gateway->payment_hash,
|
||||
SystemLog::CATEGORY_GATEWAY_RESPONSE,
|
||||
SystemLog::EVENT_GATEWAY_ERROR,
|
||||
$gateway::SYSTEM_LOG_TYPE,
|
||||
$this->checkout->client,
|
||||
$gateway->client,
|
||||
);
|
||||
|
||||
throw new PaymentFailed($error, $e->getCode());
|
||||
|
@ -146,7 +146,7 @@ class CreditCard
|
||||
} catch (\Checkout\Library\Exceptions\CheckoutHttpException $e) {
|
||||
$this->checkout->unWindGatewayFees($this->checkout->payment_hash);
|
||||
|
||||
return $this->processInternallyFailedPayment($e);
|
||||
return $this->checkout->processInternallyFailedPayment($this->checkout, $e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -134,11 +134,11 @@ trait Utilities
|
||||
|
||||
$data = [
|
||||
'payment_meta' => $payment_meta,
|
||||
'token' => $response->id,
|
||||
'token' => $response->source['id'],
|
||||
'payment_method_id' => $this->checkout->payment_hash->data->payment_method_id,
|
||||
];
|
||||
|
||||
return $this->checokut->saveCard($data);
|
||||
return $this->checkout->storePaymentMethod($data);
|
||||
} catch (\Exception $e) {
|
||||
session()->flash('message', ctrans('texts.payment_method_saving_failed'));
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
<input type="hidden" name="raw_value" value="{{ $raw_value }}">
|
||||
<input type="hidden" name="currency" value="{{ $currency }}">
|
||||
@isset($token)
|
||||
<input type="hidden" name="token" value="{{ $token->meta->id }}">
|
||||
<input type="hidden" name="token" value="{{ $token->token }}">
|
||||
@endisset
|
||||
</form>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user