diff --git a/app/Models/Client.php b/app/Models/Client.php index 2cf3509897fe..dfbba29ed506 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -75,7 +75,6 @@ class Client extends BaseModel implements HasLocalePreference 'shipping_postal_code', 'shipping_country_id', 'settings', - 'payment_terms', 'vat_number', 'id_number', 'group_settings_id', diff --git a/app/PaymentDrivers/Stripe/SOFORT.php b/app/PaymentDrivers/Stripe/SOFORT.php index 821698e16054..f9d6bfd2e0a6 100644 --- a/app/PaymentDrivers/Stripe/SOFORT.php +++ b/app/PaymentDrivers/Stripe/SOFORT.php @@ -42,6 +42,7 @@ class SOFORT $data['return_url'] = $this->buildReturnUrl(); $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); $data['client'] = $this->stripe->client; + $data['customer'] = $this->stripe->findOrCreateCustomer()->id; $data['country'] = $this->stripe->client->country->iso_3166_2; $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); diff --git a/resources/js/clients/payments/stripe-sofort.js b/resources/js/clients/payments/stripe-sofort.js index ec8aeb4efa53..2caf346ed232 100644 --- a/resources/js/clients/payments/stripe-sofort.js +++ b/resources/js/clients/payments/stripe-sofort.js @@ -27,6 +27,7 @@ class ProcessSOFORT { handle = () => { let data = { type: 'sofort', + customer: document.querySelector('meta[name="customer"]').content, amount: document.querySelector('meta[name="amount"]').content, currency: 'eur', redirect: { diff --git a/resources/views/portal/ninja2020/gateways/stripe/sofort/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/sofort/pay.blade.php index 36f9352cac76..dd2f5fe36e26 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/sofort/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/sofort/pay.blade.php @@ -6,6 +6,7 @@ + @endsection @section('gateway_content')