Changeset 2777535
- Timestamp:
- 08/30/2022 05:54:07 AM (3 years ago)
- Location:
- omise
- Files:
-
- 32 deleted
- 36 edited
- 1 copied
-
tags/4.23.3 (copied) (copied from omise/trunk)
-
tags/4.23.3/CHANGELOG.md (modified) (1 diff)
-
tags/4.23.3/assets/images/boost.png (deleted)
-
tags/4.23.3/assets/images/duitnow-obw.png (deleted)
-
tags/4.23.3/assets/images/duitnow-qr.png (deleted)
-
tags/4.23.3/assets/images/grabpay.png (deleted)
-
tags/4.23.3/assets/images/maybank-qr.png (deleted)
-
tags/4.23.3/assets/images/shopeepay.png (deleted)
-
tags/4.23.3/assets/images/touch-n-go.png (deleted)
-
tags/4.23.3/assets/javascripts/omise-payment-form-handler.js (modified) (4 diffs)
-
tags/4.23.3/includes/backends/class-omise-backend-fpx.php (modified) (1 diff)
-
tags/4.23.3/includes/backends/class-omise-backend-installment.php (modified) (1 diff)
-
tags/4.23.3/includes/backends/class-omise-backend-mobile-banking.php (modified) (1 diff)
-
tags/4.23.3/includes/backends/class-omise-backend-touch-n-go.php (deleted)
-
tags/4.23.3/includes/class-omise-callback.php (modified) (5 diffs)
-
tags/4.23.3/includes/class-omise-capabilities.php (modified) (2 diffs)
-
tags/4.23.3/includes/class-omise-payment-factory.php (modified) (1 diff)
-
tags/4.23.3/includes/gateway/class-omise-payment-alipayplus.php (modified) (1 diff)
-
tags/4.23.3/includes/gateway/class-omise-payment-boost.php (deleted)
-
tags/4.23.3/includes/gateway/class-omise-payment-duitnow-obw.php (deleted)
-
tags/4.23.3/includes/gateway/class-omise-payment-duitnow-qr.php (deleted)
-
tags/4.23.3/includes/gateway/class-omise-payment-grabpay.php (modified) (1 diff)
-
tags/4.23.3/includes/gateway/class-omise-payment-installment.php (modified) (1 diff)
-
tags/4.23.3/includes/gateway/class-omise-payment-maybank-qr.php (deleted)
-
tags/4.23.3/includes/gateway/class-omise-payment-shopeepay.php (deleted)
-
tags/4.23.3/includes/gateway/class-omise-payment-touch-n-go.php (deleted)
-
tags/4.23.3/includes/libraries/omise-plugin/Omise.php (modified) (1 diff)
-
tags/4.23.3/includes/libraries/omise-plugin/helpers/request.php (deleted)
-
tags/4.23.3/languages/omise-ja.mo (modified) (previous)
-
tags/4.23.3/languages/omise-ja.po (modified) (3 diffs)
-
tags/4.23.3/omise-woocommerce.php (modified) (4 diffs)
-
tags/4.23.3/readme.txt (modified) (2 diffs)
-
tags/4.23.3/templates/myaccount/my-card.php (modified) (4 diffs)
-
tags/4.23.3/templates/payment/form-duitnow-obw.php (deleted)
-
tags/4.23.3/templates/payment/form-fpx.php (modified) (1 diff)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/assets/images/boost.png (deleted)
-
trunk/assets/images/duitnow-obw.png (deleted)
-
trunk/assets/images/duitnow-qr.png (deleted)
-
trunk/assets/images/grabpay.png (deleted)
-
trunk/assets/images/maybank-qr.png (deleted)
-
trunk/assets/images/shopeepay.png (deleted)
-
trunk/assets/images/touch-n-go.png (deleted)
-
trunk/assets/javascripts/omise-payment-form-handler.js (modified) (4 diffs)
-
trunk/includes/backends/class-omise-backend-fpx.php (modified) (1 diff)
-
trunk/includes/backends/class-omise-backend-installment.php (modified) (1 diff)
-
trunk/includes/backends/class-omise-backend-mobile-banking.php (modified) (1 diff)
-
trunk/includes/backends/class-omise-backend-touch-n-go.php (deleted)
-
trunk/includes/class-omise-callback.php (modified) (5 diffs)
-
trunk/includes/class-omise-capabilities.php (modified) (2 diffs)
-
trunk/includes/class-omise-payment-factory.php (modified) (1 diff)
-
trunk/includes/gateway/class-omise-payment-alipayplus.php (modified) (1 diff)
-
trunk/includes/gateway/class-omise-payment-boost.php (deleted)
-
trunk/includes/gateway/class-omise-payment-duitnow-obw.php (deleted)
-
trunk/includes/gateway/class-omise-payment-duitnow-qr.php (deleted)
-
trunk/includes/gateway/class-omise-payment-grabpay.php (modified) (1 diff)
-
trunk/includes/gateway/class-omise-payment-installment.php (modified) (1 diff)
-
trunk/includes/gateway/class-omise-payment-maybank-qr.php (deleted)
-
trunk/includes/gateway/class-omise-payment-shopeepay.php (deleted)
-
trunk/includes/gateway/class-omise-payment-touch-n-go.php (deleted)
-
trunk/includes/libraries/omise-plugin/Omise.php (modified) (1 diff)
-
trunk/includes/libraries/omise-plugin/helpers/request.php (deleted)
-
trunk/languages/omise-ja.mo (modified) (previous)
-
trunk/languages/omise-ja.po (modified) (3 diffs)
-
trunk/omise-woocommerce.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/templates/myaccount/my-card.php (modified) (4 diffs)
-
trunk/templates/payment/form-duitnow-obw.php (deleted)
-
trunk/templates/payment/form-fpx.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
omise/tags/4.23.3/CHANGELOG.md
r2771968 r2777535 1 1 # CHANGELOG 2 3 ### [v4.23.3 _(Aug 30, 2022)_](https://github.com/omise/omise-woocommerce/releases/tag/v4.23.3) 4 #### 👾 Bug Fixes 5 - Fixing the issue of card payment by reverting v4.23.2. (PR [#299](https://github.com/omise/omise-woocommerce/pull/299)) 2 6 3 7 ### [v4.23.2 _(Aug 18, 2022)_](https://github.com/omise/omise-woocommerce/releases/tag/v4.23.2) -
omise/tags/4.23.3/assets/javascripts/omise-payment-form-handler.js
r2771968 r2777535 23 23 24 24 $form.prepend( $ulError ); 25 $("html, body").animate({ scrollTop:0 },"slow"); 25 $("html, body").animate({ 26 scrollTop:0 27 },"slow"); 26 28 } 27 29 … … 69 71 }); 70 72 71 let errors = [],72 omise_card = {},73 let errors = [], 74 omise_card = {}, 73 75 omise_card_number_field = 'number', 74 omise_card_state_field = 'state', 75 omise_card_fields = { 76 'name' : $( '#omise_card_name' ), 77 'number' : $( '#omise_card_number' ), 76 omise_card_fields = { 77 'name' : $( '#omise_card_name' ), 78 'number' : $( '#omise_card_number' ), 78 79 'expiration_month' : $( '#omise_card_expiration_month' ), 79 'expiration_year' : $( '#omise_card_expiration_year' ), 80 'security_code' : $( '#omise_card_security_code' ), 81 'city' : $( '#billing_city' ), 82 'state' : $( '#billing_state' ), 83 'country' : $( '#billing_country' ), 84 'postal_code' : $( '#billing_postcode' ), 85 'street1' : $( '#billing_address_1' ) 80 'expiration_year' : $( '#omise_card_expiration_year' ), 81 'security_code' : $( '#omise_card_security_code' ) 86 82 }; 87 83 88 84 $.each( omise_card_fields, function( index, field ) { 89 if (index === omise_card_state_field) { 90 omise_card[ index ] = field.find(":selected").text(); 91 } else { 92 omise_card[ index ] = (index === omise_card_number_field) ? field.val().replace(/\s/g, '') : field.val(); 93 } 94 85 omise_card[ index ] = (index === omise_card_number_field) ? field.val().replace(/\s/g, '') : field.val(); 95 86 if ( "" === omise_card[ index ] ) { 96 87 errors.push( omise_params[ 'required_card_' + index ] ); … … 111 102 if (statusCode == 200) { 112 103 $.each( omise_card_fields, function( index, field ) { 113 const sensitiveDataIndex = ['name', 'number', 'expiration_year', 'expiration_month', 'security_code']; 114 if (sensitiveDataIndex.includes(index)) { 115 field.val( '' ); 116 } 104 field.val( '' ); 117 105 } ); 118 106 $form.append( '<input type="hidden" class="omise_token" name="omise_token" value="' + response.id + '"/>' ); … … 122 110 }; 123 111 }); 124 } else{112 }else{ 125 113 showError( omise_params.cannot_load_omisejs + '<br/>' + omise_params.check_internet_connection ); 126 114 $form.unblock(); -
omise/tags/4.23.3/includes/backends/class-omise-backend-fpx.php
r2771968 r2777535 19 19 */ 20 20 public function get_available_banks() { 21 $capabilities = $this->capabilities(); 22 23 if ( !$capabilities ){ 24 return null; 25 } 26 27 $providers = $capabilities->getFPXBanks(); 21 $providers = $this->capabilities()->getFPXBanks(); 28 22 $first_value = reset($providers); 29 23 -
omise/tags/4.23.3/includes/backends/class-omise-backend-installment.php
r2771968 r2777535 98 98 */ 99 99 public function get_available_providers( $currency, $purchase_amount ) { 100 $capabilities = $this->capabilities();101 102 if ( !$capabilities ){103 return null;104 }105 106 100 // Note: As installment payment at the moment only supports THB and MYR currency, the 107 101 // $purchase_amount is multiplied with 100 to convert the amount into subunit (satang and sen). 108 $providers = $ capabilities->getInstallmentBackends( $currency, ( $purchase_amount * 100 ) );102 $providers = $this->capabilities()->getInstallmentBackends( $currency, ( $purchase_amount * 100 ) ); 109 103 110 104 foreach ( $providers as &$provider ) { -
omise/tags/4.23.3/includes/backends/class-omise-backend-mobile-banking.php
r2771968 r2777535 36 36 */ 37 37 public function get_available_providers( $currency ) { 38 39 $providers = $this->capabilities()->getBackends( $currency ); 40 38 41 $mobile_banking_providers = array(); 39 $capabilities = $this->capabilities();40 42 41 if ( $capabilities ){42 $providers = $capabilities->getBackends( $currency );43 foreach ( $providers as &$provider ) { 44 if(isset(self::$providers[ $provider->_id ])){ 43 45 44 foreach ( $providers as &$provider ) { 45 if(isset(self::$providers[ $provider->_id ])){ 46 $provider_detail = self::$providers[ $provider->_id ]; 47 $provider->provider_name = $provider_detail['title']; 48 $provider->provider_logo = $provider_detail['logo']; 46 49 47 $provider_detail = self::$providers[ $provider->_id ]; 48 $provider->provider_name = $provider_detail['title']; 49 $provider->provider_logo = $provider_detail['logo']; 50 51 array_push($mobile_banking_providers, $provider); 52 } 50 array_push($mobile_banking_providers, $provider); 53 51 } 54 52 } -
omise/tags/4.23.3/includes/class-omise-callback.php
r2771968 r2777535 26 26 27 27 public static function execute() { 28 if(RequestHelper::isUserOriginated()) {29 return wp_redirect( wc_get_checkout_url() );30 }31 32 28 $order_id = isset( $_GET['order_id'] ) ? sanitize_text_field( $_GET['order_id'] ) : null; 33 29 … … 72 68 $message = __( 73 69 '<strong>We cannot validate your payment result:</strong><br/> 74 Note that your payment may have already been processed.<br/>75 Please contact our support team if you have any questions.',70 Note that your payment may have already been processed.<br/> 71 Please contact our support team if you have any questions.', 76 72 'omise' 77 73 ); … … 113 109 $message = __( 114 110 'Omise: The payment is being processed.<br/> 115 An amount %1$s %2$s has been authorized.',111 An amount %1$s %2$s has been authorized.', 116 112 'omise' 117 113 ); … … 139 135 $message = __( 140 136 'Omise: The payment is being processed.<br/> 141 Depending on the payment provider, this may take some time to process.<br/>142 Please do a manual \'Sync Payment Status\' action from the <strong>Order Actions</strong> panel, or check the payment status directly at the Omise Dashboard later.',137 Depending on the payment provider, this may take some time to process.<br/> 138 Please do a manual \'Sync Payment Status\' action from the <strong>Order Actions</strong> panel, or check the payment status directly at the Omise Dashboard later.', 143 139 'omise' 144 140 ); … … 157 153 */ 158 154 protected function payment_failed() { 159 $message = __( "It seems we've been unable to process your payment properly:<br/>%s", 'omise' );155 $message = __( "It seems we've been unable to process your payment properly:<br/>%s", 'omise' ); 160 156 $failure_message = Omise()->translate( $this->charge['failure_message'] ) . ' (code: ' . $this->charge['failure_code'] . ')'; 161 157 -
omise/tags/4.23.3/includes/class-omise-capabilities.php
r2771968 r2777535 21 21 public static function retrieve() { 22 22 if ( ! self::$the_instance ) { 23 try {24 $capabilities = OmiseCapabilities::retrieve();25 } catch(\Exception $e) {26 // suppressing error on the admin dashboard27 return null;28 }29 30 23 self::$the_instance = new self(); 31 self::$the_instance->capabilities = $capabilities;24 self::$the_instance->capabilities = OmiseCapabilities::retrieve(); 32 25 } 33 26 34 27 return self::$the_instance; 35 28 } … … 70 63 71 64 /** 72 * Retrieves details of Touch n Go payment backends from capabilities.73 *74 * @return string75 */76 public function getTouchNGoBackends() {77 $params = array();78 $params[] = $this->capabilities->backendFilter['type']('touch_n_go');79 80 return $this->capabilities->getBackends( $params );81 }82 83 /**84 65 * Retrieves details of fpx bank list from capabilities. 85 66 * -
omise/tags/4.23.3/includes/class-omise-payment-factory.php
r2771968 r2777535 34 34 'Omise_Payment_OCBC_PAO', 35 35 'Omise_Payment_GrabPay', 36 'Omise_Payment_GooglePay', 37 'Omise_Payment_Boost', 38 'Omise_Payment_ShopeePay', 39 'Omise_Payment_Maybank_QR', 40 'Omise_Payment_DuitNow_QR', 41 'Omise_Payment_DuitNow_OBW' 36 'Omise_Payment_GooglePay' 42 37 ); 43 38 -
omise/tags/4.23.3/includes/gateway/class-omise-payment-alipayplus.php
r2771968 r2777535 148 148 } 149 149 } 150 151 class Omise_Payment_TouchNGo extends Omise_Payment_Alipayplus { 152 public function __construct() { 153 $source = 'touch_n_go'; 154 $title = 'TNG eWallet'; 155 $countries = array( 'SG' ); 156 parent::__construct( $source, $title, $countries ); 157 } 158 } -
omise/tags/4.23.3/includes/gateway/class-omise-payment-grabpay.php
r2771968 r2777535 77 77 ) ); 78 78 } 79 80 /**81 * Get icons82 *83 * @see WC_Payment_Gateway::get_icon()84 */85 public function get_icon() {86 $icon = Omise_Image::get_image( array(87 'file' => 'grabpay.png',88 'alternate_text' => 'GrabPay',89 ));90 return apply_filters( 'woocommerce_gateway_icon', $icon, $this->id );91 }92 79 } -
omise/tags/4.23.3/includes/gateway/class-omise-payment-installment.php
r2771968 r2777535 73 73 array( 74 74 'installment_backends' => $this->backend->get_available_providers( $currency, $cart_total ), 75 'is_zero_interest' => $this->backend->capabilities() ? $this->backend->capabilities()->is_zero_interest() : false75 'is_zero_interest' => $this->backend->capabilities()->is_zero_interest() 76 76 ) 77 77 ); -
omise/tags/4.23.3/includes/libraries/omise-plugin/Omise.php
r2771968 r2777535 4 4 require_once dirname(__FILE__).'/helpers/wc_order.php'; 5 5 require_once dirname(__FILE__).'/helpers/mailer.php'; 6 require_once dirname(__FILE__).'/helpers/request.php'; -
omise/tags/4.23.3/languages/omise-ja.po
r2771968 r2777535 357 357 #: templates/payment/form-konhini.php:4 358 358 msgid "Name" 359 msgstr " カード名義"359 msgstr "名前" 360 360 361 361 #: templates/payment/form-konhini.php:8 … … 377 377 #: includes/class-omise-callback.php:156 378 378 msgid "email is in invalid format and phone_number must contain 10-11 digit characters" 379 msgstr " 電子メールの形式が無効です。電話_番号には10-11桁の数字を入力してください。"379 msgstr ""電子メールの形式が無効です。電話_番号には10-11桁の数字を入力してください"。" 380 380 381 381 #: includes/class-omise-callback.php:156 … … 462 462 msgid "Your payment code has been sent to your email" 463 463 msgstr "お客様のメールに決済コードが送信されました。" 464 465 #: templates/myaccount/my-card.php466 msgid "Cards"467 msgstr "カード"468 469 #: templates/myaccount/my-card.php470 msgid "Number"471 msgstr "カード番号"472 473 #: templates/myaccount/my-card.php474 msgid "Created date"475 msgstr "カード作成日"476 477 #: templates/myaccount/my-card.php478 msgid "Action"479 msgstr "アクション"480 481 #: templates/myaccount/my-card.php482 msgid "Add new card"483 msgstr "新しいカードを追加する"484 485 #: templates/myaccount/my-card.php486 msgid "Save card"487 msgstr "カードを保存する"488 489 #: templates/myaccount/my-card.php490 msgid "Delete"491 msgstr "削除する" -
omise/tags/4.23.3/omise-woocommerce.php
r2771968 r2777535 4 4 * Plugin URI: https://www.omise.co/woocommerce 5 5 * Description: Omise WooCommerce Gateway Plugin is a WordPress plugin designed specifically for WooCommerce. The plugin adds support for Omise Payment Gateway payment method to WooCommerce. 6 * Version: 4.23. 26 * Version: 4.23.3 7 7 * Author: Omise and contributors 8 8 * Author URI: https://github.com/omise/omise-woocommerce/graphs/contributors 9 9 * Text Domain: omise 10 10 * WC requires at least: 3.3.4 11 * WC tested up to: 5.7.011 * WC tested up to: 6.0.1 12 12 * License: MIT 13 13 * License URI: https://opensource.org/licenses/MIT … … 21 21 * @var string 22 22 */ 23 public $version = '4.23. 2';23 public $version = '4.23.3'; 24 24 25 25 /** … … 125 125 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/backends/class-omise-backend-mobile-banking.php'; 126 126 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/backends/class-omise-backend-fpx.php'; 127 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/backends/class-omise-backend-touch-n-go.php';128 127 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/classes/class-omise-charge.php'; 129 128 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/classes/class-omise-card-image.php'; … … 152 151 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-grabpay.php'; 153 152 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-ocbc-pao.php'; 154 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-boost.php';155 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-duitnow-obw.php';156 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-duitnow-qr.php';157 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-maybank-qr.php';158 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-shopeepay.php';159 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-touch-n-go.php';160 153 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment.php'; 161 154 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/libraries/omise-php/lib/Omise.php'; -
omise/tags/4.23.3/readme.txt
r2771968 r2777535 3 3 Tags: omise, payment, payment gateway, woocommerce plugin, installment, internet banking, alipay, paynow, truemoney wallet, woocommerce payment 4 4 Requires at least: 4.3.1 5 Tested up to: 5.9.06 Stable tag: 4.23. 25 Tested up to: 6.0.1 6 Stable tag: 4.23.3 7 7 License: MIT 8 8 License URI: https://opensource.org/licenses/MIT … … 33 33 34 34 == Changelog == 35 36 = 4.23.3 = 37 38 #### 👾 Bug Fixes 39 - Fixing the issue of card payment by reverting v4.23.2. (PR [#299](https://github.com/omise/omise-woocommerce/pull/299)) 35 40 36 41 = 4.23.2 = -
omise/tags/4.23.3/templates/myaccount/my-card.php
r2771968 r2777535 1 <h3><?php _e( 'Cards', 'omise' ); ?></h3> 1 <h2>Omise settings</h2> 2 <h3>Cards</h3> 2 3 <div id="omise_card_panel"> 3 4 <table> 4 5 <tr> 5 <th> <?php _e( 'Name', 'omise' ); ?></th>6 <th> <?php _e( 'Number', 'omise' ); ?></th>7 <th> <?php _e( 'Created date', 'omise' ); ?></th>8 <th> <?php _e( 'Action', 'omise' ); ?></th>6 <th>Name</th> 7 <th>Number</th> 8 <th>Created date</th> 9 <th>Action</th> 9 10 </tr> 10 11 <tbody> … … 12 13 <?php foreach( $viewData['existingCards']['data'] as $card ): ?> 13 14 <?php 14 $nonce = wp_create_nonce( 'omise_delete_card_' . $card['id'] ); 15 $created_date = date_i18n( get_option( 'date_format' ), strtotime($card['created'])); 15 $nonce = wp_create_nonce( 'omise_delete_card_' . $card['id'] ); 16 echo "<tr><td>{$card['name']}</td><td>XXXX XXXX XXXX {$card['last_digits']}</td>"; 17 $created_date = date_i18n( get_option( 'date_format' ), strtotime($card['created'])); 18 echo "<td>{$created_date}</td>"; 19 echo "<td><button class='button delete_card' data-card-id='{$card['id']}' data-delete-card-nonce='{$nonce}'>Delete</button></td></tr>"; 16 20 ?> 17 <tr>18 <td><?= $card['name'] ?></td>19 <td>XXXX XXXX XXXX <?= $card['last_digits'] ?></td>20 <td><?= $created_date ?></td>21 <td>22 <button23 class='button delete_card'24 data-card-id=<?= $card['id'] ?>25 data-delete-card-nonce=<?= $nonce ?>26 >27 <?php _e( 'Delete', 'omise' ); ?>28 </button>29 </td>30 </tr>31 21 <?php endforeach; ?> 32 22 <?php endif; ?> … … 34 24 </table> 35 25 36 <h4> <?php _e( 'Add new card', 'omise' ); ?></h4>26 <h4>Add new card</h4> 37 27 <form name="omise_cc_form" id="omise_cc_form"> 38 28 <?php wp_nonce_field('omise_add_card','omise_add_card_nonce'); ?> … … 42 32 </fieldset> 43 33 </form> 44 <button id="omise_add_new_card" class="button"> <?php _e( 'Save card', 'omise' ); ?></button>34 <button id="omise_add_new_card" class="button">Save card</button> 45 35 </div> -
omise/tags/4.23.3/templates/payment/form-fpx.php
r2771968 r2777535 33 33 <script type="text/javascript"> 34 34 var selectElem = document.getElementById("fpx-select-bank"); 35 if(selectElem) { 36 selectElem.addEventListener('change', function(e) { 37 selectElem.setAttribute("class", e.target.value); 38 }) 39 } 35 selectElem.addEventListener('change', function(e) { 36 selectElem.setAttribute("class", e.target.value); 37 }) 40 38 </script> -
omise/trunk/CHANGELOG.md
r2771968 r2777535 1 1 # CHANGELOG 2 3 ### [v4.23.3 _(Aug 30, 2022)_](https://github.com/omise/omise-woocommerce/releases/tag/v4.23.3) 4 #### 👾 Bug Fixes 5 - Fixing the issue of card payment by reverting v4.23.2. (PR [#299](https://github.com/omise/omise-woocommerce/pull/299)) 2 6 3 7 ### [v4.23.2 _(Aug 18, 2022)_](https://github.com/omise/omise-woocommerce/releases/tag/v4.23.2) -
omise/trunk/assets/javascripts/omise-payment-form-handler.js
r2771968 r2777535 23 23 24 24 $form.prepend( $ulError ); 25 $("html, body").animate({ scrollTop:0 },"slow"); 25 $("html, body").animate({ 26 scrollTop:0 27 },"slow"); 26 28 } 27 29 … … 69 71 }); 70 72 71 let errors = [],72 omise_card = {},73 let errors = [], 74 omise_card = {}, 73 75 omise_card_number_field = 'number', 74 omise_card_state_field = 'state', 75 omise_card_fields = { 76 'name' : $( '#omise_card_name' ), 77 'number' : $( '#omise_card_number' ), 76 omise_card_fields = { 77 'name' : $( '#omise_card_name' ), 78 'number' : $( '#omise_card_number' ), 78 79 'expiration_month' : $( '#omise_card_expiration_month' ), 79 'expiration_year' : $( '#omise_card_expiration_year' ), 80 'security_code' : $( '#omise_card_security_code' ), 81 'city' : $( '#billing_city' ), 82 'state' : $( '#billing_state' ), 83 'country' : $( '#billing_country' ), 84 'postal_code' : $( '#billing_postcode' ), 85 'street1' : $( '#billing_address_1' ) 80 'expiration_year' : $( '#omise_card_expiration_year' ), 81 'security_code' : $( '#omise_card_security_code' ) 86 82 }; 87 83 88 84 $.each( omise_card_fields, function( index, field ) { 89 if (index === omise_card_state_field) { 90 omise_card[ index ] = field.find(":selected").text(); 91 } else { 92 omise_card[ index ] = (index === omise_card_number_field) ? field.val().replace(/\s/g, '') : field.val(); 93 } 94 85 omise_card[ index ] = (index === omise_card_number_field) ? field.val().replace(/\s/g, '') : field.val(); 95 86 if ( "" === omise_card[ index ] ) { 96 87 errors.push( omise_params[ 'required_card_' + index ] ); … … 111 102 if (statusCode == 200) { 112 103 $.each( omise_card_fields, function( index, field ) { 113 const sensitiveDataIndex = ['name', 'number', 'expiration_year', 'expiration_month', 'security_code']; 114 if (sensitiveDataIndex.includes(index)) { 115 field.val( '' ); 116 } 104 field.val( '' ); 117 105 } ); 118 106 $form.append( '<input type="hidden" class="omise_token" name="omise_token" value="' + response.id + '"/>' ); … … 122 110 }; 123 111 }); 124 } else{112 }else{ 125 113 showError( omise_params.cannot_load_omisejs + '<br/>' + omise_params.check_internet_connection ); 126 114 $form.unblock(); -
omise/trunk/includes/backends/class-omise-backend-fpx.php
r2771968 r2777535 19 19 */ 20 20 public function get_available_banks() { 21 $capabilities = $this->capabilities(); 22 23 if ( !$capabilities ){ 24 return null; 25 } 26 27 $providers = $capabilities->getFPXBanks(); 21 $providers = $this->capabilities()->getFPXBanks(); 28 22 $first_value = reset($providers); 29 23 -
omise/trunk/includes/backends/class-omise-backend-installment.php
r2771968 r2777535 98 98 */ 99 99 public function get_available_providers( $currency, $purchase_amount ) { 100 $capabilities = $this->capabilities();101 102 if ( !$capabilities ){103 return null;104 }105 106 100 // Note: As installment payment at the moment only supports THB and MYR currency, the 107 101 // $purchase_amount is multiplied with 100 to convert the amount into subunit (satang and sen). 108 $providers = $ capabilities->getInstallmentBackends( $currency, ( $purchase_amount * 100 ) );102 $providers = $this->capabilities()->getInstallmentBackends( $currency, ( $purchase_amount * 100 ) ); 109 103 110 104 foreach ( $providers as &$provider ) { -
omise/trunk/includes/backends/class-omise-backend-mobile-banking.php
r2771968 r2777535 36 36 */ 37 37 public function get_available_providers( $currency ) { 38 39 $providers = $this->capabilities()->getBackends( $currency ); 40 38 41 $mobile_banking_providers = array(); 39 $capabilities = $this->capabilities();40 42 41 if ( $capabilities ){42 $providers = $capabilities->getBackends( $currency );43 foreach ( $providers as &$provider ) { 44 if(isset(self::$providers[ $provider->_id ])){ 43 45 44 foreach ( $providers as &$provider ) { 45 if(isset(self::$providers[ $provider->_id ])){ 46 $provider_detail = self::$providers[ $provider->_id ]; 47 $provider->provider_name = $provider_detail['title']; 48 $provider->provider_logo = $provider_detail['logo']; 46 49 47 $provider_detail = self::$providers[ $provider->_id ]; 48 $provider->provider_name = $provider_detail['title']; 49 $provider->provider_logo = $provider_detail['logo']; 50 51 array_push($mobile_banking_providers, $provider); 52 } 50 array_push($mobile_banking_providers, $provider); 53 51 } 54 52 } -
omise/trunk/includes/class-omise-callback.php
r2771968 r2777535 26 26 27 27 public static function execute() { 28 if(RequestHelper::isUserOriginated()) {29 return wp_redirect( wc_get_checkout_url() );30 }31 32 28 $order_id = isset( $_GET['order_id'] ) ? sanitize_text_field( $_GET['order_id'] ) : null; 33 29 … … 72 68 $message = __( 73 69 '<strong>We cannot validate your payment result:</strong><br/> 74 Note that your payment may have already been processed.<br/>75 Please contact our support team if you have any questions.',70 Note that your payment may have already been processed.<br/> 71 Please contact our support team if you have any questions.', 76 72 'omise' 77 73 ); … … 113 109 $message = __( 114 110 'Omise: The payment is being processed.<br/> 115 An amount %1$s %2$s has been authorized.',111 An amount %1$s %2$s has been authorized.', 116 112 'omise' 117 113 ); … … 139 135 $message = __( 140 136 'Omise: The payment is being processed.<br/> 141 Depending on the payment provider, this may take some time to process.<br/>142 Please do a manual \'Sync Payment Status\' action from the <strong>Order Actions</strong> panel, or check the payment status directly at the Omise Dashboard later.',137 Depending on the payment provider, this may take some time to process.<br/> 138 Please do a manual \'Sync Payment Status\' action from the <strong>Order Actions</strong> panel, or check the payment status directly at the Omise Dashboard later.', 143 139 'omise' 144 140 ); … … 157 153 */ 158 154 protected function payment_failed() { 159 $message = __( "It seems we've been unable to process your payment properly:<br/>%s", 'omise' );155 $message = __( "It seems we've been unable to process your payment properly:<br/>%s", 'omise' ); 160 156 $failure_message = Omise()->translate( $this->charge['failure_message'] ) . ' (code: ' . $this->charge['failure_code'] . ')'; 161 157 -
omise/trunk/includes/class-omise-capabilities.php
r2771968 r2777535 21 21 public static function retrieve() { 22 22 if ( ! self::$the_instance ) { 23 try {24 $capabilities = OmiseCapabilities::retrieve();25 } catch(\Exception $e) {26 // suppressing error on the admin dashboard27 return null;28 }29 30 23 self::$the_instance = new self(); 31 self::$the_instance->capabilities = $capabilities;24 self::$the_instance->capabilities = OmiseCapabilities::retrieve(); 32 25 } 33 26 34 27 return self::$the_instance; 35 28 } … … 70 63 71 64 /** 72 * Retrieves details of Touch n Go payment backends from capabilities.73 *74 * @return string75 */76 public function getTouchNGoBackends() {77 $params = array();78 $params[] = $this->capabilities->backendFilter['type']('touch_n_go');79 80 return $this->capabilities->getBackends( $params );81 }82 83 /**84 65 * Retrieves details of fpx bank list from capabilities. 85 66 * -
omise/trunk/includes/class-omise-payment-factory.php
r2771968 r2777535 34 34 'Omise_Payment_OCBC_PAO', 35 35 'Omise_Payment_GrabPay', 36 'Omise_Payment_GooglePay', 37 'Omise_Payment_Boost', 38 'Omise_Payment_ShopeePay', 39 'Omise_Payment_Maybank_QR', 40 'Omise_Payment_DuitNow_QR', 41 'Omise_Payment_DuitNow_OBW' 36 'Omise_Payment_GooglePay' 42 37 ); 43 38 -
omise/trunk/includes/gateway/class-omise-payment-alipayplus.php
r2771968 r2777535 148 148 } 149 149 } 150 151 class Omise_Payment_TouchNGo extends Omise_Payment_Alipayplus { 152 public function __construct() { 153 $source = 'touch_n_go'; 154 $title = 'TNG eWallet'; 155 $countries = array( 'SG' ); 156 parent::__construct( $source, $title, $countries ); 157 } 158 } -
omise/trunk/includes/gateway/class-omise-payment-grabpay.php
r2771968 r2777535 77 77 ) ); 78 78 } 79 80 /**81 * Get icons82 *83 * @see WC_Payment_Gateway::get_icon()84 */85 public function get_icon() {86 $icon = Omise_Image::get_image( array(87 'file' => 'grabpay.png',88 'alternate_text' => 'GrabPay',89 ));90 return apply_filters( 'woocommerce_gateway_icon', $icon, $this->id );91 }92 79 } -
omise/trunk/includes/gateway/class-omise-payment-installment.php
r2771968 r2777535 73 73 array( 74 74 'installment_backends' => $this->backend->get_available_providers( $currency, $cart_total ), 75 'is_zero_interest' => $this->backend->capabilities() ? $this->backend->capabilities()->is_zero_interest() : false75 'is_zero_interest' => $this->backend->capabilities()->is_zero_interest() 76 76 ) 77 77 ); -
omise/trunk/includes/libraries/omise-plugin/Omise.php
r2771968 r2777535 4 4 require_once dirname(__FILE__).'/helpers/wc_order.php'; 5 5 require_once dirname(__FILE__).'/helpers/mailer.php'; 6 require_once dirname(__FILE__).'/helpers/request.php'; -
omise/trunk/languages/omise-ja.po
r2771968 r2777535 357 357 #: templates/payment/form-konhini.php:4 358 358 msgid "Name" 359 msgstr " カード名義"359 msgstr "名前" 360 360 361 361 #: templates/payment/form-konhini.php:8 … … 377 377 #: includes/class-omise-callback.php:156 378 378 msgid "email is in invalid format and phone_number must contain 10-11 digit characters" 379 msgstr " 電子メールの形式が無効です。電話_番号には10-11桁の数字を入力してください。"379 msgstr ""電子メールの形式が無効です。電話_番号には10-11桁の数字を入力してください"。" 380 380 381 381 #: includes/class-omise-callback.php:156 … … 462 462 msgid "Your payment code has been sent to your email" 463 463 msgstr "お客様のメールに決済コードが送信されました。" 464 465 #: templates/myaccount/my-card.php466 msgid "Cards"467 msgstr "カード"468 469 #: templates/myaccount/my-card.php470 msgid "Number"471 msgstr "カード番号"472 473 #: templates/myaccount/my-card.php474 msgid "Created date"475 msgstr "カード作成日"476 477 #: templates/myaccount/my-card.php478 msgid "Action"479 msgstr "アクション"480 481 #: templates/myaccount/my-card.php482 msgid "Add new card"483 msgstr "新しいカードを追加する"484 485 #: templates/myaccount/my-card.php486 msgid "Save card"487 msgstr "カードを保存する"488 489 #: templates/myaccount/my-card.php490 msgid "Delete"491 msgstr "削除する" -
omise/trunk/omise-woocommerce.php
r2771968 r2777535 4 4 * Plugin URI: https://www.omise.co/woocommerce 5 5 * Description: Omise WooCommerce Gateway Plugin is a WordPress plugin designed specifically for WooCommerce. The plugin adds support for Omise Payment Gateway payment method to WooCommerce. 6 * Version: 4.23. 26 * Version: 4.23.3 7 7 * Author: Omise and contributors 8 8 * Author URI: https://github.com/omise/omise-woocommerce/graphs/contributors 9 9 * Text Domain: omise 10 10 * WC requires at least: 3.3.4 11 * WC tested up to: 5.7.011 * WC tested up to: 6.0.1 12 12 * License: MIT 13 13 * License URI: https://opensource.org/licenses/MIT … … 21 21 * @var string 22 22 */ 23 public $version = '4.23. 2';23 public $version = '4.23.3'; 24 24 25 25 /** … … 125 125 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/backends/class-omise-backend-mobile-banking.php'; 126 126 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/backends/class-omise-backend-fpx.php'; 127 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/backends/class-omise-backend-touch-n-go.php';128 127 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/classes/class-omise-charge.php'; 129 128 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/classes/class-omise-card-image.php'; … … 152 151 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-grabpay.php'; 153 152 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-ocbc-pao.php'; 154 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-boost.php';155 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-duitnow-obw.php';156 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-duitnow-qr.php';157 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-maybank-qr.php';158 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-shopeepay.php';159 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment-touch-n-go.php';160 153 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/gateway/class-omise-payment.php'; 161 154 require_once OMISE_WOOCOMMERCE_PLUGIN_PATH . '/includes/libraries/omise-php/lib/Omise.php'; -
omise/trunk/readme.txt
r2771968 r2777535 3 3 Tags: omise, payment, payment gateway, woocommerce plugin, installment, internet banking, alipay, paynow, truemoney wallet, woocommerce payment 4 4 Requires at least: 4.3.1 5 Tested up to: 5.9.06 Stable tag: 4.23. 25 Tested up to: 6.0.1 6 Stable tag: 4.23.3 7 7 License: MIT 8 8 License URI: https://opensource.org/licenses/MIT … … 33 33 34 34 == Changelog == 35 36 = 4.23.3 = 37 38 #### 👾 Bug Fixes 39 - Fixing the issue of card payment by reverting v4.23.2. (PR [#299](https://github.com/omise/omise-woocommerce/pull/299)) 35 40 36 41 = 4.23.2 = -
omise/trunk/templates/myaccount/my-card.php
r2771968 r2777535 1 <h3><?php _e( 'Cards', 'omise' ); ?></h3> 1 <h2>Omise settings</h2> 2 <h3>Cards</h3> 2 3 <div id="omise_card_panel"> 3 4 <table> 4 5 <tr> 5 <th> <?php _e( 'Name', 'omise' ); ?></th>6 <th> <?php _e( 'Number', 'omise' ); ?></th>7 <th> <?php _e( 'Created date', 'omise' ); ?></th>8 <th> <?php _e( 'Action', 'omise' ); ?></th>6 <th>Name</th> 7 <th>Number</th> 8 <th>Created date</th> 9 <th>Action</th> 9 10 </tr> 10 11 <tbody> … … 12 13 <?php foreach( $viewData['existingCards']['data'] as $card ): ?> 13 14 <?php 14 $nonce = wp_create_nonce( 'omise_delete_card_' . $card['id'] ); 15 $created_date = date_i18n( get_option( 'date_format' ), strtotime($card['created'])); 15 $nonce = wp_create_nonce( 'omise_delete_card_' . $card['id'] ); 16 echo "<tr><td>{$card['name']}</td><td>XXXX XXXX XXXX {$card['last_digits']}</td>"; 17 $created_date = date_i18n( get_option( 'date_format' ), strtotime($card['created'])); 18 echo "<td>{$created_date}</td>"; 19 echo "<td><button class='button delete_card' data-card-id='{$card['id']}' data-delete-card-nonce='{$nonce}'>Delete</button></td></tr>"; 16 20 ?> 17 <tr>18 <td><?= $card['name'] ?></td>19 <td>XXXX XXXX XXXX <?= $card['last_digits'] ?></td>20 <td><?= $created_date ?></td>21 <td>22 <button23 class='button delete_card'24 data-card-id=<?= $card['id'] ?>25 data-delete-card-nonce=<?= $nonce ?>26 >27 <?php _e( 'Delete', 'omise' ); ?>28 </button>29 </td>30 </tr>31 21 <?php endforeach; ?> 32 22 <?php endif; ?> … … 34 24 </table> 35 25 36 <h4> <?php _e( 'Add new card', 'omise' ); ?></h4>26 <h4>Add new card</h4> 37 27 <form name="omise_cc_form" id="omise_cc_form"> 38 28 <?php wp_nonce_field('omise_add_card','omise_add_card_nonce'); ?> … … 42 32 </fieldset> 43 33 </form> 44 <button id="omise_add_new_card" class="button"> <?php _e( 'Save card', 'omise' ); ?></button>34 <button id="omise_add_new_card" class="button">Save card</button> 45 35 </div> -
omise/trunk/templates/payment/form-fpx.php
r2771968 r2777535 33 33 <script type="text/javascript"> 34 34 var selectElem = document.getElementById("fpx-select-bank"); 35 if(selectElem) { 36 selectElem.addEventListener('change', function(e) { 37 selectElem.setAttribute("class", e.target.value); 38 }) 39 } 35 selectElem.addEventListener('change', function(e) { 36 selectElem.setAttribute("class", e.target.value); 37 }) 40 38 </script>
Note: See TracChangeset
for help on using the changeset viewer.