Changeset 1374790
- Timestamp:
- 03/19/2016 09:23:23 PM (10 years ago)
- Location:
- 2cpay/trunk
- Files:
-
- 3 edited
-
2cpay.php (modified) (1 diff)
-
includes/gateway.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
2cpay/trunk/2cpay.php
r1374659 r1374790 5 5 Plugin URI: https://www.zonalhost.com 6 6 Description: 2Checkout Payment Gateway Plugin for Woocommerce. 7 Version: 1. 17 Version: 1.2 8 8 Author: ZonalHost 9 9 Author URI: https://www.zonalhost.com -
2cpay/trunk/includes/gateway.php
r1374635 r1374790 47 47 $hashOrder = $_REQUEST['order_number']; //2Checkout Order Number 48 48 $StringToHash = strtoupper(md5($hashSecretWord . $hashSid . $hashOrder . $hashTotal)); 49 $header_received = json_encode(print_r($_POST, true)); 49 50 if ($StringToHash != $_REQUEST['key']) { 50 51 wc_add_notice('2Checkout payment could not be completed. Error - Hash Mismatch', 'error'); 51 $order->add_order_note( __( 'Error: 2Checkout payment could not be completed.') ); 52 52 $order->add_order_note( __( 'Error: 2Checkout payment could not be completed.') ); 53 53 } else { 54 $header_received = json_encode(print_r($_POST, true)); 55 $order->add_order_note( __( 'Header Received: ' .$header_received , 'zh-2cpay' ) ); 56 $order->payment_complete(); 57 $woocommerce->cart->empty_cart(); 54 $order->payment_complete(); 55 $woocommerce->cart->empty_cart(); 58 56 } 59 60 57 } else { 61 58 wc_add_notice('2Checkout payment could not be completed', 'error'); 62 59 $order->add_order_note( __( 'Error: 2Checkout payment could not be completed.') ); 60 } 61 if ($this->debug == '1') { 62 $order->add_order_note( __( 'Header Received: ' .$header_received , 'zh-2cpay' ) ); 63 63 } 64 64 } … … 104 104 'type' => 'select', 105 105 'description' => __( 'Place the payment gateway in test mode.', 'zh-2cpay' ), 106 'options' => array( 107 '0' => __( 'No', 'woocommerce' ), 108 '1' => __( 'Yes', 'woocommerce' ) 109 ) 110 ), 111 'debug' => array( 112 'title' => __( 'Debug Mode', 'zh-2cpay' ), 113 'label' => __( 'Enable Debug Mode', 'zh-2cpay' ), 114 'type' => 'select', 115 'description' => __( 'Store headers as order note received from 2Checkout.', 'zh-2cpay' ), 106 116 'options' => array( 107 117 '0' => __( 'No', 'woocommerce' ), -
2cpay/trunk/readme.txt
r1374653 r1374790 5 5 Requires at least: 4.1 6 6 Tested up to: 4.4.2 7 Stable tag: 1. 17 Stable tag: 1.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 34 34 35 35 == Changelog == 36 = 1.2 = 37 * Debug option added. 38 36 39 = 1.1 = 37 40 * Installation instruction improved.
Note: See TracChangeset
for help on using the changeset viewer.