Add customer to sofort payments

This commit is contained in:
David Bomba 2021-09-15 14:39:34 +10:00
parent 882cf1d734
commit a3e0d57133
4 changed files with 3 additions and 1 deletions

View File

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

View File

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

View File

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

View File

@ -6,6 +6,7 @@
<meta name="return-url" content="{{ $return_url }}">
<meta name="amount" content="{{ $stripe_amount }}">
<meta name="country" content="{{ $country }}">
<meta name="customer" content="{{ $customer }}">
@endsection
@section('gateway_content')