diff --git a/banner-772x250.png b/banner-772x250.png
new file mode 100644
index 0000000..400d75b
Binary files /dev/null and b/banner-772x250.png differ
diff --git a/icon-128x128.png b/icon-128x128.png
new file mode 100644
index 0000000..08819c0
Binary files /dev/null and b/icon-128x128.png differ
diff --git a/inc/class-wooviet-admin-page.php b/inc/class-wooviet-admin-page.php
index b022f64..4f10bc4 100644
--- a/inc/class-wooviet-admin-page.php
+++ b/inc/class-wooviet-admin-page.php
@@ -106,7 +106,7 @@ class WooViet_Admin_Page {
if ( 'VND' == get_woocommerce_currency() ) {
_e( 'OnePay can work on your site.', 'woo-viet' );
echo '
';
- echo sprintf( __( 'Please configure this gateway under WooCommerce -> Settings -> Checkout.', 'woo-viet' ), admin_url( 'admin.php?page=wc-settings&tab=checkout' ) );
+ echo sprintf( __( 'Please configure this gateway under WooCommerce -> Settings -> Checkout.', 'woo-viet' ), admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=wooviet_onepay_domestic' ) );
} else {
_e( 'This gateway is not active on your site. Because OnePay supports VND only.', 'woo-viet' );
}
diff --git a/inc/class-wooviet-notices.php b/inc/class-wooviet-notices.php
new file mode 100644
index 0000000..ebb0588
--- /dev/null
+++ b/inc/class-wooviet-notices.php
@@ -0,0 +1,107 @@
+ 0,
+ 'displaying_survey_after_4_weeks' => 'not_yet',
+ );
+
+ /**
+ * WooViet_Notices constructor.
+ */
+ public function __construct() {
+ $this->settings = self::get_settings();
+ $this->set_installation_time();
+ $this->manage_displaying_survey_after_4_weeks();
+
+ }
+
+ public function get_settings() {
+ $settings = get_option( 'woo-viet_notices', self::$default_settings );
+ $settings = wp_parse_args( $settings, self::$default_settings );
+
+ return $settings;
+ }
+
+ /**
+ * Set the installation time
+ */
+ public function set_installation_time() {
+ if ( ! $this->settings['installation_time'] ) {
+ $this->settings['installation_time'] = time();
+ $this->save_settings();
+ }
+ }
+
+ /**
+ * Save settings for this classe
+ */
+ public function save_settings() {
+ update_option( 'woo-viet_notices', $this->settings );
+ }
+
+ /**
+ * Manage the notice 'displaying_survey_after_4_weeks'
+ */
+ public function manage_displaying_survey_after_4_weeks() {
+ $display_time = $this->settings['installation_time'] + ( 4 * 7 * 24 * 60 * 60 ); // 4 weeks; 7 days; 24 hours; 60 mins; 60 secs
+
+ // Manage the dismiss action
+ if ( isset( $_GET['wooviet_dismiss'] )
+ &&
+ ( 'displaying_survey_after_4_weeks' == $_GET['wooviet_dismiss'] )
+ ) {
+ $this->settings['displaying_survey_after_4_weeks'] = 'done';
+ $this->save_settings();
+ }
+
+ // Display the message
+ if ( $display_time < time() &&
+ 'not_yet' == $this->settings['displaying_survey_after_4_weeks']
+ ) {
+
+ add_action( 'admin_notices', array( $this, 'add_displaying_survey_after_4_weeks' ) );
+
+ }
+ }
+
+ /**
+ * The HTML code to display in the admin notice
+ */
+ public function add_displaying_survey_after_4_weeks() {
+
+ $line1 = __( 'Please help us to improve Woo Viet.', 'woo-viet' );
+ $line2 = __( 'Rate us!', 'woo-viet' );
+ $line3 = __( 'Or run a short survery:', 'woo-viet' );
+ $line4 = 'tiếng Việt - English';
+ $line5 = __( 'Dismiss this notice', 'woo-viet' );
+ $link = admin_url( 'admin.php?page=woo-viet&wooviet_dismiss=displaying_survey_after_4_weeks' );
+
+ printf( '
+
%s', WooViet_OnePay_Domestic::get_onepay_ipn_url() ) . '' .
sprintf( __( '%sContact OnePay%s to configure this URL on its site. This is required based on its guidelines.', 'woo-viet' ), '', '' ),
),
+ /**
+ * @since 1.3.1
+ */
+ 'debug' => array(
+ 'title' => __( 'Debug log', 'woo-viet' ),
+ 'type' => 'checkbox',
+ 'label' => __( 'Enable logging', 'woo-viet' ),
+ 'default' => 'no',
+ 'description' => sprintf( __( 'Log events, such as IPN requests, inside %s', 'woo-viet' ), '' . WC_Log_Handler_File::get_log_file_path( 'WooViet_OnePay_Domestic' ) . '' ),
+ ),
);
\ No newline at end of file
diff --git a/readme.md b/readme.md
index 690b885..eb3db7a 100644
--- a/readme.md
+++ b/readme.md
@@ -74,6 +74,11 @@ Follow these steps to install and use the plugin:
## Changelog
+### 1.3.1 - 2017.07.09
+* Improve the OnePay domestic gateway.
+* Add the plugin icon and banner.
+* Add the questionnaire after 4 weeks of installation.
+
### 1.3 - 2017.04.22
* Add [the OnePay domestic (local ATM cards) gateway](http://onepay.com.vn/)
diff --git a/readme.txt b/readme.txt
index 77f0a15..2dd7308 100644
--- a/readme.txt
+++ b/readme.txt
@@ -3,7 +3,7 @@ Contributors: htdat
Tags: OnePay WooCommerce, OnePay Vietnam, WooCommerce Vietnam, vietnam, vietnamese, vietnam provinces, paypal for vietnam dong, vnd, vietnam dong, vietnam currency, vietnam customization
Requires at least: 4.3
Tested up to: 4.8
-Stable tag: 1.3
+Stable tag: 1.3.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -13,7 +13,7 @@ Add features to WooCommerce stores having anything related to Vietnam: currency,
**"Woo Viet - WooCommerce for Vietnam" brings the features that help to run WooCommerce stores and customize them for Vietnam much easier.**
-Xem phiên bản tiếng Việt tại đây https://vi.wordpress.org/plugins/woo-viet/
+Xem phiên bản tiếng Việt tại đây [https://vi.wordpress.org/plugins/woo-viet/](https://vi.wordpress.org/plugins/woo-viet/)
**NEW FEATURE**:
Add [the OnePay domestic (local ATM cards) gateway](http://onepay.com.vn/).
@@ -25,7 +25,7 @@ Add [the OnePay domestic (local ATM cards) gateway](http://onepay.com.vn/).
* Add districts to Vietnam provinces.
* Convert `000` of prices to `K` (or anything). E.g: `50000` (VND) will be `50K` (VND), or `50 thousand` (VND).
* Support `VND` for [the PayPal Standard gateway](https://docs.woocommerce.com/document/paypal-standard/). Convert `VND` prices to any PayPal supported currency before sending visitors to the PayPal pages.
-* Add [the OnePay domestic (local ATM cards) gateway](http://onepay.com.vn/).
+* Add [the OnePay domestic (local ATM cards) gateway](http://onepay.com.vn/). Implement all methods in [the official documents](https://mtf.onepay.vn/developer/?page=modul_noidia_php): QueryDR, IPN, and Return URL.
= ROAD MAP =
@@ -71,9 +71,15 @@ Follow these steps to install and use the plugin:
2. Prices are changed to "K", and the symbol is now "VND".
3. List provinces and districts when selecting Vietnam.
4. Let clients know about the currency conversion before switching to the PayPal pages.
+5. OnePay domestic (local ATM cards) gateway.
== Changelog ==
+= 1.3.1 - 2017.07.092 =
+* Improve the OnePay domestic gateway.
+* Add the plugin icon and banner.
+* Add the questionnaire after 4 weeks of installation.
+
= 1.3 - 2017.04.22 =
* Add [the OnePay domestic (local ATM cards) gateway](http://onepay.com.vn/).
diff --git a/screenshot-5.png b/screenshot-5.png
new file mode 100644
index 0000000..d37d681
Binary files /dev/null and b/screenshot-5.png differ
diff --git a/woo-viet.php b/woo-viet.php
index 522435d..60f0403 100644
--- a/woo-viet.php
+++ b/woo-viet.php
@@ -7,7 +7,7 @@
* Author URI: https://profiles.wordpress.org/htdat
* Text Domain: woo-viet
* Domain Path: /languages
- * Version: 1.3
+ * Version: 1.3.1
* License: GPLv2+
*/
@@ -92,7 +92,7 @@ class WooViet {
public function notice_if_not_woocommerce() {
$class = 'notice notice-error';
- $message = __( 'Woo Viet is not running because WooCommerce is not active. Please activate both plugins',
+ $message = __( 'Woo Viet is not running because WooCommerce is not active. Please activate both plugins.',
'woo-viet' );
printf( '%2$s