From 54014d93ee72ef885ef42a1644207e4278075ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Mon, 16 Nov 2020 14:10:45 +0100 Subject: [PATCH] pass correct $customer->id --- app/PaymentDrivers/Stripe/CreditCard.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/PaymentDrivers/Stripe/CreditCard.php b/app/PaymentDrivers/Stripe/CreditCard.php index 6b72bee7107b..7925846a7a2f 100644 --- a/app/PaymentDrivers/Stripe/CreditCard.php +++ b/app/PaymentDrivers/Stripe/CreditCard.php @@ -131,10 +131,13 @@ class CreditCard $this->stripe->payment_hash->save(); if ($this->stripe->payment_hash->data->store_card) { - $customer = $this->stripe->findOrCreateCustomer(); + $customer = new \stdClass; + $customer->id = $this->stripe->payment_hash->data->customer; $this->stripe->attach($this->stripe->payment_hash->data->server_response->payment_method, $customer); - + + $stripe_method = $this->stripe->getStripePaymentMethod($this->stripe->payment_hash->data->server_response->payment_method); + $this->storePaymentMethod($stripe_method, $this->stripe->payment_hash->data->payment_method_id, $customer); }