From 5a393d762adef0a86ef2fd46c8abe41db69b5e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Thu, 21 Apr 2022 14:22:00 +0200 Subject: [PATCH] Use idempotency key from frontend in payment request body --- app/PaymentDrivers/Square/CreditCard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/PaymentDrivers/Square/CreditCard.php b/app/PaymentDrivers/Square/CreditCard.php index 01696fd43178..3650fe44b5de 100644 --- a/app/PaymentDrivers/Square/CreditCard.php +++ b/app/PaymentDrivers/Square/CreditCard.php @@ -105,7 +105,7 @@ class CreditCard implements MethodInterface $amount_money->setAmount($amount); $amount_money->setCurrency($this->square_driver->client->currency()->code); - $body = new \Square\Models\CreatePaymentRequest($token, Str::random(32), $amount_money); + $body = new \Square\Models\CreatePaymentRequest($token, $request->idempotencyKey, $amount_money); $body->setAutocomplete(true); $body->setLocationId($this->square_driver->company_gateway->getConfigField('locationId'));