includes/arcavis-transaction.php
## This function call the Post Tranasction API of Arcavis.
This function call the Post Tranasction API of Arcavis.
This function call the Post Tranasction API of Arcavis .
public function arcavis_process_transaction( $order_id, $old_status, $new_status ){
		global $wc_arcavis_shop;
		global $wpdb;	
		$session_id_at_checkout = get_post_meta($order_id,'session_id_at_checkout',true);
		if(in_array($new_status,array('on-hold','completed','processing'))){
			$transactions_done_or_not = get_post_meta($order_id,'acravis_response',true);
			if(!$transactions_done_or_not){
				$this->arcavis_post_transaction($order_id, $session_id_at_checkout);
			}
		}
	}
public function arcavis_process_transaction ( $ order_id , $ old_status , $ new_status ) { global $ wc_arcavis_shop ; global $ wpdb ; $ session_id_at_checkout = get_post_meta ( $ order_id , 'session_id_at_checkout' , true ) ; if ( in_array ( $ new_status , array ( 'on-hold' , 'completed' , 'processing' ) ) ) { $ transactions_done_or_not = get_post_meta ( $ order_id , 'acravis_response' , true ) ; if ( ! $ transactions_done_or_not ) { $ this -> arcavis_post_transaction ( $ order_id , $ session_id_at_checkout ) ; } } }
This function call the Post Tranasction API of Arcavis.
This function call the Post Tranasction API of Arcavis .