public static function doCardRefund($arg_params)
    {
        //validate params
        $data = array();
        if(is_array($arg_params)){
            $data = self::getParams($arg_params);
        }else{
            $transaction = json_decode(json_encode($arg_params), true);
            if(!empty($transaction['id'])){
                $data = array('transaction_id'=>$transaction['id']);
            }
        }
        //submit to api
        $refund_data = APIRequests::request(
            '/ecommerce/refund/card',
            APIRequests::METHOD_POST,
            array('payload'=>$data)
        );

        //return response
        return self::toObj($refund_data['body']);
    }
public static function doCardRefund($arg_params)
    {
        //validate params
        $data = array();
        if(is_array($arg_params)){
            $data = self::getParams($arg_params);
        }else{
            $transaction = json_decode(json_encode($arg_params), true);
            if(!empty($transaction['id'])){
                $data = array('transaction_id'=>$transaction['id']);
            }
        }
        //submit to api
        $refund_data = APIRequests::request(
            '/ecommerce/refund/card',
            APIRequests::METHOD_POST,
            array('payload'=>$data)
        );

        //return response
        return self::toObj($refund_data['body']);
    }
public static function doCardRefund ( $ arg_params ) { //validate params $ data = array ( ) ; if ( is_array ( $ arg_params ) ) { $ data = self :: getParams ( $ arg_params ) ; } else { $ transaction = json_decode ( json_encode ( $ arg_params ) , true ) ; if ( ! empty ( $ transaction [ 'id' ] ) ) { $ data = array ( 'transaction_id' => $ transaction [ 'id' ] ) ; } } //submit to api $ refund_data = APIRequests :: request ( '/ecommerce/refund/card' , APIRequests :: METHOD_POST , array ( 'payload' => $ data ) ) ; //return response return self :: toObj ( $ refund_data [ 'body' ] ) ; }
Refund A Card Payment

@param array $arg_params
@return null|object
@throws \Exception
Refund A Card Payment