Plugin Directory

Changeset 2192824


Ignore:
Timestamp:
11/14/2019 02:02:19 PM (6 years ago)
Author:
idsbdigital
Message:

update to 1.5

Location:
idpay/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • idpay/trunk/index.php

    r2188392 r2192824  
    55 * Plugin URI: https://idpay.my
    66 * Description: Enable payment by salary deduction. Currently IDPay service is only available for customer that working as government servants in Malaysia.
    7  * Version: 1.4
     7 * Version: 1.5
    88 * Author: IDSB Digital Sdn. Bhd.
    99 * Author URI: https://idsb.my
     
    222222                            break;
    223223                        case 'ready_for_salary_deduction':
    224                             $order->add_order_note('Waiting for merchant to approve customer application');
     224                            if (get_post_meta($order_id, '_idpay_status', true) != $status_type) {
     225                                $order->add_order_note('Waiting for merchant to approve customer application');
     226                                update_post_meta($order_id, '_idpay_status', $status_type, true);
     227                            }
    225228                            break;
    226229                        case 'eligible':
    227                             $order->add_order_note('Customer is eligible for this transaction. Please provide AG/BPA form to customer and deliver the signed form to IDPay office to process');
     230                            if (get_post_meta($order_id, '_idpay_status', true) != $status_type) {
     231                                $order->add_order_note('Customer is eligible for this transaction. Please provide AG/BPA form to customer and deliver the signed form to IDPay office to process');
     232                                update_post_meta($order_id, '_idpay_status', $status_type, true);
     233                            }
    228234                            break;
    229235                        case 'not_eligible':
     
    238244                            if (!get_post_meta($order_id, '_idpay_transaction', true)) {
    239245                                $order->add_order_note('IDPay transaction number is '. $transaction_number);
    240                                 add_post_meta($order_id, '_idpay_transaction', $transaction_number, true);
     246                                update_post_meta($order_id, '_idpay_transaction', $transaction_number, true);
     247                                update_post_meta($order_id, '_idpay_status', $status_type, true);
    241248                            }
    242249                            break;
     
    332339                        break;
    333340                    case 'ready_for_salary_deduction':
    334                         $order->add_order_note('Waiting for merchant to approve customer application');
     341                        if (get_post_meta($order_id, '_idpay_status', true) != $status_type) {
     342                            $order->add_order_note('Waiting for merchant to approve customer application');
     343                            update_post_meta($order_id, '_idpay_status', $status_type, true);
     344                        }
    335345                        break;
    336346                    case 'eligible':
    337                         $order->add_order_note('Customer is eligible for this transaction. Please provide AG/BPA form to customer and deliver the signed form to IDPay office to process');
     347                        if (get_post_meta($order_id, '_idpay_status', true) != $status_type) {
     348                            $order->add_order_note('Customer is eligible for this transaction. Please provide AG/BPA form to customer and deliver the signed form to IDPay office to process');
     349                            update_post_meta($order_id, '_idpay_status', $status_type, true);
     350                        }
    338351                        break;
    339352                    case 'not_eligible':
     
    349362                            $order->add_order_note('IDPay transaction number is '. $transaction_number);
    350363                            add_post_meta($order_id, '_idpay_transaction', $transaction_number, true);
     364                            update_post_meta($order_id, '_idpay_status', $status_type, true);
    351365                        }
    352366                        break;
  • idpay/trunk/readme.txt

    r2188392 r2192824  
    3030== Changelog ==
    3131
     32= 1.5 =
     33* store & check status to avoid duplicate order note
     34
    3235= 1.4 =
    3336* change status to on-hold to avoid WC auto cancel unpaid order
Note: See TracChangeset for help on using the changeset viewer.