From 14dbf9d29a9b2f7af887e2c7ad29e3186c6882de Mon Sep 17 00:00:00 2001 From: Arifia Kasastra R Date: Fri, 5 Jun 2020 02:58:26 +0700 Subject: [PATCH] Create notification handler with JSON & XML --- src/LaravelFaspay.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/LaravelFaspay.php b/src/LaravelFaspay.php index 512ab6c..9e7572e 100644 --- a/src/LaravelFaspay.php +++ b/src/LaravelFaspay.php @@ -133,8 +133,13 @@ public function cancelPayment($trx_id, $billno, $paymentcancel) } public function notifier() + { + return json_decode(file_get_contents('php://input')); // Return the JSON Data from Faspay + } + + public function notifierXML() { $notif = new NotifyHandler(); - return $notif->handle(); + return $notif->handle(); // Return the XML Data } } \ No newline at end of file