Razorpay for WooCommerce - Version 2.2.0

Version Description

  • Adds webhook for handling subscription cancellation.
  • Tested upto WordPress 5.2.2 and WooCommerce 3.7.0
Download this release

Release Info

Developer premtechchefs
Plugin Icon 128x128 Razorpay for WooCommerce
Version 2.2.0
Comparing to
See all releases

Code changes from version 2.1.0 to 2.2.0

Files changed (3) hide show
  1. includes/razorpay-webhook.php +16 -2
  2. readme.txt +6 -2
  3. woo-razorpay.php +3 -3
includes/razorpay-webhook.php CHANGED
@@ -23,8 +23,9 @@ class RZP_Webhook
23
  /**
24
  * Event constants
25
  */
26
- const PAYMENT_AUTHORIZED = 'payment.authorized';
27
- const PAYMENT_FAILED = 'payment.failed';
 
28
 
29
  function __construct()
30
  {
@@ -99,6 +100,9 @@ class RZP_Webhook
99
  case self::PAYMENT_FAILED:
100
  return $this->paymentFailed($data);
101
 
 
 
 
102
  default:
103
  return;
104
  }
@@ -115,6 +119,16 @@ class RZP_Webhook
115
  return;
116
  }
117
 
 
 
 
 
 
 
 
 
 
 
118
  /**
119
  * Handling the payment authorized webhook
120
  *
23
  /**
24
  * Event constants
25
  */
26
+ const PAYMENT_AUTHORIZED = 'payment.authorized';
27
+ const PAYMENT_FAILED = 'payment.failed';
28
+ const SUBSCRIPTION_CANCELLED = 'subscription.cancelled';
29
 
30
  function __construct()
31
  {
100
  case self::PAYMENT_FAILED:
101
  return $this->paymentFailed($data);
102
 
103
+ case self::SUBSCRIPTION_CANCELLED:
104
+ return $this->subscriptionCancelled($data);
105
+
106
  default:
107
  return;
108
  }
119
  return;
120
  }
121
 
122
+ /**
123
+ * Does nothing for the main payments flow currently
124
+ * @param array $data Webook Data
125
+ */
126
+ protected function subscriptionCancelled(array $data)
127
+ {
128
+ return;
129
+ }
130
+
131
+
132
  /**
133
  * Handling the payment authorized webhook
134
  *
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: razorpay
3
  Tags: razorpay, payments, india, woocommerce, ecommerce
4
  Requires at least: 3.9.2
5
  Tested up to: 5.2.2
6
- Stable tag: 2.1.0
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -41,8 +41,12 @@ This is compatible with WooCommerce>=2.4, including the new 3.0 release. It has
41
 
42
  == Changelog ==
43
 
 
 
 
 
44
  = 2.1.0 =
45
- * Fixed bug for rzorpay orderID validation.
46
  * Adds support for razorpay Analytics
47
  * Tested upto WordPress 5.2.2 and WooCommerce 3.6.5
48
 
3
  Tags: razorpay, payments, india, woocommerce, ecommerce
4
  Requires at least: 3.9.2
5
  Tested up to: 5.2.2
6
+ Stable tag: 2.2.0
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
41
 
42
  == Changelog ==
43
 
44
+ = 2.2.0 =
45
+ * Adds webhook for handling subscription cancellation.
46
+ * Tested upto WordPress 5.2.2 and WooCommerce 3.7.0
47
+
48
  = 2.1.0 =
49
+ * Fixed bug for razorpay orderID validation.
50
  * Adds support for razorpay Analytics
51
  * Tested upto WordPress 5.2.2 and WooCommerce 3.6.5
52
 
woo-razorpay.php CHANGED
@@ -3,10 +3,10 @@
3
  * Plugin Name: Razorpay for WooCommerce
4
  * Plugin URI: https://razorpay.com
5
  * Description: Razorpay Payment Gateway Integration for WooCommerce
6
- * Version: 2.1.0
7
- * Stable tag: 2.1.0
8
  * Author: Team Razorpay
9
- * WC tested up to: 3.6.5
10
  * Author URI: https://razorpay.com
11
  */
12
 
3
  * Plugin Name: Razorpay for WooCommerce
4
  * Plugin URI: https://razorpay.com
5
  * Description: Razorpay Payment Gateway Integration for WooCommerce
6
+ * Version: 2.2.0
7
+ * Stable tag: 2.2.0
8
  * Author: Team Razorpay
9
+ * WC tested up to: 3.7.0
10
  * Author URI: https://razorpay.com
11
  */
12