1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 16:31:33 +02:00

Prevent duplicate payment records on hosted Stripe checkouts

This commit is contained in:
David Bomba 2021-10-11 07:32:13 +11:00
parent 5f0c79c1d0
commit 9d551b6e1d
5 changed files with 20 additions and 0 deletions

View File

@ -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 = [

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,