From cf3f6dc84aa288ae64381e7a46b0719cb15d2967 Mon Sep 17 00:00:00 2001 From: Lars Kusch Date: Fri, 15 Oct 2021 15:38:01 +0200 Subject: [PATCH] Corrected redirect after payment --- app/PaymentDrivers/Stripe/ACSS.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/PaymentDrivers/Stripe/ACSS.php b/app/PaymentDrivers/Stripe/ACSS.php index 5359e2e9d9f8..c91a3f1efaec 100644 --- a/app/PaymentDrivers/Stripe/ACSS.php +++ b/app/PaymentDrivers/Stripe/ACSS.php @@ -191,8 +191,6 @@ class ACSS public function processSuccessfulPayment(string $payment_intent) { - /* @todo: https://github.com/invoiceninja/invoiceninja/pull/3789/files#r436175798 */ - $data = [ 'payment_method' => $payment_intent, 'payment_type' => PaymentType::ACSS, @@ -201,7 +199,7 @@ class ACSS 'gateway_type_id' => GatewayType::ACSS, ]; - $this->stripe->createPayment($data, Payment::STATUS_PENDING); + $payment = $this->stripe->createPayment($data, Payment::STATUS_PENDING); SystemLogger::dispatch( ['response' => $this->stripe->payment_hash->data, 'data' => $data], @@ -212,7 +210,7 @@ class ACSS $this->stripe->client->company, ); - return redirect()->route('client.payments.index'); + return redirect()->route('client.payments.show', $payment->hashed_id); } public function processUnsuccessfulPayment()