diff --git a/app/Models/PaymentType.php b/app/Models/PaymentType.php index faaeb9052f0a..96dfb3d8a592 100644 --- a/app/Models/PaymentType.php +++ b/app/Models/PaymentType.php @@ -45,8 +45,9 @@ class PaymentType extends StaticModel const MOLLIE_BANK_TRANSFER = 34; const KBC = 35; const BANCONTACT = 36; - const IDEAL = 37; + const IDEAL = 37; const HOSTED_PAGE = 38; + const PRZELEWY24 = 40; public static function parseCardType($cardName) { diff --git a/app/PaymentDrivers/Stripe/PRZELEWY24.php b/app/PaymentDrivers/Stripe/PRZELEWY24.php index 21535f03210d..bff777fa4b3c 100644 --- a/app/PaymentDrivers/Stripe/PRZELEWY24.php +++ b/app/PaymentDrivers/Stripe/PRZELEWY24.php @@ -33,7 +33,7 @@ class PRZELEWY24 public function authorizeView($data) { - return render('gateways.stripe.sofort.authorize', $data); + return render('gateways.stripe.przelewy24.authorize', $data); } public function paymentView(array $data) @@ -48,7 +48,7 @@ class PRZELEWY24 $intent = \Stripe\PaymentIntent::create([ 'amount' => $data['stripe_amount'], 'currency' => 'eur', - 'payment_method_types' => ['sofort'], + 'payment_method_types' => ['p24'], 'customer' => $this->stripe->findOrCreateCustomer(), 'description' => $this->stripe->decodeUnicodeString(ctrans('texts.invoices') . ': ' . collect($data['invoices'])->pluck('invoice_number')), @@ -59,7 +59,7 @@ class PRZELEWY24 $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); $this->stripe->payment_hash->save(); - return render('gateways.stripe.sofort.pay', $data); + return render('gateways.stripe.przelewy24.pay', $data); } private function buildReturnUrl(): string @@ -67,7 +67,7 @@ class PRZELEWY24 return route('client.payments.response', [ 'company_gateway_id' => $this->stripe->company_gateway->id, 'payment_hash' => $this->stripe->payment_hash->hash, - 'payment_method_id' => GatewayType::SOFORT, + 'payment_method_id' => GatewayType::PRZELEWY24, ]); } @@ -91,10 +91,10 @@ class PRZELEWY24 $data = [ 'payment_method' => $payment_intent, - 'payment_type' => PaymentType::SOFORT, + 'payment_type' => PaymentType::PRZELEWY24, 'amount' => $this->stripe->convertFromStripeAmount($this->stripe->payment_hash->data->stripe_amount, $this->stripe->client->currency()->precision, $this->stripe->client->currency()), 'transaction_reference' => $payment_intent, - 'gateway_type_id' => GatewayType::SOFORT, + 'gateway_type_id' => GatewayType::PRZELEWY24, ]; $this->stripe->createPayment($data, Payment::STATUS_PENDING);