Skip to content

Commit

Permalink
Version 5.6.4 release (#32)
Browse files Browse the repository at this point in the history
Co-authored-by: Tolu Kalejaiye <[email protected]>
  • Loading branch information
tubiz and tolu-paystack authored Sep 29, 2020
1 parent e140170 commit c1c0f32
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 16 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

**Requires at least:** 4.7

**Tested up to:** 5.4
**Tested up to:** 5.5

**Stable tag:** 5.6.3
**Stable tag:** 5.6.4

**License:** GPLv2 or later

Expand Down Expand Up @@ -145,6 +145,11 @@ To configure the plugin, go to __WooCommerce > Settings__ from the left hand men

## Changelog

### 5.6.4 - September 29, 2020 =
* Fix: Use order currency when paying for an order and not the store currency
* Fix: Test mode enabled admin notice not displayed properly
* Misc: Add payment icon for South Africa

### 5.6.3 - July 27, 2020
* New: Add support for ZAR as an accepted currency.
* New: Add setting to remove "Cancel order & restore cart" button.
Expand Down Expand Up @@ -257,7 +262,7 @@ To configure the plugin, go to __WooCommerce > Settings__ from the left hand men
## Upgrade Notice

### 5.6.3 ###
* Fixes.
* Add payment icon for South Africa. Use the order currency and not the store currency when paying for an order

## Screenshots ##

Expand Down
Binary file added assets/images/paystack-za.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion includes/class-wc-gateway-paystack.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ public function get_icon() {

if ( 'GH' === $base_location['country'] ) {
$icon = '<img src="' . WC_HTTPS::force_https_url( plugins_url( 'assets/images/paystack-gh.png', WC_PAYSTACK_MAIN_FILE ) ) . '" alt="Paystack Payment Options" />';
} elseif ( 'ZA' === $base_location['country'] ) {
$icon = '<img src="' . WC_HTTPS::force_https_url( plugins_url( 'assets/images/paystack-za.png', WC_PAYSTACK_MAIN_FILE ) ) . '" alt="Paystack Payment Options" />';
} else {
$icon = '<img src="' . WC_HTTPS::force_https_url( plugins_url( 'assets/images/paystack-wc.png', WC_PAYSTACK_MAIN_FILE ) ) . '" alt="Paystack Payment Options" />';
}
Expand Down Expand Up @@ -652,14 +654,15 @@ public function payment_scripts() {
$txnref = $order_id . '_' . time();
$the_order_id = method_exists( $order, 'get_id' ) ? $order->get_id() : $order->id;
$the_order_key = method_exists( $order, 'get_order_key' ) ? $order->get_order_key() : $order->order_key;
$currency = method_exists( $order, 'get_currency' ) ? $order->get_currency() : $order->order_currency;

if ( $the_order_id == $order_id && $the_order_key == $order_key ) {

$paystack_params['email'] = $email;
$paystack_params['amount'] = $amount;
$paystack_params['txnref'] = $txnref;
$paystack_params['pay_page'] = $this->payment_page;
$paystack_params['currency'] = get_woocommerce_currency();
$paystack_params['currency'] = $currency;
$paystack_params['bank_channel'] = 'true';
$paystack_params['card_channel'] = 'true';

Expand Down
3 changes: 2 additions & 1 deletion includes/custom-gateways/class-wc-gateway-paystack-five.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,15 @@ public function payment_scripts() {

$the_order_id = method_exists( $order, 'get_id' ) ? $order->get_id() : $order->id;
$the_order_key = method_exists( $order, 'get_order_key' ) ? $order->get_order_key() : $order->order_key;
$currency = method_exists( $order, 'get_currency' ) ? $order->get_currency() : $order->order_currency;

if ( $the_order_id == $order_id && $the_order_key == $order_key ) {

$paystack_params['email'] = $email;
$paystack_params['amount'] = $amount;
$paystack_params['txnref'] = $txnref;
$paystack_params['pay_page'] = $this->payment_page;
$paystack_params['currency'] = get_woocommerce_currency();
$paystack_params['currency'] = $currency;

}

Expand Down
3 changes: 2 additions & 1 deletion includes/custom-gateways/class-wc-gateway-paystack-four.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,15 @@ public function payment_scripts() {

$the_order_id = method_exists( $order, 'get_id' ) ? $order->get_id() : $order->id;
$the_order_key = method_exists( $order, 'get_order_key' ) ? $order->get_order_key() : $order->order_key;
$currency = method_exists( $order, 'get_currency' ) ? $order->get_currency() : $order->order_currency;

if ( $the_order_id == $order_id && $the_order_key == $order_key ) {

$paystack_params['email'] = $email;
$paystack_params['amount'] = $amount;
$paystack_params['txnref'] = $txnref;
$paystack_params['pay_page'] = $this->payment_page;
$paystack_params['currency'] = get_woocommerce_currency();
$paystack_params['currency'] = $currency;

}

Expand Down
3 changes: 2 additions & 1 deletion includes/custom-gateways/class-wc-gateway-paystack-one.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,15 @@ public function payment_scripts() {

$the_order_id = method_exists( $order, 'get_id' ) ? $order->get_id() : $order->id;
$the_order_key = method_exists( $order, 'get_order_key' ) ? $order->get_order_key() : $order->order_key;
$currency = method_exists( $order, 'get_currency' ) ? $order->get_currency() : $order->order_currency;

if ( $the_order_id == $order_id && $the_order_key == $order_key ) {

$paystack_params['email'] = $email;
$paystack_params['amount'] = $amount;
$paystack_params['txnref'] = $txnref;
$paystack_params['pay_page'] = $this->payment_page;
$paystack_params['currency'] = get_woocommerce_currency();
$paystack_params['currency'] = $currency;

}

Expand Down
3 changes: 2 additions & 1 deletion includes/custom-gateways/class-wc-gateway-paystack-three.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,15 @@ public function payment_scripts() {

$the_order_id = method_exists( $order, 'get_id' ) ? $order->get_id() : $order->id;
$the_order_key = method_exists( $order, 'get_order_key' ) ? $order->get_order_key() : $order->order_key;
$currency = method_exists( $order, 'get_currency' ) ? $order->get_currency() : $order->order_currency;

if ( $the_order_id == $order_id && $the_order_key == $order_key ) {

$paystack_params['email'] = $email;
$paystack_params['amount'] = $amount;
$paystack_params['txnref'] = $txnref;
$paystack_params['pay_page'] = $this->payment_page;
$paystack_params['currency'] = get_woocommerce_currency();
$paystack_params['currency'] = $currency;

}

Expand Down
3 changes: 2 additions & 1 deletion includes/custom-gateways/class-wc-gateway-paystack-two.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,15 @@ public function payment_scripts() {

$the_order_id = method_exists( $order, 'get_id' ) ? $order->get_id() : $order->id;
$the_order_key = method_exists( $order, 'get_order_key' ) ? $order->get_order_key() : $order->order_key;
$currency = method_exists( $order, 'get_currency' ) ? $order->get_currency() : $order->order_currency;

if ( $the_order_id == $order_id && $the_order_key == $order_key ) {

$paystack_params['email'] = $email;
$paystack_params['amount'] = $amount;
$paystack_params['txnref'] = $txnref;
$paystack_params['pay_page'] = $this->payment_page;
$paystack_params['currency'] = get_woocommerce_currency();
$paystack_params['currency'] = $currency;

}

Expand Down
11 changes: 8 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://bosun.me/donate
Tags: paystack, woocommerce, payment gateway, tubiz plugins, verve, ghana, nigeria, mastercard, visa
Requires at least: 4.7
Tested up to: 5.5
Stable tag: 5.6.3
Stable tag: 5.6.4
Requires PHP: 5.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -125,6 +125,11 @@ To configure the plugin, go to __WooCommerce > Settings__ from the left hand me

== Changelog ==

= 5.6.4 - September 29, 2020 =
* Fix: Use order currency when paying for an order and not the store currency
* Misc: Test mode enabled admin notice not displayed properly
* Misc: Add payment icon for South Africa

= 5.6.3 - July 27, 2020 =
* New: Add support for ZAR as an accepted currency.
* New: Add setting to remove "Cancel order & restore cart" button.
Expand Down Expand Up @@ -235,8 +240,8 @@ To configure the plugin, go to __WooCommerce > Settings__ from the left hand me

== Upgrade Notice ==

= 5.6.3
* Fixes
= 5.6.4
* Add payment icon for South Africa. Use the order currency and not the store currency when paying for an order

== Screenshots ==

Expand Down
8 changes: 4 additions & 4 deletions woo-paystack.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* Plugin Name: Paystack WooCommerce Payment Gateway
* Plugin URI: https://paystack.com
* Description: WooCommerce payment gateway for Paystack
* Version: 5.6.3
* Version: 5.6.4
* Author: Tunbosun Ayinla
* Author URI: https://bosun.me
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* WC requires at least: 3.0.0
* WC tested up to: 4.3
* WC tested up to: 4.6
* Text Domain: woo-paystack
* Domain Path: /languages
*/
Expand All @@ -21,7 +21,7 @@
define( 'WC_PAYSTACK_MAIN_FILE', __FILE__ );
define( 'WC_PAYSTACK_URL', untrailingslashit( plugins_url( '/', __FILE__ ) ) );

define( 'WC_PAYSTACK_VERSION', '5.6.3' );
define( 'WC_PAYSTACK_VERSION', '5.6.4' );

/**
* Initialize Paystack WooCommerce payment gateway.
Expand Down Expand Up @@ -152,6 +152,6 @@ function tbz_wc_paystack_testmode_notice() {

if ( 'yes' === $test_mode ) {
/* translators: 1. Paystack settings page URL link. */
echo '<div class="update-nag">' . sprintf( __( 'Paystack test mode is still enabled, Click <strong><a href="%s">here</a></strong> to disable it when you want to start accepting live payment on your site.', 'woo-paystack' ), esc_url( admin_url( 'admin.php?page=wc-settings&tab=checkout&section=paystack' ) ) ) . '</div>';
echo '<div class="error"><p>' . sprintf( __( 'Paystack test mode is still enabled, Click <strong><a href="%s">here</a></strong> to disable it when you want to start accepting live payment on your site.', 'woo-paystack' ), esc_url( admin_url( 'admin.php?page=wc-settings&tab=checkout&section=paystack' ) ) ) . '</p></div>';
}
}

0 comments on commit c1c0f32

Please sign in to comment.