Changeset 2317410
- Timestamp:
- 06/03/2020 02:02:38 PM (6 years ago)
- Location:
- mobipaid
- Files:
-
- 48 added
- 5 edited
-
tags/1.0.2 (added)
-
tags/1.0.2/assets (added)
-
tags/1.0.2/assets/img (added)
-
tags/1.0.2/assets/img/mp-logo.png (added)
-
tags/1.0.2/changelog.txt (added)
-
tags/1.0.2/includes (added)
-
tags/1.0.2/includes/class-mobipaid-api.php (added)
-
tags/1.0.2/includes/class-mobipaid.php (added)
-
tags/1.0.2/index.php (added)
-
tags/1.0.2/languages (added)
-
tags/1.0.2/languages/mobipaid-ar.mo (added)
-
tags/1.0.2/languages/mobipaid-ar.po (added)
-
tags/1.0.2/languages/mobipaid-da_DK.mo (added)
-
tags/1.0.2/languages/mobipaid-da_DK.po (added)
-
tags/1.0.2/languages/mobipaid-de_DE.mo (added)
-
tags/1.0.2/languages/mobipaid-de_DE.po (added)
-
tags/1.0.2/languages/mobipaid-en_US.mo (added)
-
tags/1.0.2/languages/mobipaid-en_US.po (added)
-
tags/1.0.2/languages/mobipaid-es_ES.mo (added)
-
tags/1.0.2/languages/mobipaid-es_ES.po (added)
-
tags/1.0.2/languages/mobipaid-fi.mo (added)
-
tags/1.0.2/languages/mobipaid-fi.po (added)
-
tags/1.0.2/languages/mobipaid-fr_FR.mo (added)
-
tags/1.0.2/languages/mobipaid-fr_FR.po (added)
-
tags/1.0.2/languages/mobipaid-id_ID.mo (added)
-
tags/1.0.2/languages/mobipaid-id_ID.po (added)
-
tags/1.0.2/languages/mobipaid-it_IT.mo (added)
-
tags/1.0.2/languages/mobipaid-it_IT.po (added)
-
tags/1.0.2/languages/mobipaid-ja.mo (added)
-
tags/1.0.2/languages/mobipaid-ja.po (added)
-
tags/1.0.2/languages/mobipaid-ko_KR.mo (added)
-
tags/1.0.2/languages/mobipaid-ko_KR.po (added)
-
tags/1.0.2/languages/mobipaid-nl_NL.mo (added)
-
tags/1.0.2/languages/mobipaid-nl_NL.po (added)
-
tags/1.0.2/languages/mobipaid-pl_PL.mo (added)
-
tags/1.0.2/languages/mobipaid-pl_PL.po (added)
-
tags/1.0.2/languages/mobipaid-pt_PT.mo (added)
-
tags/1.0.2/languages/mobipaid-pt_PT.po (added)
-
tags/1.0.2/languages/mobipaid-ru_RU.mo (added)
-
tags/1.0.2/languages/mobipaid-ru_RU.po (added)
-
tags/1.0.2/languages/mobipaid-sv_SE.mo (added)
-
tags/1.0.2/languages/mobipaid-sv_SE.po (added)
-
tags/1.0.2/languages/mobipaid-tr_TR.mo (added)
-
tags/1.0.2/languages/mobipaid-tr_TR.po (added)
-
tags/1.0.2/languages/mobipaid-zh_CN.mo (added)
-
tags/1.0.2/languages/mobipaid-zh_CN.po (added)
-
tags/1.0.2/mobipaid.php (added)
-
tags/1.0.2/readme.txt (added)
-
trunk/assets/img/mp-logo.png (modified) (previous)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/includes/class-mobipaid.php (modified) (2 diffs)
-
trunk/mobipaid.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mobipaid/trunk/changelog.txt
r2302697 r2317410 8 8 = 1.0.1 - 2020-05-11 = 9 9 * change the way of get payment status. 10 11 = 1.0.2 - 2020-06-03 = 12 * change logo size. 13 * add readme for setup. 14 * change the way of get payment status. -
mobipaid/trunk/includes/class-mobipaid.php
r2302697 r2317410 405 405 if ( ! empty( $token ) ) { 406 406 $this->log( 'get response from the gateway reponse url' ); 407 $res_body = file_get_contents( 'php://input' ); 408 $res_body = json_decode( $res_body, true ); 409 $response = json_decode( wp_unslash( $res_body['response'] ), true ); 410 $this->log( 'response_page - response: ' . wp_json_encode( $response ) ); 411 412 $transaction_id = isset( $response['transaction_id'] ) ? $response['transaction_id'] : ''; 413 $result = isset( $response['result'] ) ? $response['result'] : ''; 414 $payment_id = isset( $response['payment_id'] ) ? $response['payment_id'] : ''; 415 $currency = isset( $response['currency'] ) ? $response['currency'] : ''; 407 $response = get_query_var( 'response' ); 408 $this->log( 'response_page - original response: ' . $response ); 409 $response = json_decode( wp_unslash( $response ), true ); 410 $this->log( 'response_page - formated response: ' . wp_json_encode( $response ) ); 411 412 $payment_status = ''; 413 $payment_id = ''; 414 $currency = ''; 415 416 if ( isset( $response['status'] ) ) { 417 $payment_status = $response['status']; 418 } elseif ( isset( $response['result'] ) ) { 419 $payment_status = $response['result']; 420 } 421 422 if ( isset( $response['payment_id'] ) ) { 423 $payment_id = $response['payment_id']; 424 } elseif ( isset( $response['response'] ) && isset( $response['response']['id'] ) ) { 425 $payment_id = $response['response']['id']; 426 } 427 428 if ( isset( $response['currency'] ) ) { 429 $currency = $response['currency']; 430 } elseif ( isset( $response['response'] ) && isset( $response['response']['currency'] ) ) { 431 $currency = $response['response']['currency']; 432 } 433 416 434 $generated_token = $this->generate_token( $order_id, $currency ); 417 435 $order = wc_get_order( $order_id ); … … 419 437 if ( $order && 'mobipaid' === $order->get_payment_method() ) { 420 438 if ( $token === $generated_token ) { 421 if ( 'ACK' === $ result) {439 if ( 'ACK' === $payment_status ) { 422 440 $this->log( 'response_page: update order status to processing' ); 423 441 $order_status = 'processing'; -
mobipaid/trunk/mobipaid.php
r2302697 r2317410 4 4 * Plugin URI: https://github.com/MobipaidLLC/mobipaid-woocommerce 5 5 * Description: Receive payments using Mobipaid. 6 * Version: 1.0. 16 * Version: 1.0.2 7 7 * Requires at least: 5.0 8 8 * Tested up to: 5.3.2 … … 24 24 } 25 25 26 define( 'MOBIPAID_PLUGIN_VERSION', '1.0. 1' );26 define( 'MOBIPAID_PLUGIN_VERSION', '1.0.2' ); 27 27 28 28 register_activation_hook( __FILE__, 'mobipaid_activate_plugin' ); -
mobipaid/trunk/readme.txt
r2302697 r2317410 6 6 Tested up to: 5.3.2 7 7 Requires PHP: 7.0 8 Stable tag: 1.0. 18 Stable tag: 1.0.2 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 71 71 3. Settings the plugin through the 'Plugins' menu in WordPress. 72 72 73 = Setup = 74 75 After installed the plugin, you need to go to plugin settings and input an access key that received from Mobipaid developer portal. 76 And please make sure Merchant has created POS Link with Reference number type Customer Input and sets avaiable currencies. 77 73 78 == Frequently Asked Questions == 74 79 … … 99 104 = 1.0.1 - 2020-05-11 = 100 105 * change the way of get payment status. 106 107 = 1.0.2 - 2020-06-03 = 108 * change logo size. 109 * add readme for setup. 110 * change the way of get payment status.
Note: See TracChangeset
for help on using the changeset viewer.