/** * Loads the my-subscriptions.php template on the My Account page. * * @since 1.0 */ public static function get_my_cards_template() { $user_id = get_current_user_id(); $saved_cards = Paytpv::savedCards($user_id); $operation = 107; // Obtenemos el terminal para el pedido // El primer terminal configurado $gateway = new self(); $terminal = $gateway->paytpv_terminals[0]; $term = $terminal["term"]; $pass = $terminal["pass"]; $order = $user_id; $secure_pay = 0; $signature = md5($gateway->clientcode . $term . $operation . $order . md5($pass)); $fields = array('MERCHANT_MERCHANTCODE' => $gateway->clientcode, 'MERCHANT_TERMINAL' => $term, 'OPERATION' => $operation, 'LANGUAGE' => $gateway->_getLanguange(), 'MERCHANT_MERCHANTSIGNATURE' => $signature, 'MERCHANT_ORDER' => $order, 'URLOK' => wc_get_page_permalink('myaccount'), 'URLKO' => wc_get_page_permalink('myaccount'), '3DSECURE' => $secure_pay); $query = http_build_query($fields); $url_paytpv = $gateway->getIframeUrl($secure_pay) . $query; wc_get_template('myaccount/my-cards.php', array('saved_cards' => $saved_cards, 'user_id' => get_current_user_id(), 'url_paytpv' => $url_paytpv), '', PAYTPV_PLUGIN_DIR . 'template/'); }