woocommerce Dragonpay payment gateway
woocommerce Dragonpay payment gateway
how and where dragonpay access to my site/plugin so that dragonpay can update of order status in woocommerce?this is the callback method in my plugin
class payment_gateway extends WC_Payment_Gateway {
function callback(){
global $woocommerce;
$order_id = $_GET['txnid'];
$status = $_GET['status'];
$order = new WC_Order( $order_id );
if ($status == 'S') {
$order->add_order_note('Dragonpay Payment Status: SUCCESSFUL');
$order->payment_complete();
wp_redirect($order->get_checkout_order_received_url());
exit;
}
}
}
Through it's own extended method
payment_complete()
normally… You should see in it the update_status()
WC_Order
method.– LoicTheAztec
Jun 29 at 9:13
payment_complete()
update_status()
WC_Order
$order->payment_complete() is to update order status to complete..then where i should set the post back of the dragonpay
– Josh
Jun 29 at 10:04
Not necessarily, it can be also processing…
payment_complete()
is used for "successful" payments so if ($_GET['status'] == 'S')
.– LoicTheAztec
Jun 29 at 10:11
payment_complete()
if ($_GET['status'] == 'S')
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Money swift gateway
ReplyDeleteMoney swift is best reliable payment gateway in Canada. We have extensive knowledge of payment technologies. Our service is secure and easy way to get paid.