diff --git a/MeprPaystackGateway.php b/MeprPaystackGateway.php
index aa6050e..be86c87 100644
--- a/MeprPaystackGateway.php
+++ b/MeprPaystackGateway.php
@@ -17,6 +17,7 @@ public function __construct()
$this->icon = MP_PAYSTACK_IMAGES_URL . '/cards.png';
$this->desc = __('Pay via Paystack', 'memberpress');
$this->set_defaults();
+ $this->key = __("Paystack", 'memberpress');
$this->capabilities = array(
'process-payments',
@@ -482,7 +483,7 @@ protected function record_subscription_invoice($invoice)
$txn->set_gross((float) $invoice->amount / 100);
}
- $txn->expires_at = MeprUtils::ts_to_mysql_date($invoice['subscription']->next_payment_date, 'Y-m-d 23:59:59');
+ $txn->expires_at = MeprUtils::ts_to_mysql_date(strtotime($invoice->subscription['next_payment_date']), 'Y-m-d 23:59:59');
$txn->store();
@@ -1140,21 +1141,21 @@ public function display_options_form()
|
notify_url('whk')); ?> |
-
+
-
-
-
-
- This plugin only supports weekly, monthly, quarterly and yearly subscription plans.
-
- |
+
+
+
+
+
This plugin only supports weekly, monthly, quarterly and yearly subscription plans.
+
+
@@ -1316,11 +1317,11 @@ public function webhook_listener()
$this->email_status("Webhook Just Came In (" . $_SERVER['REQUEST_METHOD'] . "):\n" . MeprUtils::object_to_string($_REQUEST, true) . "\n", $this->settings->debug);
// retrieve the request's body
$request = @file_get_contents('php://input');
-
if ($this->paystack_api->validate_webhook($request) == true) {
// parse it as JSON
- $request = (object) json_decode($request, true);
- $_REQUEST['data'] = $obj = (object) $request->data;
+ $request = (object)json_decode($request, true);
+ $obj = $request->data;
+ $_REQUEST['data'] = $request->data;
if ($request->event == 'charge.success') {
$this->email_status("###Event: {$request->event}\n" . MeprUtils::object_to_string($request, true) . "\n", $this->settings->debug);
@@ -1518,4 +1519,4 @@ protected function get_request_data()
{
return (object) $_REQUEST['data'];
}
-}
+}
\ No newline at end of file
diff --git a/readme.txt b/readme.txt
index 02d89fc..e09d4a8 100644
--- a/readme.txt
+++ b/readme.txt
@@ -3,7 +3,7 @@ Tags: paystack, billing, subscription, payment, memberpress,
Requires at least: 5.1
Tested up to: 5.9
Requires PHP: 7.2
-Stable tag: 1.3.0
+Stable tag: 1.3.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html