diff --git a/app/Exceptions/DuplicatePaymentException.php b/app/Exceptions/DuplicatePaymentException.php new file mode 100644 index 000000000000..ba4f33ab2bdf --- /dev/null +++ b/app/Exceptions/DuplicatePaymentException.php @@ -0,0 +1,44 @@ +json([ + 'message' => 'Duplicate request', + ], 400); + + } +} diff --git a/tests/Feature/PaymentTest.php b/tests/Feature/PaymentTest.php index 513a331df231..655fb0dd795e 100644 --- a/tests/Feature/PaymentTest.php +++ b/tests/Feature/PaymentTest.php @@ -1880,8 +1880,6 @@ class PaymentTest extends TestCase $response->assertStatus(200); -sleep(1); - $response = $this->withHeaders([ 'X-API-SECRET' => config('ninja.api_secret'), 'X-API-TOKEN' => $this->token, diff --git a/tests/Feature/PurchaseOrderTest.php b/tests/Feature/PurchaseOrderTest.php index 7b48a45c64e4..fc6d44dce848 100644 --- a/tests/Feature/PurchaseOrderTest.php +++ b/tests/Feature/PurchaseOrderTest.php @@ -97,7 +97,9 @@ class PurchaseOrderTest extends TestCase public function testPurchaseOrderBulkActions() { - $i = $this->purchase_order->invitations->first(); + $this->purchase_order->service()->createInvitations()->save(); + + $i = $this->purchase_order->fresh()->invitations->first(); $data = [ 'ids' =>[$this->purchase_order->hashed_id],