mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Merge pull request #7383 from beganovich/square-idempotency-key
Fixes for Square idempotency
This commit is contained in:
commit
917e846598
@ -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'));
|
||||
|
@ -22,6 +22,7 @@
|
||||
<input type="hidden" name="token">
|
||||
<input type="hidden" name="sourceId" id="sourceId">
|
||||
<input type="hidden" name="verificationToken" id="verificationToken">
|
||||
<input type="hidden" name="idempotencyKey" value="{{ \Illuminate\Support\Str::uuid() }}">
|
||||
</form>
|
||||
|
||||
<div class="alert alert-failure mb-4" hidden id="errors"></div>
|
||||
|
Loading…
Reference in New Issue
Block a user