mirror of
https://github.com/10h30/woo-viet.git
synced 2026-07-11 18:56:13 +09:00
Correct the code for IPN
Use exit() instead of wp_die()
This commit is contained in:
@@ -201,9 +201,9 @@ class WooViet_OnePay_Domestic extends WC_Payment_Gateway {
|
|||||||
*/
|
*/
|
||||||
public function handle_onepay_ipn() {
|
public function handle_onepay_ipn() {
|
||||||
|
|
||||||
if (isset($_POST['vpc_SecureHash'])) {
|
if (isset($_REQUEST['vpc_SecureHash'])) {
|
||||||
|
|
||||||
$this->process_onepay_response_data( $_POST, 'ipn' );
|
$this->process_onepay_response_data( $_REQUEST, 'ipn' );
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -309,7 +309,7 @@ class WooViet_OnePay_Domestic extends WC_Payment_Gateway {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'ipn':
|
case 'ipn':
|
||||||
wp_die('responsecode=1&desc=confirm-success');
|
exit( 'responsecode=1&desc=confirm-success');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'querydr':
|
case 'querydr':
|
||||||
@@ -319,7 +319,8 @@ class WooViet_OnePay_Domestic extends WC_Payment_Gateway {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
if ( 'ipn' == $type )
|
if ( 'ipn' == $type )
|
||||||
wp_die('responsecode=0&desc=confirm-success');
|
exit('responsecode=0&desc=confirm-success');
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user