From 26d25d69880f035b53d2c314393ab472560a144f Mon Sep 17 00:00:00 2001 From: drh Date: Tue, 11 Jan 2022 16:55:02 +0300 Subject: [PATCH 1/2] IPN fixes Signed-off-by: drh --- src/Http/Controllers/Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Controllers/Controller.php b/src/Http/Controllers/Controller.php index 6f2b27f..8e021ea 100644 --- a/src/Http/Controllers/Controller.php +++ b/src/Http/Controllers/Controller.php @@ -86,7 +86,7 @@ public function instantPaymentNotification(Request $request) $tandaRequest = TandaRequest::updateOrCreate(['request_id' => $request->input('transactionId')], [ 'status' => $request->input('status'), 'message' => $request->input('message'), - 'receiptNumber' => $request->input('receiptNumber'), + 'receipt_number' => $request->input('receiptNumber'), 'last_modified' => Carbon::parse($request->input('timestamp'))->utc(), 'result' => $request->input('resultParameters'), ]); From c97f2450b79b9291c6eed503e4e9c87a4eab7bd8 Mon Sep 17 00:00:00 2001 From: drh Date: Tue, 11 Jan 2022 17:01:02 +0300 Subject: [PATCH 2/2] Provider fixes Signed-off-by: drh --- src/Library/Utility.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Library/Utility.php b/src/Library/Utility.php index afb297e..5fc0f5d 100644 --- a/src/Library/Utility.php +++ b/src/Library/Utility.php @@ -109,7 +109,9 @@ public function billPayment( $this->setCommand($this->provider); if (in_array($provider, [Providers::KPLC_PREPAID, Providers::KPLC_POSTPAID])) { - $this->provider = 'KPLC'; + $provider = 'KPLC'; + } else { + $provider = $this->provider; } // TODO: Check whether customerContact is necessary or what it is used for. @@ -129,7 +131,7 @@ public function billPayment( $body = [ 'commandId' => $this->command, - 'serviceProviderId' => $this->provider, + 'serviceProviderId' => $provider, 'requestParameters' => $requestParameters ];