diff --git a/app/PaymentDrivers/Stripe/Bancontact.php b/app/PaymentDrivers/Stripe/Bancontact.php index c54592d8d4..cfcab8361a 100644 --- a/app/PaymentDrivers/Stripe/Bancontact.php +++ b/app/PaymentDrivers/Stripe/Bancontact.php @@ -87,6 +87,10 @@ class Bancontact { /* @todo: https://github.com/invoiceninja/invoiceninja/pull/3789/files#r436175798 */ + //catch duplicate submissions. + if(Payment::where('transaction_reference', $payment_intent)->exists()) + return redirect()->route('client.payments.index'); + $this->stripe->init(); $data = [ diff --git a/app/PaymentDrivers/Stripe/EPS.php b/app/PaymentDrivers/Stripe/EPS.php index 10e7b560e2..f9e294862b 100644 --- a/app/PaymentDrivers/Stripe/EPS.php +++ b/app/PaymentDrivers/Stripe/EPS.php @@ -89,6 +89,10 @@ class EPS $this->stripe->init(); + //catch duplicate submissions. + if(Payment::where('transaction_reference', $payment_intent)->exists()) + return redirect()->route('client.payments.index'); + $data = [ 'payment_method' => $payment_intent, 'payment_type' => PaymentType::EPS, diff --git a/app/PaymentDrivers/Stripe/GIROPAY.php b/app/PaymentDrivers/Stripe/GIROPAY.php index ceb2b9f09c..840c4a3c2c 100644 --- a/app/PaymentDrivers/Stripe/GIROPAY.php +++ b/app/PaymentDrivers/Stripe/GIROPAY.php @@ -89,6 +89,10 @@ class GIROPAY $this->stripe->init(); + //catch duplicate submissions. + if(Payment::where('transaction_reference', $payment_intent)->exists()) + return redirect()->route('client.payments.index'); + $data = [ 'payment_method' => $payment_intent, 'payment_type' => PaymentType::GIROPAY, diff --git a/app/PaymentDrivers/Stripe/PRZELEWY24.php b/app/PaymentDrivers/Stripe/PRZELEWY24.php index bff777fa4b..67dbf45168 100644 --- a/app/PaymentDrivers/Stripe/PRZELEWY24.php +++ b/app/PaymentDrivers/Stripe/PRZELEWY24.php @@ -89,6 +89,10 @@ class PRZELEWY24 $this->stripe->init(); + //catch duplicate submissions. + if(Payment::where('transaction_reference', $payment_intent)->exists()) + return redirect()->route('client.payments.index'); + $data = [ 'payment_method' => $payment_intent, 'payment_type' => PaymentType::PRZELEWY24, diff --git a/app/PaymentDrivers/Stripe/iDeal.php b/app/PaymentDrivers/Stripe/iDeal.php index 35f10c5f67..d19971c065 100644 --- a/app/PaymentDrivers/Stripe/iDeal.php +++ b/app/PaymentDrivers/Stripe/iDeal.php @@ -89,6 +89,10 @@ class iDeal $this->stripe->init(); + //catch duplicate submissions. + if(Payment::where('transaction_reference', $payment_intent)->exists()) + return redirect()->route('client.payments.index'); + $data = [ 'payment_method' => $payment_intent, 'payment_type' => PaymentType::IDEAL,