mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Add customer to sofort payments
This commit is contained in:
parent
882cf1d734
commit
a3e0d57133
@ -75,7 +75,6 @@ class Client extends BaseModel implements HasLocalePreference
|
|||||||
'shipping_postal_code',
|
'shipping_postal_code',
|
||||||
'shipping_country_id',
|
'shipping_country_id',
|
||||||
'settings',
|
'settings',
|
||||||
'payment_terms',
|
|
||||||
'vat_number',
|
'vat_number',
|
||||||
'id_number',
|
'id_number',
|
||||||
'group_settings_id',
|
'group_settings_id',
|
||||||
|
@ -42,6 +42,7 @@ class SOFORT
|
|||||||
$data['return_url'] = $this->buildReturnUrl();
|
$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['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['client'] = $this->stripe->client;
|
||||||
|
$data['customer'] = $this->stripe->findOrCreateCustomer()->id;
|
||||||
$data['country'] = $this->stripe->client->country->iso_3166_2;
|
$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']]);
|
$this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]);
|
||||||
|
@ -27,6 +27,7 @@ class ProcessSOFORT {
|
|||||||
handle = () => {
|
handle = () => {
|
||||||
let data = {
|
let data = {
|
||||||
type: 'sofort',
|
type: 'sofort',
|
||||||
|
customer: document.querySelector('meta[name="customer"]').content,
|
||||||
amount: document.querySelector('meta[name="amount"]').content,
|
amount: document.querySelector('meta[name="amount"]').content,
|
||||||
currency: 'eur',
|
currency: 'eur',
|
||||||
redirect: {
|
redirect: {
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
<meta name="return-url" content="{{ $return_url }}">
|
<meta name="return-url" content="{{ $return_url }}">
|
||||||
<meta name="amount" content="{{ $stripe_amount }}">
|
<meta name="amount" content="{{ $stripe_amount }}">
|
||||||
<meta name="country" content="{{ $country }}">
|
<meta name="country" content="{{ $country }}">
|
||||||
|
<meta name="customer" content="{{ $customer }}">
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('gateway_content')
|
@section('gateway_content')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user