1
0
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:
Benjamin Beganović 2020-10-27 13:44:16 +01:00
parent 97db2ad3b6
commit 88b428aae0
4 changed files with 6 additions and 6 deletions

View File

@ -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());

View File

@ -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);
}
}
}

View File

@ -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'));
}

View File

@ -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>