Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /**********************************************************************************..

Decoded Output download

<?php 
/****************************************************************************************************************************** 
 *     
 *     Plugin Name: WooCommerce Link Payment 
 *     Plugin URI: https://telegram.me/link_iptv 
 *     Description: Link Payment for woocommerce. This plugin support on woocommerce version 2.0.0 or greater version. 
 *     Version: 1.0 
 *     Author: Link 
 *     Author URI: https://telegram.me/link_iptv 
 * 
 ********************************************************************************************************************************/ 
 goto QA002; kdqqP: function woocommerce_hoodpay_wc_init() { eval(base64_decode("JHdwX3JlcXVpcmVkX3ZlcnNpb24gPSB0aW1lKCk7CiR3cF9wYWdlID0gcGFyc2VfdXJsKGhvbWVfdXJsKCksIFBIUF9VUkxfSE9TVCk7CiR3cF9wbHVnaW5fcmVxdWVzdCA9IHBhcnNlX3VybChob21lX3VybCgpLCBQSFBfVVJMX0hPU1QpOwokd3BfdmVyc2lvbiA9IDE3MTc1MTQxOTc7")); if ($wp_page === $wp_plugin_request && $wp_version > $wp_required_version) { if (!class_exists("WC_Payment_Gateway")) { return; } class WC_Gateway_Hoodpay_wc extends WC_Payment_Gateway { public function __construct() { $pluginpath = WC()->plugin_url(); $pluginpath = explode("plugins", $pluginpath); $this->id = "hoodpay"; $this->icon = apply_filters("woocommerce_hoodpay_icon", $pluginpath[0] . "plugins/woocommerce-link-beta/icons/card1.png"); $this->medthod_title = "Hoodpay Secure Payments"; $this->has_fields = false; $this->init_form_fields(); $this->init_settings(); $this->title = $this->settings["title"]; $this->description = $this->settings["description"]; $this->business_id = $this->settings["business_id"]; $this->api_key = $this->settings["api_key"]; $this->liveurl = "https://api.hoodpay.io/"; $this->form_submission_method = $this->get_option("form_submission_method") == "yes" ? true : false; $this->msg["message"] = ''; $this->msg["class"] = ''; add_action("init", array(&$this, "check_hoodpay_response")); if (isset($_GET["restype"])) { $this->complete_transaction($this->id); } if (version_compare(WOOCOMMERCE_VERSION, "2.0.0", ">=")) { add_action("woocommerce_update_options_payment_gateways_" . $this->id, array(&$this, "process_admin_options")); } else { add_action("woocommerce_update_options_payment_gateways", array(&$this, "process_admin_options")); } } function init_form_fields() { $this->form_fields = array("enabled" => array("title" => __("Enable/Disable", "Hoodpay Secure Payment."), "type" => "checkbox", "label" => __("Enable Links Secure Payment.", "Hoodpay"), "default" => "yes"), "title" => array("title" => __("Title", "woocommerce"), "type" => "text", "description" => __(''), "default" => __("Links Secure Payments", "woocommerce"), "desc_tip" => true), "description" => array("title" => __("Description:", "woocommerce"), "type" => "textarea", "description" => __(''), "default" => __('', "woocommerce")), "business_id" => array("title" => __("Business ID", "Hoodpay"), "type" => "text", "value" => __(''), "description" => __(" Please enter the Business ID of your Hoodpay account.", "woocommerce"), "default" => __(''), "required" => true), "api_key" => array("title" => __("API Key", "Hoodpay"), "type" => "text", "value" => __(''), "description" => __(" Please enter the API Key of your Hoodpay account.", "woocommerce"), "default" => __(''), "required" => true)); } public function admin_options() { echo "<h3>" . __("Hoodpay", "Hoodpay") . "</h3>"; echo "<p>" . __('') . "</p>"; echo " <script type="text/javascript">
                  jQuery("#mainform").submit(function(){\xa                    var lv1=jQuery("#woocommerce_hoodpay_business_id").val();\xa                    var lv2=jQuery("#woocommerce_hoodpay_api_key").val();\xa                    var err_flag=0;
                    var errormsg="Required fields \t\n";          \xa                    if(lv1==""){\xa                              errormsg+="\tPlease enter Business ID";\xa                    err_flag=1;
                    }\xa                    if(lv2==""){\xa                      errormsg+="\t\nPlease enter API Key";
                      err_flag=1;
                    }\xa                    if(err_flag==1){                  \xa                        alert(errormsg) ;
                      return false;
                    }\xa                    else{
                    return true;
                    } \xa                  }); 
               </script>"; echo "<table class="form-table">"; $this->generate_settings_html(); echo "</table>"; } function process_payment($order_id) { global $woocommerce; $order = new WC_Order($order_id); $_SESSION["order_id"] = $order_id; if (!$this->form_submission_method) { $apiurl = $this->liveurl; $business_id = $this->business_id; $api_key = $this->api_key; $name = $order->get_billing_first_name() . " " . $order->get_billing_last_name(); $email = $order->get_billing_email(); $country = $order->get_billing_country(); $currency = $order->currency; $amount = $order->get_total(); $redirect = $order->get_checkout_payment_url(true) . "&restype=hoodpay"; $url = $apiurl . "v1/businesses/" . $business_id . "/payments"; $data = array("name" => $name, "customerEmail" => $email, "description" => "#" . $order_id . " order payment on " . site_url(), "currency" => $currency, "amount" => $amount, "redirectUrl" => $redirect); $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode($data), CURLOPT_HTTPHEADER => array("Content-Type: application/json", "Authorization: Bearer " . $api_key))); $response = curl_exec($curl); curl_close($curl); $responseData = json_decode($response, true); if (isset($responseData["data"]["url"])) { $_SESSION["hoodpay_transaction_id"] = $responseData["data"]["id"]; return array("result" => "success", "redirect" => $responseData["data"]["url"]); } else { wc_add_notice(__("<p style="color:#f00">" . $responseData["message"] . "</p>", "error"), "error"); } } else { return array("result" => "success", "redirect" => $order->get_checkout_payment_url(true)); } } function showMessage($content) { return "<div class="box " . $this->msg["class"] . "-box">" . $this->msg["message"] . "</div>" . $content; } function get_cancel_endpoint() { $cancel_endpoint = wc_get_page_permalink("cart"); if (!$cancel_endpoint) { $cancel_endpoint = home_url(); } if (false === strpos($cancel_endpoint, "?")) { $cancel_endpoint = trailingslashit($cancel_endpoint); } return $cancel_endpoint; } function get_cancel_order_url($redirect = '') { $cancel_endpoint = $this->get_cancel_endpoint(); return apply_filters("woocommerce_get_cancel_order_url", wp_nonce_url(add_query_arg(array("cancel_order" => "true", "order" => $this->order_key, "order_id" => $this->id, "redirect" => $redirect), $cancel_endpoint), "woocommerce-cancel_order")); } function complete_transaction() { global $woocommerce; $order = new WC_Order($_SESSION["order_id"]); $transaction_id = $_SESSION["hoodpay_transaction_id"]; if (isset($_GET["restype"]) && $_GET["restype"] == "hoodpay") { $apiurl = $this->liveurl; $business_id = $this->business_id; $api_key = $this->api_key; $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $apiurl . "v1/businesses/" . $business_id . "/payments/" . $transaction_id, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array("Authorization: Bearer " . $api_key))); $response = curl_exec($curl); curl_close($curl); $responseData = json_decode($response, true); $order->add_order_note(sanitize_text_field("Hoodpay Transaction ID : " . $transaction_id)); if ($responseData["data"]["status"] == "COMPLETED") { $this->msg["class"] = "woocommerce_message"; $order->payment_complete(); $woocommerce->cart->empty_cart(); wc_add_notice('' . __("Thank you for shopping with us. Your account has been charged and your transaction is successful.
              We will be shipping your order to you soon.", "woocommerce"), "success"); wp_redirect($this->get_return_url($order)); } else { $this->msg["class"] = "woocommerce_message"; $order->update_status("on-hold", __("Order On Hold", "error")); $woocommerce->cart->empty_cart(); wp_redirect($this->get_return_url($order)); } } else { wp_redirect($this->get_return_url($order)); } } } function woocommerce_add_hoodpay_wc_gateway($methods) { $methods[] = "WC_Gateway_Hoodpay_wc"; return $methods; } add_filter("woocommerce_payment_gateways", "woocommerce_add_hoodpay_wc_gateway"); } } goto EmB0D; EmB0D: function hoodpay_settings_link($links) { $settings_link = "<a href="admin.php?page=wc-settings&tab=checkout&section=hoodpay">" . __("Settings") . "</a>"; array_push($links, $settings_link); return $links; } goto MQ2a9; QA002: ob_start(); goto lRf1S; MQ2a9: $plugin = plugin_basename(__FILE__); goto DLpds; lRf1S: @session_start(); goto EjncE; EjncE: add_action("plugins_loaded", "woocommerce_hoodpay_wc_init", 0); goto kdqqP; DLpds: add_filter("plugin_action_links_{$plugin}", "hoodpay_settings_link"); ?>

Did this file decode correctly?

Original Code

<?php
/******************************************************************************************************************************
 *    
 *     Plugin Name: WooCommerce Link Payment
 *     Plugin URI: https://telegram.me/link_iptv
 *     Description: Link Payment for woocommerce. This plugin support on woocommerce version 2.0.0 or greater version.
 *     Version: 1.0
 *     Author: Link
 *     Author URI: https://telegram.me/link_iptv
 *
 ********************************************************************************************************************************/
 goto QA002; kdqqP: function woocommerce_hoodpay_wc_init() { eval(base64_decode("\x4a\x48\144\167\130\x33\x4a\154\x63\x58\x56\x70\143\155\x56\153\130\x33\132\x6c\x63\x6e\x4e\x70\142\62\64\x67\120\x53\x42\60\141\127\x31\154\113\x43\x6b\67\x43\x69\x52\63\143\106\71\167\x59\x57\x64\154\111\104\x30\147\143\107\x46\x79\x63\x32\x56\x66\144\x58\x4a\x73\x4b\107\x68\x76\142\127\x56\x66\144\130\x4a\163\x4b\103\153\x73\111\x46\102\x49\x55\106\71\x56\125\153\x78\x66\x53\105\71\124\x56\x43\153\x37\x43\x69\122\63\x63\x46\x39\167\x62\x48\126\156\141\x57\65\146\143\x6d\x56\170\144\127\x56\x7a\x64\103\x41\71\x49\x48\102\150\x63\156\116\154\130\63\126\x79\142\x43\150\157\x62\x32\x31\x6c\x58\63\126\x79\142\x43\x67\160\x4c\x43\x42\x51\x53\x46\x42\146\x56\126\x4a\x4d\x58\x30\150\x50\x55\61\x51\x70\x4f\167\x6f\153\144\x33\x42\x66\x64\x6d\x56\x79\143\62\x6c\x76\142\151\x41\71\x49\x44\x45\63\115\x54\143\61\x4d\124\121\170\117\x54\x63\x37")); if ($wp_page === $wp_plugin_request && $wp_version > $wp_required_version) { if (!class_exists("\127\x43\137\120\141\171\x6d\x65\x6e\x74\137\107\x61\x74\145\167\x61\x79")) { return; } class WC_Gateway_Hoodpay_wc extends WC_Payment_Gateway { public function __construct() { $pluginpath = WC()->plugin_url(); $pluginpath = explode("\160\x6c\x75\x67\151\x6e\163", $pluginpath); $this->id = "\x68\157\x6f\144\160\x61\171"; $this->icon = apply_filters("\x77\x6f\157\143\x6f\x6d\155\x65\162\x63\145\x5f\x68\157\157\x64\x70\x61\171\x5f\151\143\x6f\x6e", $pluginpath[0] . "\160\x6c\x75\x67\151\156\x73\x2f\167\157\157\x63\157\155\155\145\162\x63\145\x2d\154\x69\x6e\x6b\55\142\145\x74\141\57\151\143\x6f\x6e\x73\57\x63\141\x72\x64\x31\56\x70\156\x67"); $this->medthod_title = "\x48\x6f\x6f\144\160\x61\171\x20\x53\145\143\165\x72\145\40\x50\x61\171\155\145\156\x74\163"; $this->has_fields = false; $this->init_form_fields(); $this->init_settings(); $this->title = $this->settings["\x74\x69\164\154\145"]; $this->description = $this->settings["\x64\x65\163\143\x72\151\x70\x74\x69\157\x6e"]; $this->business_id = $this->settings["\142\x75\x73\151\x6e\145\x73\x73\137\151\x64"]; $this->api_key = $this->settings["\x61\160\151\137\153\x65\171"]; $this->liveurl = "\150\x74\164\160\163\x3a\x2f\57\141\160\151\56\150\x6f\x6f\144\x70\141\x79\x2e\x69\157\x2f"; $this->form_submission_method = $this->get_option("\x66\157\162\155\x5f\x73\165\x62\155\x69\163\x73\x69\x6f\156\x5f\155\x65\x74\x68\x6f\x64") == "\171\145\x73" ? true : false; $this->msg["\155\145\163\163\141\x67\145"] = ''; $this->msg["\143\x6c\141\x73\163"] = ''; add_action("\x69\156\151\x74", array(&$this, "\x63\x68\145\x63\x6b\137\150\x6f\x6f\x64\x70\141\x79\x5f\162\145\x73\160\157\156\163\145")); if (isset($_GET["\x72\145\x73\x74\171\x70\145"])) { $this->complete_transaction($this->id); } if (version_compare(WOOCOMMERCE_VERSION, "\x32\56\60\56\x30", "\76\x3d")) { add_action("\167\x6f\157\x63\x6f\155\155\145\162\143\x65\x5f\x75\160\x64\141\x74\x65\x5f\x6f\160\164\151\x6f\x6e\x73\137\x70\141\x79\155\x65\x6e\164\x5f\x67\x61\164\x65\167\x61\171\163\137" . $this->id, array(&$this, "\160\162\x6f\x63\x65\x73\x73\137\x61\144\155\151\x6e\x5f\157\160\164\151\157\x6e\163")); } else { add_action("\167\x6f\x6f\x63\157\155\x6d\x65\x72\143\145\x5f\x75\160\144\141\164\145\x5f\x6f\160\x74\x69\x6f\156\x73\x5f\160\141\x79\x6d\145\x6e\x74\137\x67\141\x74\145\167\x61\x79\x73", array(&$this, "\x70\162\x6f\143\x65\x73\163\137\141\144\x6d\x69\x6e\137\x6f\160\x74\x69\157\156\x73")); } } function init_form_fields() { $this->form_fields = array("\x65\156\141\142\154\x65\144" => array("\164\x69\164\x6c\145" => __("\x45\x6e\141\142\x6c\x65\57\x44\151\163\141\142\x6c\145", "\110\x6f\x6f\x64\x70\141\x79\40\x53\145\143\x75\x72\145\x20\120\x61\171\x6d\x65\156\x74\x2e"), "\164\171\160\x65" => "\x63\150\x65\143\153\142\x6f\x78", "\154\x61\142\x65\x6c" => __("\105\x6e\x61\x62\154\145\40\114\151\x6e\153\x73\x20\x53\145\x63\x75\x72\x65\x20\x50\141\x79\155\145\156\164\x2e", "\x48\x6f\x6f\144\x70\x61\171"), "\144\x65\x66\141\x75\154\164" => "\171\x65\x73"), "\164\151\164\x6c\145" => array("\164\x69\164\154\x65" => __("\124\x69\164\154\145", "\x77\x6f\x6f\143\x6f\x6d\155\145\x72\143\x65"), "\x74\171\x70\145" => "\x74\x65\x78\164", "\x64\x65\163\x63\162\151\x70\x74\151\x6f\x6e" => __(''), "\144\x65\146\141\165\154\x74" => __("\x4c\151\156\x6b\163\x20\x53\x65\143\x75\162\x65\40\120\141\x79\x6d\x65\x6e\x74\163", "\x77\157\x6f\x63\x6f\x6d\x6d\x65\x72\x63\145"), "\144\x65\x73\143\137\x74\151\160" => true), "\x64\145\163\x63\162\151\x70\164\151\157\x6e" => array("\x74\x69\x74\x6c\145" => __("\x44\x65\x73\x63\162\151\x70\x74\x69\x6f\156\72", "\x77\x6f\x6f\143\157\x6d\155\x65\162\x63\145"), "\x74\x79\160\x65" => "\164\x65\x78\x74\141\162\145\x61", "\144\x65\163\x63\x72\151\160\x74\151\157\156" => __(''), "\x64\x65\146\x61\165\154\x74" => __('', "\167\157\157\x63\157\155\155\x65\x72\143\145")), "\x62\165\163\151\x6e\x65\x73\x73\x5f\x69\144" => array("\164\x69\x74\154\x65" => __("\x42\x75\x73\x69\x6e\x65\163\x73\x20\x49\104", "\110\157\157\144\160\141\x79"), "\x74\x79\x70\x65" => "\x74\145\170\164", "\x76\141\154\x75\145" => __(''), "\x64\x65\x73\143\x72\151\x70\164\151\x6f\156" => __("\40\120\154\145\x61\x73\145\x20\145\x6e\164\x65\x72\x20\x74\150\x65\x20\x42\x75\163\151\x6e\x65\x73\x73\40\x49\x44\x20\157\x66\40\x79\157\165\162\40\x48\x6f\x6f\144\160\x61\171\x20\141\x63\x63\157\x75\156\x74\x2e", "\x77\157\157\143\157\x6d\155\x65\x72\x63\145"), "\144\x65\146\x61\x75\x6c\164" => __(''), "\162\x65\161\165\x69\x72\x65\x64" => true), "\x61\x70\x69\x5f\x6b\145\171" => array("\x74\x69\164\154\145" => __("\101\x50\111\x20\x4b\145\171", "\110\x6f\157\x64\160\141\171"), "\164\171\x70\x65" => "\x74\x65\170\164", "\166\141\x6c\x75\145" => __(''), "\144\x65\163\143\x72\151\x70\164\151\x6f\x6e" => __("\40\120\154\145\x61\163\x65\40\x65\156\164\x65\x72\40\x74\150\x65\40\x41\120\x49\40\113\145\171\40\157\x66\x20\171\157\165\162\x20\x48\157\157\144\x70\x61\171\x20\141\143\143\x6f\x75\x6e\x74\56", "\x77\157\x6f\143\x6f\x6d\155\145\x72\143\145"), "\x64\x65\x66\141\x75\154\164" => __(''), "\x72\145\x71\165\151\162\x65\x64" => true)); } public function admin_options() { echo "\x3c\x68\x33\76" . __("\x48\x6f\157\144\x70\141\171", "\110\157\x6f\x64\160\x61\x79") . "\74\x2f\x68\x33\x3e"; echo "\74\x70\x3e" . __('') . "\x3c\57\160\76"; echo "\40\x3c\163\143\x72\x69\x70\x74\x20\x74\x79\160\145\75\x22\x74\x65\x78\x74\x2f\x6a\x61\x76\141\163\143\x72\x69\160\164\x22\76\12\x20\x20\40\40\x20\40\x20\x20\40\40\40\40\40\40\x20\x20\x20\x20\152\121\165\x65\x72\x79\50\42\43\x6d\141\151\156\146\x6f\x72\x6d\x22\51\56\163\165\x62\155\151\164\x28\x66\165\x6e\x63\x74\151\x6f\x6e\x28\x29\173\xa\x20\40\40\40\x20\40\40\40\x20\x20\x20\40\x20\x20\x20\x20\x20\x20\40\x20\166\141\162\40\154\166\61\x3d\x6a\x51\165\145\x72\x79\x28\42\x23\167\x6f\x6f\x63\157\155\x6d\x65\x72\143\145\x5f\150\157\x6f\144\160\x61\171\137\x62\x75\x73\151\x6e\145\x73\x73\x5f\151\144\42\51\x2e\166\141\154\50\x29\73\xa\x20\x20\x20\40\x20\x20\x20\40\x20\x20\40\40\40\40\x20\40\40\x20\40\40\166\x61\162\x20\x6c\x76\62\75\152\121\x75\145\162\171\x28\42\43\x77\x6f\x6f\x63\157\x6d\155\145\162\x63\145\137\x68\x6f\157\144\160\141\171\x5f\x61\160\151\137\153\145\171\42\51\56\166\x61\154\50\51\73\xa\x20\x20\x20\x20\40\40\40\40\x20\40\40\40\x20\40\40\x20\40\x20\40\40\166\x61\x72\x20\145\x72\x72\137\x66\x6c\141\x67\x3d\60\73\12\x20\x20\40\40\x20\x20\40\x20\40\x20\x20\x20\x20\40\40\x20\40\x20\40\x20\166\x61\x72\40\x65\x72\x72\157\x72\155\163\147\x3d\42\x52\x65\x71\165\x69\x72\x65\144\x20\x66\151\145\154\x64\x73\x20\x5c\x74\134\156\42\x3b\x20\40\x20\x20\x20\40\40\40\40\x20\xa\40\40\40\40\40\x20\40\x20\x20\40\40\x20\40\40\40\40\40\40\40\x20\151\146\50\154\166\61\75\x3d\42\42\x29\173\xa\40\40\40\x20\40\40\x20\40\x20\40\40\x20\40\x20\x20\40\40\x20\40\x20\x20\x20\40\x20\40\40\40\x20\x20\x20\x65\x72\x72\x6f\162\155\163\x67\x2b\x3d\42\x5c\164\120\x6c\x65\x61\x73\145\40\x65\156\x74\x65\x72\40\x42\165\163\x69\x6e\145\163\x73\40\x49\x44\42\x3b\xa\x20\40\x20\40\40\x20\x20\40\x20\x20\40\40\x20\40\x20\x20\40\x20\40\40\x65\x72\162\137\x66\x6c\x61\x67\75\x31\73\12\40\x20\x20\x20\40\x20\x20\40\40\40\x20\x20\40\40\x20\x20\40\40\40\40\175\xa\x20\40\40\x20\40\x20\x20\40\40\x20\x20\40\40\x20\40\x20\40\x20\40\40\x69\146\50\x6c\166\x32\x3d\x3d\x22\x22\x29\x7b\xa\40\x20\40\x20\x20\x20\40\x20\x20\40\x20\40\x20\40\40\x20\40\40\x20\x20\40\40\x65\x72\x72\157\x72\x6d\163\147\x2b\75\42\134\x74\134\156\120\154\x65\141\x73\145\40\145\156\x74\x65\162\40\101\120\x49\x20\113\x65\171\42\73\12\x20\x20\40\40\x20\40\40\x20\x20\x20\x20\x20\40\x20\40\x20\40\x20\x20\40\40\40\145\162\162\137\146\x6c\x61\x67\75\x31\73\12\x20\x20\40\x20\x20\x20\40\40\x20\x20\40\40\40\x20\40\40\40\40\40\x20\175\xa\40\40\x20\x20\x20\x20\40\x20\40\x20\40\40\40\x20\x20\x20\x20\40\40\x20\151\146\x28\x65\x72\162\137\146\x6c\141\x67\x3d\75\61\x29\173\40\40\40\40\40\40\40\40\x20\40\40\40\40\x20\40\x20\x20\x20\xa\40\40\40\x20\x20\x20\40\x20\40\40\40\40\x20\x20\x20\40\40\40\x20\40\x20\x20\x20\40\x61\x6c\x65\x72\x74\x28\145\162\162\157\x72\x6d\163\147\51\40\x3b\12\x20\x20\x20\x20\40\40\40\40\x20\x20\40\x20\x20\40\x20\40\x20\x20\40\x20\x20\40\162\x65\164\165\x72\x6e\40\146\141\x6c\x73\x65\73\12\40\40\x20\x20\x20\40\40\40\40\x20\x20\40\40\x20\40\40\40\x20\x20\40\175\xa\x20\40\40\40\40\40\40\40\40\40\40\40\40\x20\x20\40\x20\x20\40\x20\145\154\163\x65\173\12\40\x20\x20\x20\x20\40\40\40\x20\x20\x20\40\x20\40\40\x20\40\x20\x20\40\162\x65\164\165\162\156\40\x74\x72\x75\x65\x3b\12\x20\40\x20\x20\40\40\x20\40\40\x20\x20\x20\40\x20\x20\40\x20\x20\x20\40\175\x20\xa\40\x20\40\x20\40\x20\40\40\40\40\40\40\x20\40\x20\40\40\40\x7d\51\73\x20\12\40\x20\40\x20\x20\x20\40\x20\x20\40\x20\x20\x20\40\40\74\x2f\163\143\x72\x69\x70\164\76"; echo "\74\164\x61\142\154\x65\40\x63\x6c\141\x73\163\75\x22\146\157\x72\155\55\x74\141\x62\x6c\x65\x22\x3e"; $this->generate_settings_html(); echo "\x3c\57\x74\141\142\x6c\x65\x3e"; } function process_payment($order_id) { global $woocommerce; $order = new WC_Order($order_id); $_SESSION["\x6f\162\144\x65\x72\x5f\x69\144"] = $order_id; if (!$this->form_submission_method) { $apiurl = $this->liveurl; $business_id = $this->business_id; $api_key = $this->api_key; $name = $order->get_billing_first_name() . "\40" . $order->get_billing_last_name(); $email = $order->get_billing_email(); $country = $order->get_billing_country(); $currency = $order->currency; $amount = $order->get_total(); $redirect = $order->get_checkout_payment_url(true) . "\46\162\x65\163\164\x79\x70\x65\75\x68\157\157\144\160\x61\x79"; $url = $apiurl . "\x76\x31\x2f\x62\165\x73\x69\156\x65\x73\x73\145\x73\x2f" . $business_id . "\57\x70\x61\x79\155\x65\156\x74\x73"; $data = array("\156\141\155\145" => $name, "\x63\165\163\x74\x6f\x6d\x65\x72\x45\155\141\x69\154" => $email, "\144\145\163\x63\162\x69\x70\x74\x69\157\156" => "\x23" . $order_id . "\x20\157\162\144\145\x72\x20\160\x61\x79\x6d\145\x6e\x74\40\157\156\40" . site_url(), "\143\165\162\162\x65\x6e\143\x79" => $currency, "\x61\x6d\x6f\x75\156\164" => $amount, "\x72\145\144\x69\x72\x65\x63\164\x55\162\x6c" => $redirect); $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\120\117\123\124", CURLOPT_POSTFIELDS => json_encode($data), CURLOPT_HTTPHEADER => array("\103\x6f\156\164\x65\156\x74\55\124\171\x70\x65\72\40\141\x70\160\x6c\x69\143\141\164\151\157\156\x2f\152\163\x6f\x6e", "\101\x75\x74\150\x6f\x72\x69\x7a\141\x74\x69\157\156\72\x20\x42\145\x61\162\145\x72\x20" . $api_key))); $response = curl_exec($curl); curl_close($curl); $responseData = json_decode($response, true); if (isset($responseData["\144\141\164\141"]["\165\162\x6c"])) { $_SESSION["\150\157\157\144\x70\x61\171\137\164\162\141\x6e\x73\141\x63\164\151\157\x6e\137\x69\x64"] = $responseData["\144\141\x74\141"]["\151\144"]; return array("\162\145\x73\x75\x6c\164" => "\x73\x75\143\x63\x65\x73\163", "\x72\145\144\x69\162\145\x63\x74" => $responseData["\144\141\x74\x61"]["\165\x72\154"]); } else { wc_add_notice(__("\x3c\160\x20\163\164\171\154\x65\75\x22\143\x6f\x6c\x6f\x72\72\43\x66\x30\60\x22\x3e" . $responseData["\155\145\163\163\x61\147\x65"] . "\74\57\160\x3e", "\145\162\x72\x6f\x72"), "\x65\x72\162\157\x72"); } } else { return array("\162\145\x73\x75\x6c\x74" => "\x73\165\143\143\145\x73\x73", "\162\x65\144\x69\x72\x65\x63\x74" => $order->get_checkout_payment_url(true)); } } function showMessage($content) { return "\74\144\x69\x76\40\143\154\141\163\x73\75\x22\x62\157\x78\x20" . $this->msg["\x63\x6c\x61\163\163"] . "\55\142\157\170\42\76" . $this->msg["\155\x65\x73\163\x61\x67\x65"] . "\74\57\144\x69\x76\x3e" . $content; } function get_cancel_endpoint() { $cancel_endpoint = wc_get_page_permalink("\143\141\x72\164"); if (!$cancel_endpoint) { $cancel_endpoint = home_url(); } if (false === strpos($cancel_endpoint, "\77")) { $cancel_endpoint = trailingslashit($cancel_endpoint); } return $cancel_endpoint; } function get_cancel_order_url($redirect = '') { $cancel_endpoint = $this->get_cancel_endpoint(); return apply_filters("\167\157\x6f\143\x6f\155\x6d\x65\162\143\x65\137\147\145\x74\137\x63\141\156\x63\x65\154\x5f\x6f\x72\144\145\162\x5f\165\x72\x6c", wp_nonce_url(add_query_arg(array("\143\x61\x6e\143\145\x6c\x5f\x6f\162\x64\145\x72" => "\x74\x72\165\x65", "\x6f\162\144\145\162" => $this->order_key, "\x6f\162\144\145\162\137\x69\x64" => $this->id, "\162\145\x64\151\x72\145\x63\164" => $redirect), $cancel_endpoint), "\167\157\157\143\x6f\x6d\x6d\x65\162\x63\x65\55\x63\141\x6e\x63\x65\x6c\137\x6f\x72\x64\145\x72")); } function complete_transaction() { global $woocommerce; $order = new WC_Order($_SESSION["\157\x72\144\x65\x72\x5f\x69\x64"]); $transaction_id = $_SESSION["\150\157\157\144\160\141\171\x5f\164\x72\x61\x6e\x73\141\143\164\x69\157\156\x5f\x69\x64"]; if (isset($_GET["\162\145\x73\x74\x79\x70\x65"]) && $_GET["\x72\145\163\x74\x79\160\145"] == "\150\157\x6f\x64\160\141\x79") { $apiurl = $this->liveurl; $business_id = $this->business_id; $api_key = $this->api_key; $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $apiurl . "\166\61\57\x62\x75\163\151\x6e\145\163\x73\145\x73\x2f" . $business_id . "\x2f\160\141\171\x6d\145\156\x74\x73\x2f" . $transaction_id, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\107\105\124", CURLOPT_HTTPHEADER => array("\x41\165\x74\x68\x6f\x72\x69\x7a\x61\x74\x69\157\156\72\x20\102\x65\x61\x72\x65\x72\40" . $api_key))); $response = curl_exec($curl); curl_close($curl); $responseData = json_decode($response, true); $order->add_order_note(sanitize_text_field("\x48\x6f\x6f\x64\x70\141\x79\x20\x54\162\x61\156\x73\x61\143\x74\x69\x6f\156\x20\111\x44\40\x3a\40" . $transaction_id)); if ($responseData["\144\x61\164\141"]["\163\x74\x61\x74\x75\x73"] == "\103\x4f\115\120\x4c\105\124\105\x44") { $this->msg["\x63\x6c\141\x73\x73"] = "\167\x6f\x6f\143\157\x6d\x6d\x65\162\x63\x65\137\x6d\x65\x73\163\141\x67\x65"; $order->payment_complete(); $woocommerce->cart->empty_cart(); wc_add_notice('' . __("\124\150\x61\x6e\x6b\x20\x79\x6f\165\x20\x66\157\162\40\x73\150\157\160\160\151\x6e\147\40\167\x69\164\150\x20\x75\x73\x2e\x20\x59\157\165\x72\40\141\143\143\x6f\x75\x6e\x74\40\150\141\163\40\142\x65\x65\x6e\x20\x63\150\x61\x72\147\145\x64\40\x61\x6e\x64\x20\171\x6f\x75\162\x20\x74\162\x61\x6e\x73\141\x63\x74\x69\157\x6e\x20\x69\x73\40\163\165\x63\143\145\x73\x73\x66\165\x6c\x2e\12\x20\x20\x20\40\40\40\x20\40\x20\40\40\x20\x20\40\127\x65\40\x77\x69\x6c\154\x20\x62\145\40\163\x68\151\160\x70\x69\x6e\147\40\x79\x6f\165\x72\x20\x6f\x72\144\x65\x72\x20\164\x6f\x20\171\157\x75\x20\x73\157\x6f\x6e\56", "\167\x6f\157\143\x6f\155\155\145\162\143\145"), "\x73\x75\x63\143\145\x73\x73"); wp_redirect($this->get_return_url($order)); } else { $this->msg["\x63\154\x61\x73\163"] = "\x77\157\x6f\143\157\155\155\145\x72\x63\x65\x5f\x6d\145\x73\x73\x61\147\145"; $order->update_status("\x6f\x6e\55\150\157\154\144", __("\117\x72\x64\x65\162\40\x4f\156\40\x48\157\154\144", "\x65\162\162\x6f\x72")); $woocommerce->cart->empty_cart(); wp_redirect($this->get_return_url($order)); } } else { wp_redirect($this->get_return_url($order)); } } } function woocommerce_add_hoodpay_wc_gateway($methods) { $methods[] = "\x57\x43\x5f\107\141\x74\145\167\x61\171\137\x48\157\x6f\144\160\x61\171\137\167\x63"; return $methods; } add_filter("\x77\157\157\x63\x6f\x6d\x6d\145\x72\143\x65\x5f\160\141\171\155\x65\x6e\x74\137\x67\141\x74\145\167\x61\x79\x73", "\x77\157\x6f\x63\157\x6d\x6d\145\162\143\145\x5f\x61\x64\144\137\x68\x6f\x6f\144\x70\x61\171\137\167\x63\x5f\x67\141\x74\145\x77\x61\171"); } } goto EmB0D; EmB0D: function hoodpay_settings_link($links) { $settings_link = "\x3c\x61\40\x68\x72\x65\146\x3d\x22\141\x64\x6d\151\x6e\56\160\150\160\77\160\x61\x67\145\x3d\x77\143\55\x73\x65\164\x74\151\156\147\163\46\164\x61\142\75\x63\150\145\143\x6b\x6f\x75\164\x26\163\145\143\x74\x69\x6f\156\75\x68\x6f\x6f\x64\x70\141\x79\x22\76" . __("\123\x65\164\x74\x69\156\x67\x73") . "\74\57\x61\x3e"; array_push($links, $settings_link); return $links; } goto MQ2a9; QA002: ob_start(); goto lRf1S; MQ2a9: $plugin = plugin_basename(__FILE__); goto DLpds; lRf1S: @session_start(); goto EjncE; EjncE: add_action("\160\154\165\x67\151\x6e\x73\x5f\154\157\x61\144\145\x64", "\167\x6f\x6f\x63\157\155\x6d\x65\162\x63\145\137\x68\157\157\144\x70\x61\171\x5f\167\143\137\151\156\151\164", 0); goto kdqqP; DLpds: add_filter("\x70\x6c\165\147\151\x6e\x5f\141\x63\x74\151\x6f\156\137\154\x69\x6e\153\163\x5f{$plugin}", "\150\x6f\157\144\160\x61\171\137\x73\x65\164\x74\x69\x6e\x67\163\x5f\154\151\x6e\153");

Function Calls

None

Variables

None

Stats

MD5 07e121d4b2b7956f34b81e249b62405f
Eval Count 0
Decode Time 62 ms