1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 00:41:34 +02:00

Fix Stripe saving card & token store

This commit is contained in:
Benjamin Beganović 2020-06-24 14:37:01 +02:00
parent f61ecef4f2
commit 4d2d41123b

View File

@ -162,7 +162,7 @@ class CreditCard
$payment_type = PaymentType::parseCardType($payment_method_object['card']['brand']);
if ($state['save_card'] === true) {
if ($state['save_card'] == true) {
$this->saveCard($state);
}
@ -216,7 +216,7 @@ class CreditCard
$company_gateway_token = new ClientGatewayToken();
$company_gateway_token->company_id = $this->stripe->client->company->id;
$company_gateway_token->client_id = $this->stripe->client->id;
$company_gateway_token->token = $state['payment_method'];
$company_gateway_token->token = $state['payment_method']->id;
$company_gateway_token->company_gateway_id = $this->stripe->company_gateway->id;
$company_gateway_token->gateway_type_id = $state['gateway_type_id'];
$company_gateway_token->gateway_customer_reference = $state['customer'];