Changeset 3160196
- Timestamp:
- 10/01/2024 02:52:35 AM (17 months ago)
- Location:
- 9pay-gateway/trunk
- Files:
-
- 2 edited
-
includes/gateways/core/config.php (modified) (1 diff)
-
mc-ninepay.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
9pay-gateway/trunk/includes/gateways/core/config.php
r2919019 r3160196 22 22 23 23 'exc_rate_host_production' => 'https://payment.9pay.vn/exchange-rate', 24 'exc_rate_host_sand' => 'https://sand-p ortal.9pay.vn/exchange-rate',24 'exc_rate_host_sand' => 'https://sand-payment.9pay.vn/exchange-rate', 25 25 ), 26 26 'min_amount' => 2000, -
9pay-gateway/trunk/mc-ninepay.php
r2919019 r3160196 327 327 328 328 $all_currencies = json_decode( $result, true ); 329 if($currency === "VND") return 1; 329 330 return $all_currencies[ $currency ]['rate']; 330 331 } … … 748 749 if ( 'ninepay-gateway' === WC()->session->get( 'chosen_payment_method' ) ) { 749 750 $payment = new WC_Payment_Gateways(); 751 752 $ninepay_payment_method = sanitize_text_field( wp_unslash( $_POST['ninepay_payment_method'] ) ); 753 750 754 $config = $payment->get_available_payment_gateways()['ninepay-gateway']->settings; 751 755 $config_lang = include 'includes/gateways/core/lang.php'; 752 756 $lang = $config['ninepay_lang']; 753 if(empty($_POST['post_data'])) {754 return;755 }757 if(empty($_POST['post_data'])) { 758 return; 759 } 756 760 $post_data = sanitize_text_field( wp_unslash( $_POST['post_data'] ) ); 757 761 if ( is_null( $post_data ) ) { … … 763 767 $total_amount = $cart->cart_contents_total; 764 768 765 $fee = ninepay_add_fee( $ninepay_payment_method, $total_amount, $config );769 $fee = !empty($ninepay_payment_method) ? ninepay_add_fee( $ninepay_payment_method, $total_amount, $config ) : 0; 766 770 767 771 if ( $fee !== 0 ) {
Note: See TracChangeset
for help on using the changeset viewer.