Skip to content

Commit

Permalink
Merge pull request #5 from alexminza/v1.1.2
Browse files Browse the repository at this point in the history
v1.1.2
  • Loading branch information
alexminza authored Jun 13, 2019
2 parents 73155b8 + 13ed5ea commit ebc2696
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 21 deletions.
Binary file modified languages/wc-moldovaagroindbank-ro_RO.mo
Binary file not shown.
8 changes: 4 additions & 4 deletions languages/wc-moldovaagroindbank-ro_RO.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
# This file is distributed under the same license as the WooCommerce Moldova Agroindbank Payment Gateway package.
msgid ""
msgstr ""
"Project-Id-Version: WooCommerce Moldova Agroindbank Payment Gateway 1.1.1\n"
"Project-Id-Version: WooCommerce Moldova Agroindbank Payment Gateway 1.1.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wc-"
"moldovaagroindbank\n"
"POT-Creation-Date: 2019-01-06 17:59+0200\n"
"PO-Revision-Date: 2019-01-06 18:02+0200\n"
"POT-Creation-Date: 2019-06-12 16:04+0200\n"
"PO-Revision-Date: 2019-06-12 16:05+0200\n"
"Last-Translator: Alexander Minza <alex@alexminza.com>\n"
"Language-Team: \n"
"Language: ro\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2\n"
"X-Generator: Poedit 2.2.3\n"
"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?"
"2:1));\n"

Expand Down
Binary file modified languages/wc-moldovaagroindbank-ru_RU.mo
Binary file not shown.
8 changes: 4 additions & 4 deletions languages/wc-moldovaagroindbank-ru_RU.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
# This file is distributed under the same license as the WooCommerce Moldova Agroindbank Payment Gateway package.
msgid ""
msgstr ""
"Project-Id-Version: WooCommerce Moldova Agroindbank Payment Gateway 1.1.1\n"
"Project-Id-Version: WooCommerce Moldova Agroindbank Payment Gateway 1.1.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wc-"
"moldovaagroindbank\n"
"POT-Creation-Date: 2019-01-06 17:59+0200\n"
"PO-Revision-Date: 2019-01-06 18:02+0200\n"
"POT-Creation-Date: 2019-06-12 16:04+0200\n"
"PO-Revision-Date: 2019-06-12 16:05+0200\n"
"Last-Translator: Alexander Minza <alex@alexminza.com>\n"
"Language-Team: \n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2\n"
"X-Generator: Poedit 2.2.3\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"

Expand Down
6 changes: 3 additions & 3 deletions languages/wc-moldovaagroindbank.pot
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: WooCommerce Moldova Agroindbank Payment Gateway 1.1.1\n"
"Project-Id-Version: WooCommerce Moldova Agroindbank Payment Gateway 1.1.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wc-moldovaagroindbank\n"
"POT-Creation-Date: 2019-01-06 17:59+0200\n"
"POT-Creation-Date: 2019-06-12 16:04+0200\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2019-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
"X-Generator: Poedit 2.2\n"
"X-Generator: Poedit 2.2.3\n"

#: wc-moldovaagroindbank.php:163
msgid "Enable/Disable"
Expand Down
7 changes: 5 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: alexminza
Donate link: https://www.paypal.me/AlexMinza
Tags: WooCommerce, Moldova, Agroindbank, MAIB, payment, gateway
Requires at least: 4.8
Tested up to: 5.0.2
Tested up to: 5.2.1
Stable tag: trunk
Requires PHP: 7.0
License: GPLv3 or later
Expand Down Expand Up @@ -73,8 +73,11 @@ You can also contribute to the plugin by translating it. Simply visit [translate

== Changelog ==

= 1.1.2 =
Minor improvements

= 1.1.1 =
* Basic and Advanced settings configuration modes
Basic and Advanced settings configuration modes

= 1.1 =
* Simplified payment gateway setup
Expand Down
18 changes: 10 additions & 8 deletions wc-moldovaagroindbank.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: WooCommerce Moldova Agroindbank Payment Gateway
* Description: WooCommerce Payment Gateway for Moldova Agroindbank
* Plugin URI: https://github.com/alexminza/wc-moldovaagroindbank
* Version: 1.1.1
* Version: 1.1.2
* Author: Alexander Minza
* Author URI: https://profiles.wordpress.org/alexminza
* Developer: Alexander Minza
Expand All @@ -13,9 +13,9 @@
* License: GPLv3 or later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Requires at least: 4.8
* Tested up to: 5.0.2
* Tested up to: 5.2.1
* WC requires at least: 3.3
* WC tested up to: 3.5.3
* WC tested up to: 3.6.4
*/

//Looking to contribute code to this plugin? Go ahead and fork the repository over at GitHub https://github.com/alexminza/wc-moldovaagroindbank
Expand Down Expand Up @@ -408,8 +408,8 @@ protected function process_pfx_setting($pfxFieldId, $pfxOptionValue, $passFieldI

$result = $this->process_export_certificates($pfxData, $pfxPassphrase);

$resultPCert = $result['pcert'] ?? null;
$resultKey = $result['key'] ?? null;
$resultPCert = isset($result['pcert']) ? $result['pcert'] : null;
$resultKey = isset($result['key']) ? $result['key'] : null;

if(!self::string_empty($resultPCert) && !self::string_empty($resultKey)) {
//Overwrite advanced settings values
Expand Down Expand Up @@ -441,8 +441,8 @@ protected function initialize_certificates() {
if($pfxCertData !== false) {
$result = $this->process_export_certificates($pfxCertData, $this->maib_key_password);

$resultPCert = $result['pcert'] ?? null;
$resultKey = $result['key'] ?? null;
$resultPCert = isset($result['pcert']) ? $result['pcert'] : null;
$resultKey = isset($result['key']) ? $result['key'] : null;

if(!self::string_empty($resultPCert) && !self::string_empty($resultKey)) {
$this->update_option('maib_pcert', $resultPCert);
Expand Down Expand Up @@ -699,7 +699,9 @@ public function process_payment($order_id) {
#region Validate response
$trans_id = null;
if(!empty($client_result))
$trans_id = $client_result[self::MAIB_TRANSACTION_ID] ?? null;
$trans_id = isset($client_result[self::MAIB_TRANSACTION_ID])
? $client_result[self::MAIB_TRANSACTION_ID]
: null;
#endregion

if(!self::string_empty($trans_id)) {
Expand Down

0 comments on commit ebc2696

Please sign in to comment.