From f6af73f85e412b7e87b8170c69c2647056641dfa Mon Sep 17 00:00:00 2001 From: Ben Allison Date: Fri, 19 Nov 2021 17:20:56 -0800 Subject: [PATCH] Don't duplicate requests to charge or void payments Fixes #30 --- src/PaymentClient.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/PaymentClient.php b/src/PaymentClient.php index 026eb73..1d56963 100644 --- a/src/PaymentClient.php +++ b/src/PaymentClient.php @@ -92,7 +92,6 @@ public function charge(Charge $charge, string $requestId = "") : ResponseInterfa } $request = ChargeOperations::createChargeRequest($charge, $requestId, $this->getContext()); - $response = $this->httpClient->send($request); $this->before($request, $this); $response = $this->httpClient->send($request); $this->after($response, $this); @@ -107,7 +106,6 @@ public function voidChargeTransaction(string $chargeRequestId, string $requestId } $request = ChargeOperations::voidTransaction($chargeRequestId, $requestId, $this->getContext()); - $this->httpClient->send($request); $this->before($request, $this); $response = $this->httpClient->send($request); $this->after($response, $this);