Changeset 2262063
- Timestamp:
- 03/16/2020 10:29:17 PM (6 years ago)
- Location:
- woo-voguepay/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (1 diff)
-
includes/class.voguepay.php (modified) (5 diffs)
-
woo-voguepay.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
woo-voguepay/trunk/README.txt
r2223926 r2262063 62 62 63 63 == Changelog == 64 = 1.5.4 = 65 * Fixed cloudflare issue with transaction callback 66 * Transaction status now updates while using local server 64 67 = 1.5.0 = 65 68 * Inline payment minor bug fixed -
woo-voguepay/trunk/includes/class.voguepay.php
r2121042 r2262063 19 19 $this->method_title = 'VoguePay'; 20 20 $this->method_description = __('Voguepay provide services for to accept online payments from local and international customers using Mastercard, Visa, Verve Cards and other payment options', 'woo-voguepay-lang'); 21 22 //On return page, attempt to requery incase callback failed 23 if(isset($_POST['transaction_id']) && isset($_GET['key'])) 24 { 25 $res = wp_remote_post( $this->notify_url, ['body'=>$_POST] ); 26 } 21 27 22 28 // Load the form fields. … … 431 437 $transaction_id = $transaction['transaction_id']; 432 438 $ref_split = explode('-', $transaction['merchant_ref'] ); 433 434 439 435 440 $order_id = (int) $ref_split[0]; 436 441 437 442 $order = wc_get_order($order_id); 438 443 $order_total = $order->get_total(); 444 445 if(count($order->get_data()['meta_data'])>2) { 446 if($transaction_id == $order->get_data()['meta_data'][2]->get_data()['value']) { 447 echo "Callback already processed"; 448 die(); 449 } 450 } 451 if($transaction_id == $order->data['transaction_id']) { 452 echo "Callback already processed"; 453 die(); 454 } 439 455 440 456 $amount_paid_currency = $ref_split[1]; … … 466 482 echo 'Merchant ID mis-match'; 467 483 468 } else { 484 } 485 else { 469 486 470 487 // check if the amount paid is equal to the order amount. … … 491 508 echo 'Total amount mis-match'; 492 509 493 } else { 510 } 511 else { 494 512 495 513 $order->payment_complete( $transaction_id ); … … 517 535 518 536 519 } else { 537 } 538 else { 520 539 521 540 $message = __('Payment failed', 'woo-voguepay-lang'); -
woo-voguepay/trunk/woo-voguepay.php
r2121042 r2262063 10 10 * Plugin URI: https://wordpress.org/plugins/woo-voguepay/ 11 11 * Description: VoguePay plugin for WooCommerce. 12 * Version: 1.5. 212 * Version: 1.5.4 13 13 * Author: kunlexzy 14 14 * Author URI: https://voguepay.com/3445-0056682
Note: See TracChangeset
for help on using the changeset viewer.