Razorpay for WooCommerce - Version 1.5.1

Version Description

  • get_currency() usage fixed
  • using order_get_curreny() for older versions of woocommerce
Download this release

Release Info

Developer mayankamencherla
Plugin Icon 128x128 Razorpay for WooCommerce
Version 1.5.1
Comparing to
See all releases

Code changes from version 1.5.0 to 1.5.1

Files changed (3) hide show
  1. .editorconfig +0 -13
  2. razorpay-payments.php +12 -6
  3. readme.txt +5 -1
.editorconfig DELETED
@@ -1,13 +0,0 @@
1
- ; This file is for unifying the coding style for different editors and IDEs.
2
- ; More information at http://EditorConfig.org
3
-
4
- root = true
5
- ; Use 2 spaces for indentation in all files
6
-
7
- [*.php]
8
- end_of_line = lf
9
- charset = utf-8
10
- trim_trailing_whitespace = true
11
- indent_style = space
12
- indent_size = 4
13
- insert_final_newline = true
 
 
 
 
 
 
 
 
 
 
 
 
 
razorpay-payments.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WooCommerce Razorpay Payments
4
  Plugin URI: https://razorpay.com
5
  Description: Razorpay Payment Gateway Integration for WooCommerce
6
- Version: 1.5.0
7
  Author: Razorpay
8
  Author URI: https://razorpay.com
9
  */
@@ -289,6 +289,8 @@ function woocommerce_razorpay_init()
289
 
290
  $productinfo = "Order $orderId";
291
 
 
 
292
  $args = array(
293
  'key' => $this->key_id,
294
  'name' => get_bloginfo('name'),
@@ -301,11 +303,7 @@ function woocommerce_razorpay_init()
301
  'callback_url' => $callbackUrl
302
  );
303
 
304
- if ($order->get_currency() !== self::INR)
305
- {
306
- $args['display_currency'] = $order->get_currency();
307
- $args['display_amount'] = $order->get_total();
308
- }
309
 
310
  $args['amount'] = $this->getOrderAmountAsInteger($order);
311
 
@@ -316,6 +314,7 @@ function woocommerce_razorpay_init()
316
  'email' => $order->get_billing_email(),
317
  'contact' => $order->get_billing_phone(),
318
  );
 
319
  }
320
  else
321
  {
@@ -324,6 +323,13 @@ function woocommerce_razorpay_init()
324
  'email' => $order->billing_email,
325
  'contact' => $order->billing_phone,
326
  );
 
 
 
 
 
 
 
327
  }
328
 
329
  return $args;
3
  Plugin Name: WooCommerce Razorpay Payments
4
  Plugin URI: https://razorpay.com
5
  Description: Razorpay Payment Gateway Integration for WooCommerce
6
+ Version: 1.5.1
7
  Author: Razorpay
8
  Author URI: https://razorpay.com
9
  */
289
 
290
  $productinfo = "Order $orderId";
291
 
292
+ $currency = null;
293
+
294
  $args = array(
295
  'key' => $this->key_id,
296
  'name' => get_bloginfo('name'),
303
  'callback_url' => $callbackUrl
304
  );
305
 
306
+
 
 
 
 
307
 
308
  $args['amount'] = $this->getOrderAmountAsInteger($order);
309
 
314
  'email' => $order->get_billing_email(),
315
  'contact' => $order->get_billing_phone(),
316
  );
317
+ $currency = $order->get_currency();
318
  }
319
  else
320
  {
323
  'email' => $order->billing_email,
324
  'contact' => $order->billing_phone,
325
  );
326
+ $currency = $order->get_order_currency();
327
+ }
328
+
329
+ if ($currency !== self::INR)
330
+ {
331
+ $args['display_currency'] = $currency;
332
+ $args['display_amount'] = $order->get_total();
333
  }
334
 
335
  return $args;
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: 4.7
6
- Stable tag: 1.5.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -36,6 +36,10 @@ This is compatible with WooCommerce>=2.4, including the new 3.0 release.
36
 
37
  == Changelog ==
38
 
 
 
 
 
39
  = 1.5.0 =
40
  * Javascript fixes for additional compatibility with other plugins ([#47](https://github.com/razorpay/razorpay-woocommerce/pull/47))
41
  * Adds multi-currency support using [WooCommerce Currency Switcher](https://wordpress.org/plugins/woocommerce-currency-switcher/) plugin. ([#46](https://github.com/razorpay/razorpay-woocommerce/pull/46))
3
  Tags: razorpay, payments, india, woocommerce, ecommerce
4
  Requires at least: 3.9.2
5
  Tested up to: 4.7
6
+ Stable tag: 1.5.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
36
 
37
  == Changelog ==
38
 
39
+ = 1.5.1 =
40
+ * get_currency() usage fixed
41
+ * using order_get_curreny() for older versions of woocommerce
42
+
43
  = 1.5.0 =
44
  * Javascript fixes for additional compatibility with other plugins ([#47](https://github.com/razorpay/razorpay-woocommerce/pull/47))
45
  * Adds multi-currency support using [WooCommerce Currency Switcher](https://wordpress.org/plugins/woocommerce-currency-switcher/) plugin. ([#46](https://github.com/razorpay/razorpay-woocommerce/pull/46))