fixed wrong payment type

This commit is contained in:
Lars Kusch 2021-10-06 08:53:36 +02:00
parent ebdc586554
commit 71d5ba0c78

View File

@ -48,7 +48,7 @@ class SEPA
$intent = \Stripe\PaymentIntent::create([ $intent = \Stripe\PaymentIntent::create([
'amount' => $data['stripe_amount'], 'amount' => $data['stripe_amount'],
'currency' => 'eur', 'currency' => 'eur',
'payment_method_types' => ['sepa'], 'payment_method_types' => ['sepa_debit'],
'customer' => $this->stripe->findOrCreateCustomer(), 'customer' => $this->stripe->findOrCreateCustomer(),
'description' => $this->stripe->decodeUnicodeString(ctrans('texts.invoices') . ': ' . collect($data['invoices'])->pluck('invoice_number')), 'description' => $this->stripe->decodeUnicodeString(ctrans('texts.invoices') . ': ' . collect($data['invoices'])->pluck('invoice_number')),
@ -89,10 +89,10 @@ class SEPA
$data = [ $data = [
'payment_method' => $payment_intent, 'payment_method' => $payment_intent,
'payment_type' => PaymentType::SOFORT, 'payment_type' => PaymentType::SEPA,
'amount' => $this->stripe->convertFromStripeAmount($this->stripe->payment_hash->data->stripe_amount, $this->stripe->client->currency()->precision, $this->stripe->client->currency()), 'amount' => $this->stripe->convertFromStripeAmount($this->stripe->payment_hash->data->stripe_amount, $this->stripe->client->currency()->precision, $this->stripe->client->currency()),
'transaction_reference' => $payment_intent, 'transaction_reference' => $payment_intent,
'gateway_type_id' => GatewayType::SOFORT, 'gateway_type_id' => GatewayType::SEPA,
]; ];
$this->stripe->createPayment($data, Payment::STATUS_PENDING); $this->stripe->createPayment($data, Payment::STATUS_PENDING);