Changeset 2188392
- Timestamp:
- 11/08/2019 12:30:21 PM (6 years ago)
- Location:
- idpay/trunk
- Files:
-
- 2 edited
-
index.php (modified) (7 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
idpay/trunk/index.php
r2186073 r2188392 5 5 * Plugin URI: https://idpay.my 6 6 * Description: Enable payment by salary deduction. Currently IDPay service is only available for customer that working as government servants in Malaysia. 7 * Version: 1. 37 * Version: 1.4 8 8 * Author: IDSB Digital Sdn. Bhd. 9 9 * Author URI: https://idsb.my … … 199 199 if ($order) { 200 200 $order->add_order_note('Request for salary deduction has been submitted to IDPay. Waiting for eligibility check.'); 201 $order->update_status(' pending');201 $order->update_status('on-hold'); 202 202 $woocommerce->cart->empty_cart(); 203 203 } … … 225 225 break; 226 226 case 'eligible': 227 $order->add_order_note('Customer is eligible for this transaction. Please provide AG/BPA form to customer for employer verification and send it to IDPay office to proceed'); 228 $order->update_status('on-hold'); 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'); 229 228 break; 230 229 case 'not_eligible': … … 237 236 break; 238 237 case 'submitted': 239 $order->add_order_note('IDPay transaction number is '. $transaction_number); 238 if (!get_post_meta($order_id, '_idpay_transaction', true)) { 239 $order->add_order_note('IDPay transaction number is '. $transaction_number); 240 add_post_meta($order_id, '_idpay_transaction', $transaction_number, true); 241 } 240 242 break; 241 243 } … … 308 310 $customer_orders = wc_get_orders(array( 309 311 'limit' => -1, 310 'status' => ' pending'312 'status' => 'on-hold' 311 313 )); 312 314 313 // Iterating through each Order with pendingstatus315 // Iterating through each Order with on-hold status 314 316 foreach ($customer_orders as $order) { 315 317 $order_id = version_compare( WC_VERSION, '3.0', '<' ) ? $order->id : $order->get_id(); … … 333 335 break; 334 336 case 'eligible': 335 $order->add_order_note('Customer is eligible for this transaction. Please provide AG/BPA form to customer for employer verification and send it to IDPay office to proceed'); 336 $order->update_status('on-hold'); 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'); 337 338 break; 338 339 case 'not_eligible': … … 345 346 break; 346 347 case 'submitted': 347 $order->add_order_note('IDPay transaction number is '. $transaction_number); 348 if (!get_post_meta($order_id, '_idpay_transaction', true)) { 349 $order->add_order_note('IDPay transaction number is '. $transaction_number); 350 add_post_meta($order_id, '_idpay_transaction', $transaction_number, true); 351 } 348 352 break; 349 353 } -
idpay/trunk/readme.txt
r2186073 r2188392 30 30 == Changelog == 31 31 32 = 1.4 = 33 * change status to on-hold to avoid WC auto cancel unpaid order 34 * add txn id meta to order to avoid duplicate order note 35 32 36 = 1.3 = 33 37 * add transaction number to WC order note
Note: See TracChangeset
for help on using the changeset viewer.