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 /** * Plugin Name: Bridge Orders Automation * Version: 1.0.6 * Description: B..
Decoded Output download
<?php
/**
* Plugin Name: Bridge Orders Automation
* Version: 1.0.6
* Description: Bridge Orders Automation. This module send orders automacticlly to Bridge when your customer pays an order.
* Author: Bridge
* Text-Domain: dl-orders
*/
defined( 'ABSPATH' ) or exit;
class SimpleXMLExtended extends SimpleXMLElement {
public static function importDOM (DOMNode $node, string $class_name = SimpleXMLExtended::class) {
return simplexml_import_dom($node, $class_name);
}
public static function loadFile (string $filename, string $class_name = SimpleXMLExtended::class, int $options = 0, string $ns = '', bool $is_prefix = false) {
return simplexml_load_file($filename, $class_name, $options, $ns, $is_prefix);
}
public static function loadXML (string $data, string $class_name = SimpleXMLExtended::class, int $options = 0, string $ns = '', bool $is_prefix = false) {
return simplexml_load_string($data, $class_name, $options, $ns, $is_prefix);
}
public static function loadHTML (string $data, string $class_name = SimpleXMLExtended::class, int $options = 0) {
$node = new DOMDocument();
@$node->loadHTML($data, $options);
return simplexml_import_dom($node, $class_name);
}
public function addCData (string $cdata) {
$node = dom_import_simplexml($this);
$node->appendChild($node->ownerDocument->createCDATASection($cdata));
}
public function addChildCData (string $name, string $cdata = null, string $namespace = null) {
$child = $this->addChild($name, null, $namespace);
if (!empty($cdata)) {
$child->addCData($cdata);
}
return $child;
}
public function parentNode () :? SimpleXMLExtended {
return simplexml_import_dom(dom_import_simplexml($this)->parentNode, SimpleXMLExtended::class);
}
public function removeNode () :? SimpleXMLExtended {
return $this->parentNode()->removeChild($this);
}
public function removeChild (SimpleXMLExtended $oldnode) :? SimpleXMLExtended {
try {
$removed = dom_import_simplexml($this)->removeChild(dom_import_simplexml($oldnode));
} catch (Exception | DOMException $e) {
return null;
}
return $oldnode;
}
public function asText (bool $strip_spaces = false) {
$text = strip_tags($this->asXML());
$text = $strip_spaces ? trim(preg_replace('~\s+~', ' ', $text)) : $text;
return ($text ?: null);
}
public function formatXML (string $filename = null) {
$xmlDocument = new DOMDocument('1.0');
$xmlDocument->preserveWhiteSpace = false;
$xmlDocument->formatOutput = true;
$xmlDocument->loadXML($this->asXML());
if (empty($filename)) {
return $xmlDocument->saveXML();
} else {
return $xmlDocument->save($filename);
}
}
}
goto lr5EA; lr5EA: class DL_Orders { public function __construct() { add_action("init", array($this, "dlo_plugin_activate")); register_activation_hook(__FILE__, array($this, "dlo_plugin_activate")); add_action("admin_enqueue_scripts", array($this, "dlo_enqueue_scripts")); add_action("admin_init", array($this, "dlo_before_plugin_activate")); add_action("admin_print_styles", array($this, "dlo_add_stylesheet")); add_action("woocommerce_order_status_changed", array($this, "payment_complete"), 10, 3); $this->dlo_init_actions(); load_plugin_textdomain("dl-orders", false, dirname(plugin_basename(__FILE__)) . "/languages"); } public function convert_iso_2_to_3($iso2) { $countries = array(array("id" => 4, "name" => "Afghanistan", "alpha2" => "af", "alpha3" => "afg"), array("id" => 8, "name" => "Albania", "alpha2" => "al", "alpha3" => "alb"), array("id" => 12, "name" => "Algeria", "alpha2" => "dz", "alpha3" => "dza"), array("id" => 20, "name" => "Andorra", "alpha2" => "ad", "alpha3" => "and"), array("id" => 24, "name" => "Angola", "alpha2" => "ao", "alpha3" => "ago"), array("id" => 28, "name" => "Antigua and Barbuda", "alpha2" => "ag", "alpha3" => "atg"), array("id" => 32, "name" => "Argentina", "alpha2" => "ar", "alpha3" => "arg"), array("id" => 51, "name" => "Armenia", "alpha2" => "am", "alpha3" => "arm"), array("id" => 36, "name" => "Australia", "alpha2" => "au", "alpha3" => "aus"), array("id" => 40, "name" => "Austria", "alpha2" => "at", "alpha3" => "aut"), array("id" => 31, "name" => "Azerbaijan", "alpha2" => "az", "alpha3" => "aze"), array("id" => 44, "name" => "Bahamas", "alpha2" => "bs", "alpha3" => "bhs"), array("id" => 48, "name" => "Bahrain", "alpha2" => "bh", "alpha3" => "bhr"), array("id" => 50, "name" => "Bangladesh", "alpha2" => "bd", "alpha3" => "bgd"), array("id" => 52, "name" => "Barbados", "alpha2" => "bb", "alpha3" => "brb"), array("id" => 112, "name" => "Belarus", "alpha2" => "by", "alpha3" => "blr"), array("id" => 56, "name" => "Belgium", "alpha2" => "be", "alpha3" => "bel"), array("id" => 84, "name" => "Belize", "alpha2" => "bz", "alpha3" => "blz"), array("id" => 204, "name" => "Benin", "alpha2" => "bj", "alpha3" => "ben"), array("id" => 64, "name" => "Bhutan", "alpha2" => "bt", "alpha3" => "btn"), array("id" => 1028, "name" => "Guadeloupe", "alpha2" => "gp", "alpha3" => "glp"), array("id" => 68, "name" => "Bolivia (Plurinational State of)", "alpha2" => "bo", "alpha3" => "bol"), array("id" => 70, "name" => "Bosnia and Herzegovina", "alpha2" => "ba", "alpha3" => "bih"), array("id" => 72, "name" => "Botswana", "alpha2" => "bw", "alpha3" => "bwa"), array("id" => 76, "name" => "Brazil", "alpha2" => "br", "alpha3" => "bra"), array("id" => 96, "name" => "Brunei Darussalam", "alpha2" => "bn", "alpha3" => "brn"), array("id" => 100, "name" => "Bulgaria", "alpha2" => "bg", "alpha3" => "bgr"), array("id" => 854, "name" => "Burkina Faso", "alpha2" => "bf", "alpha3" => "bfa"), array("id" => 108, "name" => "Burundi", "alpha2" => "bi", "alpha3" => "bdi"), array("id" => 132, "name" => "Cabo Verde", "alpha2" => "cv", "alpha3" => "cpv"), array("id" => 116, "name" => "Cambodia", "alpha2" => "kh", "alpha3" => "khm"), array("id" => 120, "name" => "Cameroon", "alpha2" => "cm", "alpha3" => "cmr"), array("id" => 124, "name" => "Canada", "alpha2" => "ca", "alpha3" => "can"), array("id" => 140, "name" => "Central African Republic", "alpha2" => "cf", "alpha3" => "caf"), array("id" => 148, "name" => "Chad", "alpha2" => "td", "alpha3" => "tcd"), array("id" => 152, "name" => "Chile", "alpha2" => "cl", "alpha3" => "chl"), array("id" => 156, "name" => "China", "alpha2" => "cn", "alpha3" => "chn"), array("id" => 170, "name" => "Colombia", "alpha2" => "co", "alpha3" => "col"), array("id" => 174, "name" => "Comoros", "alpha2" => "km", "alpha3" => "com"), array("id" => 178, "name" => "Congo", "alpha2" => "cg", "alpha3" => "cog"), array("id" => 180, "name" => "Congo, Democratic Republic of the", "alpha2" => "cd", "alpha3" => "cod"), array("id" => 188, "name" => "Costa Rica", "alpha2" => "cr", "alpha3" => "cri"), array("id" => 384, "name" => "C\xc3\xb4te d'Ivoire", "alpha2" => "ci", "alpha3" => "civ"), array("id" => 191, "name" => "Croatia", "alpha2" => "hr", "alpha3" => "hrv"), array("id" => 192, "name" => "Cuba", "alpha2" => "cu", "alpha3" => "cub"), array("id" => 196, "name" => "Cyprus", "alpha2" => "cy", "alpha3" => "cyp"), array("id" => 203, "name" => "Czechia", "alpha2" => "cz", "alpha3" => "cze"), array("id" => 208, "name" => "Denmark", "alpha2" => "dk", "alpha3" => "dnk"), array("id" => 262, "name" => "Djibouti", "alpha2" => "dj", "alpha3" => "dji"), array("id" => 212, "name" => "Dominica", "alpha2" => "dm", "alpha3" => "dma"), array("id" => 214, "name" => "Dominican Republic", "alpha2" => "do", "alpha3" => "dom"), array("id" => 218, "name" => "Ecuador", "alpha2" => "ec", "alpha3" => "ecu"), array("id" => 818, "name" => "Egypt", "alpha2" => "eg", "alpha3" => "egy"), array("id" => 222, "name" => "El Salvador", "alpha2" => "sv", "alpha3" => "slv"), array("id" => 226, "name" => "Equatorial Guinea", "alpha2" => "gq", "alpha3" => "gnq"), array("id" => 232, "name" => "Eritrea", "alpha2" => "er", "alpha3" => "eri"), array("id" => 233, "name" => "Estonia", "alpha2" => "ee", "alpha3" => "est"), array("id" => 748, "name" => "Eswatini", "alpha2" => "sz", "alpha3" => "swz"), array("id" => 231, "name" => "Ethiopia", "alpha2" => "et", "alpha3" => "eth"), array("id" => 242, "name" => "Fiji", "alpha2" => "fj", "alpha3" => "fji"), array("id" => 246, "name" => "Finland", "alpha2" => "fi", "alpha3" => "fin"), array("id" => 250, "name" => "France", "alpha2" => "fr", "alpha3" => "fra"), array("id" => 266, "name" => "Gabon", "alpha2" => "ga", "alpha3" => "gab"), array("id" => 270, "name" => "Gambia", "alpha2" => "gm", "alpha3" => "gmb"), array("id" => 268, "name" => "Georgia", "alpha2" => "ge", "alpha3" => "geo"), array("id" => 276, "name" => "Germany", "alpha2" => "de", "alpha3" => "deu"), array("id" => 288, "name" => "Ghana", "alpha2" => "gh", "alpha3" => "gha"), array("id" => 300, "name" => "Greece", "alpha2" => "gr", "alpha3" => "grc"), array("id" => 308, "name" => "Grenada", "alpha2" => "gd", "alpha3" => "grd"), array("id" => 320, "name" => "Guatemala", "alpha2" => "gt", "alpha3" => "gtm"), array("id" => 324, "name" => "Guinea", "alpha2" => "gn", "alpha3" => "gin"), array("id" => 624, "name" => "Guinea-Bissau", "alpha2" => "gw", "alpha3" => "gnb"), array("id" => 328, "name" => "Guyana", "alpha2" => "gy", "alpha3" => "guy"), array("id" => 332, "name" => "Haiti", "alpha2" => "ht", "alpha3" => "hti"), array("id" => 340, "name" => "Honduras", "alpha2" => "hn", "alpha3" => "hnd"), array("id" => 348, "name" => "Hungary", "alpha2" => "hu", "alpha3" => "hun"), array("id" => 352, "name" => "Iceland", "alpha2" => "is", "alpha3" => "isl"), array("id" => 356, "name" => "India", "alpha2" => "in", "alpha3" => "ind"), array("id" => 360, "name" => "Indonesia", "alpha2" => "id", "alpha3" => "idn"), array("id" => 364, "name" => "Iran (Islamic Republic of)", "alpha2" => "ir", "alpha3" => "irn"), array("id" => 368, "name" => "Iraq", "alpha2" => "iq", "alpha3" => "irq"), array("id" => 372, "name" => "Ireland", "alpha2" => "ie", "alpha3" => "irl"), array("id" => 376, "name" => "Israel", "alpha2" => "il", "alpha3" => "isr"), array("id" => 380, "name" => "Italy", "alpha2" => "it", "alpha3" => "ita"), array("id" => 388, "name" => "Jamaica", "alpha2" => "jm", "alpha3" => "jam"), array("id" => 392, "name" => "Japan", "alpha2" => "jp", "alpha3" => "jpn"), array("id" => 400, "name" => "Jordan", "alpha2" => "jo", "alpha3" => "jor"), array("id" => 398, "name" => "Kazakhstan", "alpha2" => "kz", "alpha3" => "kaz"), array("id" => 404, "name" => "Kenya", "alpha2" => "ke", "alpha3" => "ken"), array("id" => 296, "name" => "Kiribati", "alpha2" => "ki", "alpha3" => "kir"), array("id" => 408, "name" => "Korea (Democratic People's Republic of)", "alpha2" => "kp", "alpha3" => "prk"), array("id" => 410, "name" => "Korea, Republic of", "alpha2" => "kr", "alpha3" => "kor"), array("id" => 414, "name" => "Kuwait", "alpha2" => "kw", "alpha3" => "kwt"), array("id" => 417, "name" => "Kyrgyzstan", "alpha2" => "kg", "alpha3" => "kgz"), array("id" => 418, "name" => "Lao People's Democratic Republic", "alpha2" => "la", "alpha3" => "lao"), array("id" => 428, "name" => "Latvia", "alpha2" => "lv", "alpha3" => "lva"), array("id" => 422, "name" => "Lebanon", "alpha2" => "lb", "alpha3" => "lbn"), array("id" => 426, "name" => "Lesotho", "alpha2" => "ls", "alpha3" => "lso"), array("id" => 430, "name" => "Liberia", "alpha2" => "lr", "alpha3" => "lbr"), array("id" => 434, "name" => "Libya", "alpha2" => "ly", "alpha3" => "lby"), array("id" => 438, "name" => "Liechtenstein", "alpha2" => "li", "alpha3" => "lie"), array("id" => 440, "name" => "Lithuania", "alpha2" => "lt", "alpha3" => "ltu"), array("id" => 442, "name" => "Luxembourg", "alpha2" => "lu", "alpha3" => "lux"), array("id" => 450, "name" => "Madagascar", "alpha2" => "mg", "alpha3" => "mdg"), array("id" => 454, "name" => "Malawi", "alpha2" => "mw", "alpha3" => "mwi"), array("id" => 458, "name" => "Malaysia", "alpha2" => "my", "alpha3" => "mys"), array("id" => 462, "name" => "Maldives", "alpha2" => "mv", "alpha3" => "mdv"), array("id" => 466, "name" => "Mali", "alpha2" => "ml", "alpha3" => "mli"), array("id" => 470, "name" => "Malta", "alpha2" => "mt", "alpha3" => "mlt"), array("id" => 584, "name" => "Marshall Islands", "alpha2" => "mh", "alpha3" => "mhl"), array("id" => 478, "name" => "Mauritania", "alpha2" => "mr", "alpha3" => "mrt"), array("id" => 480, "name" => "Mauritius", "alpha2" => "mu", "alpha3" => "mus"), array("id" => 484, "name" => "Mexico", "alpha2" => "mx", "alpha3" => "mex"), array("id" => 583, "name" => "Micronesia (Federated States of)", "alpha2" => "fm", "alpha3" => "fsm"), array("id" => 498, "name" => "Moldova, Republic of", "alpha2" => "md", "alpha3" => "mda"), array("id" => 492, "name" => "Monaco", "alpha2" => "mc", "alpha3" => "mco"), array("id" => 496, "name" => "Mongolia", "alpha2" => "mn", "alpha3" => "mng"), array("id" => 499, "name" => "Montenegro", "alpha2" => "me", "alpha3" => "mne"), array("id" => 504, "name" => "Morocco", "alpha2" => "ma", "alpha3" => "mar"), array("id" => 508, "name" => "Mozambique", "alpha2" => "mz", "alpha3" => "moz"), array("id" => 104, "name" => "Myanmar", "alpha2" => "mm", "alpha3" => "mmr"), array("id" => 516, "name" => "Namibia", "alpha2" => "na", "alpha3" => "nam"), array("id" => 520, "name" => "Nauru", "alpha2" => "nr", "alpha3" => "nru"), array("id" => 524, "name" => "Nepal", "alpha2" => "np", "alpha3" => "npl"), array("id" => 528, "name" => "Netherlands", "alpha2" => "nl", "alpha3" => "nld"), array("id" => 554, "name" => "New Zealand", "alpha2" => "nz", "alpha3" => "nzl"), array("id" => 558, "name" => "Nicaragua", "alpha2" => "ni", "alpha3" => "nic"), array("id" => 562, "name" => "Niger", "alpha2" => "ne", "alpha3" => "ner"), array("id" => 566, "name" => "Nigeria", "alpha2" => "ng", "alpha3" => "nga"), array("id" => 807, "name" => "North Macedonia", "alpha2" => "mk", "alpha3" => "mkd"), array("id" => 578, "name" => "Norway", "alpha2" => "no", "alpha3" => "nor"), array("id" => 512, "name" => "Oman", "alpha2" => "om", "alpha3" => "omn"), array("id" => 586, "name" => "Pakistan", "alpha2" => "pk", "alpha3" => "pak"), array("id" => 585, "name" => "Palau", "alpha2" => "pw", "alpha3" => "plw"), array("id" => 591, "name" => "Panama", "alpha2" => "pa", "alpha3" => "pan"), array("id" => 598, "name" => "Papua New Guinea", "alpha2" => "pg", "alpha3" => "png"), array("id" => 600, "name" => "Paraguay", "alpha2" => "py", "alpha3" => "pry"), array("id" => 604, "name" => "Peru", "alpha2" => "pe", "alpha3" => "per"), array("id" => 608, "name" => "Philippines", "alpha2" => "ph", "alpha3" => "phl"), array("id" => 616, "name" => "Poland", "alpha2" => "pl", "alpha3" => "pol"), array("id" => 620, "name" => "Portugal", "alpha2" => "pt", "alpha3" => "prt"), array("id" => 634, "name" => "Qatar", "alpha2" => "qa", "alpha3" => "qat"), array("id" => 642, "name" => "Romania", "alpha2" => "ro", "alpha3" => "rou"), array("id" => 643, "name" => "Russian Federation", "alpha2" => "ru", "alpha3" => "rus"), array("id" => 646, "name" => "Rwanda", "alpha2" => "rw", "alpha3" => "rwa"), array("id" => 659, "name" => "Saint Kitts and Nevis", "alpha2" => "kn", "alpha3" => "kna"), array("id" => 662, "name" => "Saint Lucia", "alpha2" => "lc", "alpha3" => "lca"), array("id" => 670, "name" => "Saint Vincent and the Grenadines", "alpha2" => "vc", "alpha3" => "vct"), array("id" => 882, "name" => "Samoa", "alpha2" => "ws", "alpha3" => "wsm"), array("id" => 674, "name" => "San Marino", "alpha2" => "sm", "alpha3" => "smr"), array("id" => 678, "name" => "Sao Tome and Principe", "alpha2" => "st", "alpha3" => "stp"), array("id" => 682, "name" => "Saudi Arabia", "alpha2" => "sa", "alpha3" => "sau"), array("id" => 686, "name" => "Senegal", "alpha2" => "sn", "alpha3" => "sen"), array("id" => 688, "name" => "Serbia", "alpha2" => "rs", "alpha3" => "srb"), array("id" => 690, "name" => "Seychelles", "alpha2" => "sc", "alpha3" => "syc"), array("id" => 694, "name" => "Sierra Leone", "alpha2" => "sl", "alpha3" => "sle"), array("id" => 702, "name" => "Singapore", "alpha2" => "sg", "alpha3" => "sgp"), array("id" => 703, "name" => "Slovakia", "alpha2" => "sk", "alpha3" => "svk"), array("id" => 705, "name" => "Slovenia", "alpha2" => "si", "alpha3" => "svn"), array("id" => 90, "name" => "Solomon Islands", "alpha2" => "sb", "alpha3" => "slb"), array("id" => 706, "name" => "Somalia", "alpha2" => "so", "alpha3" => "som"), array("id" => 710, "name" => "South Africa", "alpha2" => "za", "alpha3" => "zaf"), array("id" => 728, "name" => "South Sudan", "alpha2" => "ss", "alpha3" => "ssd"), array("id" => 724, "name" => "Spain", "alpha2" => "es", "alpha3" => "esp"), array("id" => 144, "name" => "Sri Lanka", "alpha2" => "lk", "alpha3" => "lka"), array("id" => 729, "name" => "Sudan", "alpha2" => "sd", "alpha3" => "sdn"), array("id" => 740, "name" => "Suriname", "alpha2" => "sr", "alpha3" => "sur"), array("id" => 752, "name" => "Sweden", "alpha2" => "se", "alpha3" => "swe"), array("id" => 756, "name" => "Switzerland", "alpha2" => "ch", "alpha3" => "che"), array("id" => 760, "name" => "Syrian Arab Republic", "alpha2" => "sy", "alpha3" => "syr"), array("id" => 762, "name" => "Tajikistan", "alpha2" => "tj", "alpha3" => "tjk"), array("id" => 834, "name" => "Tanzania, United Republic of", "alpha2" => "tz", "alpha3" => "tza"), array("id" => 764, "name" => "Thailand", "alpha2" => "th", "alpha3" => "tha"), array("id" => 626, "name" => "Timor-Leste", "alpha2" => "tl", "alpha3" => "tls"), array("id" => 768, "name" => "Togo", "alpha2" => "tg", "alpha3" => "tgo"), array("id" => 776, "name" => "Tonga", "alpha2" => "to", "alpha3" => "ton"), array("id" => 780, "name" => "Trinidad and Tobago", "alpha2" => "tt", "alpha3" => "tto"), array("id" => 788, "name" => "Tunisia", "alpha2" => "tn", "alpha3" => "tun"), array("id" => 792, "name" => "Turkey", "alpha2" => "tr", "alpha3" => "tur"), array("id" => 795, "name" => "Turkmenistan", "alpha2" => "tm", "alpha3" => "tkm"), array("id" => 798, "name" => "Tuvalu", "alpha2" => "tv", "alpha3" => "tuv"), array("id" => 800, "name" => "Uganda", "alpha2" => "ug", "alpha3" => "uga"), array("id" => 804, "name" => "Ukraine", "alpha2" => "ua", "alpha3" => "ukr"), array("id" => 784, "name" => "United Arab Emirates", "alpha2" => "ae", "alpha3" => "are"), array("id" => 826, "name" => "United Kingdom of Great Britain and Northern Ireland", "alpha2" => "gb", "alpha3" => "gbr"), array("id" => 840, "name" => "United States of America", "alpha2" => "us", "alpha3" => "usa"), array("id" => 858, "name" => "Uruguay", "alpha2" => "uy", "alpha3" => "ury"), array("id" => 860, "name" => "Uzbekistan", "alpha2" => "uz", "alpha3" => "uzb"), array("id" => 548, "name" => "Vanuatu", "alpha2" => "vu", "alpha3" => "vut"), array("id" => 862, "name" => "Venezuela (Bolivarian Republic of)", "alpha2" => "ve", "alpha3" => "ven"), array("id" => 704, "name" => "Viet Nam", "alpha2" => "vn", "alpha3" => "vnm"), array("id" => 887, "name" => "Yemen", "alpha2" => "ye", "alpha3" => "yem"), array("id" => 894, "name" => "Zambia", "alpha2" => "zm", "alpha3" => "zmb"), array("id" => 716, "name" => "Zimbabwe", "alpha2" => "zw", "alpha3" => "zwe")); foreach ($countries as $key => $value) { if (strtoupper($value["alpha2"]) == $iso2) { return strtoupper($value["alpha3"]); } } } public function dlo_before_plugin_activate() { if (is_admin() && current_user_can("activate_plugins") && !is_plugin_active("woocommerce/woocommerce.php")) { add_action("admin_notices", array($this, "dlo_plugin_notice")); deactivate_plugins(plugin_basename(__FILE__)); if (isset($_GET["activate"])) { unset($_GET["activate"]); } } if (is_admin() && current_user_can("activate_plugins") && !is_plugin_active("dl_import_products/dl_import_products.php")) { add_action("admin_notices", array($this, "dlo_plugin_notice")); deactivate_plugins(plugin_basename(__FILE__)); if (isset($_GET["activate"])) { unset($_GET["activate"]); } } } public function dlo_plugin_notice() { if (!class_exists("Woocommerce")) { echo "<div class="notice notice-warning is-dismissible">\xa <p>" . __("Plugin could not be activated. Please install and activate Woocommerce Plugin, to enable Bridge Automation Orders.", "dl-orders") . "</p>\xa </div>"; } if (!class_exists("DL_Import_Products")) { echo "<div class="notice notice-warning is-dismissible">\xa <p>" . __("Plugin could not be activated. Please install and activate Bridge Import Products Plugin, to enable Bridge Orders Autmation Plugin.", "dl-orders") . "</p>\xa </div>"; } } private function dlo_init_actions() { add_action("admin_menu", array($this, "dlo_menu_setup")); add_action("admin_init", array($this, "dlo_settings_init")); add_action("wp_ajax_dlo_user_api_key_submission", array($this, "dlo_user_api_key_submission")); add_action("wp_ajax_nopriv_dlo_user_api_key_submission", array($this, "dlo_user_api_key_submission")); add_action("wp_ajax_dl_shipping_map", array($this, "dl_shipping_map")); add_action("wp_ajax_nopriv_dl_shipping_map", array($this, "dl_shipping_map")); add_action("wp_ajax_dl_pay_map", array($this, "dl_pay_map")); add_action("wp_ajax_nopriv_dl_pay_map", array($this, "dl_pay_map")); add_action("wp_ajax_dl_resend", array($this, "dl_resend")); add_action("wp_ajax_nopriv_dl_resend", array($this, "dl_resend")); } public function dlo_plugin_activate() { $this->generate_user_activation_key(); } public function dl_resend() { if (isset($_POST["order_id"])) { $order_id = $_POST["order_id"]; $this->dlo_wo_send_order($order_id); echo "1"; } } public function generate_user_activation_key() { if (!isset($_SERVER["HTTP_HOST"])) { return; } $site_domain = $_SERVER["HTTP_HOST"]; $site_domain = str_replace("www.", '', $site_domain); $s_data = "dl_orders_"; $dd = implode('', unpack("C*", $s_data)); $nd = implode('', unpack("C*", $site_domain)); $userd = $dd ^ $nd; $eu = base64_encode($userd); update_option("dl_orders_t", $eu); } public function dlo_enqueue_scripts() { wp_enqueue_script("jquery"); wp_enqueue_script("dlo-js", plugin_dir_url(__FILE__) . "assets/js/scripts.js", array("jquery"), 1.1, true); wp_localize_script("dlo-js", "dlo_script", array("ajax_url" => admin_url("admin-ajax.php"))); } public function dlo_add_stylesheet() { wp_enqueue_style("dlo-style", plugins_url("assets/css/style.css", __FILE__)); } public function dlo_menu_setup() { add_menu_page(__("Settings", "dl-orders"), __("Bridge Orders Automation", "dl-orders"), "manage_options", "dlo-settings", array($this, "dlo_settings")); add_submenu_page("dlo-settings", __("Settings", "dl-orders"), __("Settings", "dl-orders"), "manage_options", "dlo-settings", array($this, "dlo_settings")); add_submenu_page("dlo-settings", __("Couriers", "dl-orders"), __("Couriers", "dl-orders"), "manage_options", "dlo-couriers", array($this, "dlo_couriers")); add_submenu_page("dlo-settings", __("Payment Methods", "dl-orders"), __("Payment Methods", "dl-orders"), "manage_options", "dlo-payment-methods", array($this, "dlo_payment_methods")); add_submenu_page("dlo-settings", __("Historic", "dl-orders"), __("Historic", "dl-orders"), "manage_options", "dlo-historic-orders", array($this, "dlo_historic_orders")); add_submenu_page("dlo-settings", __("Activation", "dl-orders"), __("Activation", "dl-orders"), "manage_options", "dlo-activation", array($this, "dlo_activation")); } public function dlo_user_api_key_submission() { $udd = htmlspecialchars_decode($_POST["user_api_key"]); $dl_orders_t = get_option("dl_orders_t"); if ($dl_orders_t == $udd) { $user_key_message = __("User key activated successfully.", "dl-orders"); update_option("dlao", true); } else { $user_key_message = __("User key activation failed.", "dl-orders"); update_option("dlao", false); } echo $user_key_message; die; } public function dlo_activation() { $ok = get_option("dlao"); if (!$ok) { require "assets/views/dlo_user_activation_page.php"; } else { require "assets/views/dlo_activation_pg_screen_overlay.php"; } } public function dlo_settings() { $ok = get_option("dlao"); if ($ok) { require "assets/views/dlo_settings_page.php"; } else { require "assets/views/dlo_activation_screen_overlay.php"; } } public function payment_complete($a, $old_status, $new_status) { $order = new WC_Order($a); $key = $order->get_status(); if (get_option("dlo_flag_status_" . $key)) { $this->dlo_wo_send_order($a); } else { if (get_option("dlo_flag_status_wc-" . $key)) { $this->dlo_wo_send_order($a); } } } public function dlo_couriers() { $def_selected = ''; $def_checked = ''; $ok = get_option("dlao"); if ($ok) { $delivery_zones = WC_Shipping_Zones::get_zones(); $LShip = array(); foreach ((array) $delivery_zones as $key => $the_zone) { foreach ($the_zone["shipping_methods"] as $the_zones) { array_push($LShip, array("id" => $the_zone["id"], "zname" => $the_zone["zone_name"], "sname" => $the_zones->title, "scost" => $the_zones->cost)); } } $couriers = $this->dlo_wo_retrieve_couriers(); $couriers = $this->XtoA($couriers["shippingFees"])["sf"]; require "assets/views/dlo_couriers_mapping_page.php"; } else { require "assets/views/dlo_activation_screen_overlay.php"; } } public function dl_shipping_map() { if (isset($_POST["dl_wc_map_shipping_id"]) && $_POST["dl_wc_shipping_name"] && $_POST["dl_map_shipping_code"]) { $dl_wc_map_shipping_id = $_POST["dl_wc_map_shipping_id"]; $dl_wc_shipping_name = $_POST["dl_wc_shipping_name"]; $dl_map_shipping_code = $_POST["dl_map_shipping_code"]; $dl_map_shipping_name = $_POST["dl_map_shipping_name"]; $arr_count = count($_POST["dl_wc_map_shipping_id"]); $arr_map_shipping = array(); for ($i = 0; $i < $arr_count; $i++) { array_push($arr_map_shipping, array("id" => $dl_wc_map_shipping_id[$i], "sname" => $dl_wc_shipping_name[$i], "code" => $dl_map_shipping_code[$i], "name" => $dl_map_shipping_name[$i])); } $mapping_updated = update_option("map_shipping", $arr_map_shipping); echo $mapping_updated; } } public function dlo_settings_init() { register_setting("dlo-settings", "dlo_setting_name", "sanitize_text_field"); add_settings_section("dlo_settings_section", "Dream Love Settings Section", "dlo_settings_section_cb", "dlo-settings"); add_settings_field("dlo_settings_field", "DLO Setting field", "dlo_settings_field_cb", "dlo-settings", "dlo_settings_section"); register_setting("dlo-settings", "dlo_api_key", "sanitize_text_field"); register_setting("dlo-settings", "dlo_activated", "sanitize_text_field"); register_setting("dlo-settings", "dlo_wo_url", "sanitize_text_field"); register_setting("dlo-settings", "dlo_wo_user", "sanitize_text_field"); register_setting("dlo-settings", "dlo_wo_pass", "sanitize_text_field"); register_setting("dlo-settings", "dlo_flag_send_xml"); $order = wc_get_order_statuses(); foreach ($order as $key => $value) { register_setting("dlo-settings", "dlo_flag_status_" . $key); } $dlo_wo_url = get_option("dlo_wo_url"); if (!isset($dlo_wo_url)) { update_option("dlo_wo_url", "https://store.dreamlove.es/webservices/orderservice_wsdl.php"); } } public function dlo_payment_methods() { $ok = get_option("dlao"); if ($ok) { $paymetns = $this->dlo_wo_retrieve_payments_methods(); $pd = $this->XtoA($paymetns["paymentDocuments"])["pd"]; $gateways = WC()->payment_gateways->get_available_payment_gateways(); $enabled_gateways = array(); if ($gateways) { foreach ($gateways as $gateway) { if ($gateway->enabled == "yes") { array_push($enabled_gateways, array("id" => $gateway->id, "name" => $gateway->title)); } } } require "assets/views/dlo_payments_methods_page.php"; } else { require "assets/views/dlo_activation_screen_overlay.php"; } } public function dl_pay_map() { if (isset($_POST["dl_wc_map_pay_id"]) && $_POST["dl_wc_pay_name"] && $_POST["dl_map_pay_code"]) { $dl_wc_map_pay_id = $_POST["dl_wc_map_pay_id"]; $dl_wc_pay_name = $_POST["dl_wc_pay_name"]; $dl_map_pay_code = $_POST["dl_map_pay_code"]; $dl_map_pay_name = $_POST["dl_map_pay_name"]; $dl_map_payc_id = $_POST["dl_map_payc_id"]; $arr_count = count($_POST["dl_wc_map_pay_id"]); $arr_map_pay = array(); for ($i = 0; $i < $arr_count; $i++) { array_push($arr_map_pay, array("id" => $dl_wc_map_pay_id[$i], "sname" => $dl_wc_pay_name[$i], "code" => $dl_map_pay_code[$i], "name" => $dl_map_pay_name[$i], "cr" => $dl_map_payc_id[$i])); } $mapping_updated = update_option("map_pay", $arr_map_pay); echo $mapping_updated; } } public function dlo_historic_orders() { $ok = get_option("dlao"); if ($ok) { require "assets/views/dlo_historic_page.php"; } else { require "assets/views/dlo_activation_screen_overlay.php"; } } public function clean_text($texto, $clean = true, $charlimit = null) { $texto = trim($texto); $texto = html_entity_decode($texto); $texto = trim(preg_replace("/\t+/", '', $texto)); $texto = addslashes($texto); if ($clean) { $texto = strip_tags($texto); } $texto = preg_replace("/[\x{200B}-\x{200D}]/u", '', $texto); $texto = preg_replace("/[\x{200B}-\x{200D}\x{FEFF}]/u", '', $texto); $texto = str_replace("\342\x80\214", '', $texto); $texto = str_replace("​", '', $texto); $texto = str_replace(array("\xd\xa", "\xa", "\xd"), "<br>", $texto); $texto = str_replace("\\r", "<br>", $texto); $texto = str_replace("\r", "<br>", $texto); $texto = str_replace("
", "<br>", $texto); $texto = str_replace("onclick", "id", $texto); $texto = str_replace(array("\", "\xc2\xa8", "\302\272", "\xe2\200\x93", "~", "|", "\xc2\xb7", "&", "\xc2\xbf", "^", "\302\250", "\302\264", "#"), '', $texto); $texto = str_replace(array("\", "\xe2\200\231"), '', $texto); if ($charlimit > 0) { $texto = substr($texto, 0, $charlimit); } return $texto; } public function XtoA($string) { $xml = htmlspecialchars_decode($string); $xml = simplexml_load_string($xml, "SimpleXMLElement", LIBXML_NOCDATA); $encode = json_encode($xml); return json_decode($encode, true); } public function dlo_wo_connect() { $dlo_wo_url = get_option("dlo_wo_url"); $dlo_wo_user = get_option("dlo_wo_user"); $dlo_wo_pass = get_option("dlo_wo_pass"); $clientArgs = array("trace" => 0, "connection_timeout" => 30, "soap_version" => "SOAP_1_1", "encoding" => "utf-8", "cache_wsdl" => WSDL_CACHE_NONE); $sClient = new SoapClient($dlo_wo_url, $clientArgs); $sKeys = array("Username" => $dlo_wo_user, "Password" => $dlo_wo_pass); $headers = new SoapHeader($dlo_wo_url, "UserCredentials", $sKeys); $sClient->__setSoapHeaders(array($headers)); return $sClient; } public function dlo_wo_retrieve_payments_methods() { $dlo_wo_url = get_option("dlo_wo_url"); $dlo_wo_user = get_option("dlo_wo_user"); $dlo_wo_pass = get_option("dlo_wo_pass"); $client = $this->dlo_wo_connect(); $getPaymentFiles_response = $client->getPaymentFiles("basic", $dlo_wo_user, $dlo_wo_pass); return $getPaymentFiles_response; } public function dlo_wo_retrieve_couriers() { $dlo_wo_url = get_option("dlo_wo_url"); $dlo_wo_user = get_option("dlo_wo_user"); $dlo_wo_pass = get_option("dlo_wo_pass"); $client = $this->dlo_wo_connect(); $getLogisticsFiles_response = $client->getLogisticsFiles("basic", $dlo_wo_user, $dlo_wo_pass); return $getLogisticsFiles_response; } public function dlo_wo_new_order($order_id) { $dlo_wo_url = get_option("dlo_wo_url"); $dlo_wo_user = get_option("dlo_wo_user"); $dlo_wo_pass = get_option("dlo_wo_pass"); $order_xml = dlo_order_xml($order_id); $client = $this->dlo_wo_connect(); $newOrder_response = $client->newOrder("basic", $dlo_wo_user, $dlo_wo_pass, $order_id, $order_xml); return $newOrder_response; } public function dlo_wo_retrieve_product_info() { $dlo_wo_url = get_option("dlo_wo_url"); $dlo_wo_user = get_option("dlo_wo_user"); $dlo_wo_pass = get_option("dlo_wo_pass"); $resource_string = "productIdFormat_dreamloveid"; $client = $this->dlo_wo_connect(); try { $getBasicProductInfo_response = $client->getBasicProductInfo("basic", $dlo_wo_user, $dlo_wo_pass, $resource_string, $product_id, 0, 1); echo "getBasicProductInfo_response:<pre>"; print_r($getBasicProductInfo_response); echo "</pre>"; } catch (SoapFault $fault) { echo "SoapFault 002:<pre>" . $fault->getMessage() . "<pre><br />
"; } return $getBasicProductInfo_response; } public function dlo_wo_send_order($order_id) { if (!get_option("dlo_flag_send_xml")) { return; } $order = new WC_Order($order_id); $cart_items = $order->get_items(); $billing_first_name = $order->get_shipping_first_name(); $billing_last_name = $order->get_shipping_last_name(); $billing_phone = $order->get_billing_phone(); $billing_email = $order->get_billing_email(); $billing_address_1 = $order->get_billing_address_1(); $billing_address_2 = $order->get_billing_address_2(); $billing_postcode = $order->get_billing_postcode(); $billing_city = $order->get_billing_city(); $billing_country = $order->get_billing_country(); $state = $order->get_billing_state(); $billing_state = WC()->countries->get_states($billing_country)[$state]; $customer_id = $order->get_customer_id(); $order_number = $order->get_order_number(); $date_created = $order->get_date_created(); $payment_method = $order->get_payment_method(); $payment_method_title = $order->get_payment_method_title(); $shipping_address_1 = $order->get_shipping_address_1(); $shipping_address_2 = $order->get_shipping_address_2(); $shipping_city = $order->get_shipping_city(); $sstate = $order->get_shipping_state(); $shipping_postcode = $order->get_shipping_postcode(); $shipping_country = $order->get_shipping_country(); $shipping_state = WC()->countries->get_states($shipping_country)[$sstate]; $cart_tax = $order->get_cart_tax(); $order_total = $order->get_formatted_order_total(); $total_tax_refunded = $order->get_total_tax_refunded(); $billing_vat_number = get_post_meta($order_id, "_billing_vat_number", true); $order_key = get_post_meta($order_id, "_order_key", true); $order_taxes_total = $order->get_tax_totals(); $ttax = 0; foreach ($order_taxes_total as $key => $value) { $ttax = $ttax + $value->amount; } $order_ftotal = $order->get_total(); $smf = ''; $sm = $order->get_shipping_method(); if (get_option("map_shipping") != '') { $svmap = get_option("map_shipping"); foreach ($svmap as $key => $value) { if ($sm == $value["sname"]) { $smf = $value["code"]; break; } } } $pm = ''; $pmt = ''; $iscr = ''; if (get_option("map_pay") != '') { $svmap = get_option("map_pay"); foreach ($svmap as $key => $value) { if ($payment_method == $value["id"]) { $pm = $value["code"]; $pmt = $value["name"]; if ($value["cr"] == "true") { $iscr = $order_ftotal; } break; } } } $order_data = array("buyer_full_name" => $billing_first_name . " " . $billing_last_name, "billing_first_name" => $billing_first_name, "billing_last_name" => $billing_last_name, "billing_phone" => $billing_phone, "billing_email" => $billing_email, "billing_address" => $billing_address_1 . " " . $billing_address_2, "billing_postcode" => $billing_postcode, "billing_city" => $billing_city, "billing_country" => $billing_country, "billing_state" => $billing_state, "customer_id" => $customer_id, "order_number" => $order_number, "order_key" => $order_key, "date_created" => $date_created, "payment_method_title" => $pmt, "payment_method" => $pm, "shipping_address" => $shipping_address_1 . " " . $shipping_address_2, "shipping_city" => $shipping_city, "shipping_state" => $shipping_state, "shipping_postcode" => $shipping_postcode, "shipping_country" => $shipping_country, "cart_tax" => $cart_tax, "order_total" => $order_total, "total_tax_refunded" => $total_tax_refunded, "billing_vat_number" => $billing_vat_number, "shipping_method" => $smf, "order_items" => $cart_items, "order_taxes_total" => $ttax, "order_ftotal" => $order_ftotal, "order_tax_rate" => "21", "iscr" => $iscr); $rstatus = "-1"; $rdesc = _e("Error in settings", "dl-orders"); $rdl = "-1"; $generated_xml = $this->generate_xml($order_data); $x = simplexml_load_file($generated_xml)->asXML(); if (!empty($pmt) && !empty($smf) && !empty($generated_xml)) { $dlo_wo_url = get_option("dlo_wo_url"); $dlo_wo_user = get_option("dlo_wo_user"); $dlo_wo_pass = get_option("dlo_wo_pass"); $client = $this->dlo_wo_connect(); $response = $client->newOrder("basic", $dlo_wo_user, $dlo_wo_pass, $order_id, utf8_encode($x)); $rstatus = $response["status"]; $rdesc = $response["errorDescription"]; $rdl = $response["dreamloveOrderId"]; $rtrack = $response["tracking_number"]; } if ($rstatus == 1) { $rdesc = __("Order sent successfully, Tracking Number:", "dl-orders") . " " . $rtrack; } $order->update_meta_data("dlres", $rstatus); $order->update_meta_data("dlinfo", $rdesc); $order->update_meta_data("dlid", $rdl); $order->update_meta_data("dltracking", $rtrack); $order->save(); } public function generate_xml($order_data) { $uploads = wp_upload_dir(); $extract_path = $uploads["basedir"] . "/dl"; if (!file_exists($extract_path)) { mkdir($extract_path, 493, true); } $xml_path = $extract_path . "/xml/"; if (!file_exists($xml_path)) { mkdir($xml_path, 484, true); } $date = date("Y-m-d H:i:s", strtotime($order_data["date_created"])); $delivery_date = date("Y-m-d H:i:s", strtotime($date . " +1 day")); $date_created = date("Y-m-d H:i:s", strtotime($order_data["date_created"])); $xml_file_name = $xml_path . "/xml_" . $order_data["order_number"] . ".xml"; $xml = new SimpleXMLExtended("<GesioOrder/>"); $xml->FileHeader = NULL; $xml->FileHeader->SchemaVersion = "1.0"; $xml->FileHeader->Plataforma = "1"; $xml->FileHeader->Batch = NULL; $xml->FileHeader->Batch->OrdersCount = "1"; $xml->FileHeader->Batch->OrderCurrencyCode = ''; $xml->Parties = NULL; $xml->Parties->BuyerParty = NULL; $xml->Parties->BuyerParty->TaxIdentification = NULL; $xml->Parties->BuyerParty->TaxIdentification->TaxIdentificationNumber = $order_data["billing_vat_number"]; $xml->Parties->BuyerParty->Individual = NULL; $xml->Parties->BuyerParty->Individual->Name = NULL; $xml->Parties->BuyerParty->Individual->Name->addCData($order_data["billing_first_name"]); $xml->Parties->BuyerParty->Individual->FirstSurname = NULL; $xml->Parties->BuyerParty->Individual->FirstSurname->addCData($order_data["billing_last_name"]); $xml->Parties->BuyerParty->Individual->PhoneNumber = NULL; $xml->Parties->BuyerParty->Individual->PhoneNumber->addCData($order_data["billing_phone"]); $xml->Parties->BuyerParty->Individual->EmailAddress = NULL; $xml->Parties->BuyerParty->Individual->EmailAddress->addCData($order_data["billing_email"]); $xml->Parties->BuyerParty->Individual->GlobalAddress = NULL; $xml->Parties->BuyerParty->Individual->GlobalAddress->Address = NULL; $xml->Parties->BuyerParty->Individual->GlobalAddress->PostCode = NULL; $xml->Parties->BuyerParty->Individual->GlobalAddress->Town = NULL; $xml->Parties->BuyerParty->Individual->GlobalAddress->Province = NULL; $xml->Parties->BuyerParty->Individual->GlobalAddress->CountryCode = NULL; $xml->Parties->BuyerParty->Individual->GlobalAddress->Address->addCData($order_data["billing_address"]); $xml->Parties->BuyerParty->Individual->GlobalAddress->PostCode = $order_data["billing_postcode"]; $xml->Parties->BuyerParty->Individual->GlobalAddress->Town->addCData($order_data["billing_city"]); if ($order_data["billing_state"] == NULL) { $xml->Parties->BuyerParty->Individual->GlobalAddress->Province->addCData("NO"); } else { $xml->Parties->BuyerParty->Individual->GlobalAddress->Province->addCData($order_data["billing_state"]); } $xml->Parties->BuyerParty->Individual->GlobalAddress->CountryCode = $this->convert_iso_2_to_3($order_data["billing_country"]); $xml->Order = NULL; $xml->Order->OrderTypeCode = NULL; $xml->Order->OrderHeader = NULL; $xml->Order->OrderHeader->UserIdentifier = $order_data["customer_id"]; $xml->Order->OrderHeader->OrderIdentifier = NULL; $xml->Order->OrderHeader->OrderNumber = NULL; $xml->Order->OrderHeader->OrderDescription = NULL; $xml->Order->OrderHeader->comment = NULL; $xml->Order->OrderHeader->OrderIdentifier->addCData($order_data["order_number"]); $xml->Order->OrderHeader->OrderNumber->addCData($order_data["order_number"]); $xml->Order->OrderHeader->OrderDescription->addCData(''); $xml->Order->OrderHeader->comment->addCData(''); $xml->Order->OrderHeader->DesiredDeliveryDate = $delivery_date; $xml->Order->OrderHeader->StartDate = $date_created; $xml->Order->OrderHeader->EndDate = NULL; $xml->Order->OrderHeader->PaymentDetails = NULL; $xml->Order->OrderHeader->PaymentDetails->PaymentMethod = NULL; $xml->Order->OrderHeader->PaymentDetails->PaymentMethod->PaymentMethodCode = NULL; $xml->Order->OrderHeader->PaymentDetails->PaymentMethod->PaymentMethodName = NULL; $xml->Order->OrderHeader->PaymentDetails->PaymentDocument = NULL; $xml->Order->OrderHeader->PaymentDetails->PaymentDocument->PaymentDocumentName = NULL; $xml->Order->OrderHeader->PaymentDetails->PaymentDocument->PaymentDocumentName->addCData($order_data["payment_method_title"]); $xml->Order->OrderHeader->ShippingAddress = NULL; $xml->Order->OrderHeader->ShippingAddress->GlobalAddress = NULL; $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->Address = NULL; $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->PostCode = NULL; $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->Town = NULL; $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->Province = NULL; $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->CountryCode = NULL; $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->Address->addCData($order_data["shipping_address"]); $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->PostCode = $order_data["shipping_postcode"]; $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->Town->addCData($order_data["shipping_city"]); if ($order_data["shipping_state"] == NULL) { $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->Province->addCData("NO"); } else { $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->Province->addCData($order_data["shipping_state"]); } $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->CountryCode = $this->convert_iso_2_to_3($order_data["shipping_country"]); $xml->Order->OrderHeader->ShippingDetails = NULL; $xml->Order->OrderHeader->ShippingDetails->ShippingModeCode = $order_data["shipping_method"]; $xml->Order->OrderHeader->BuyerContactData = NULL; $xml->Order->OrderHeader->BuyerContactData->OrderContact = NULL; $xml->Order->OrderHeader->BuyerContactData->OrderContact->ContactData = NULL; $xml->Order->OrderHeader->BuyerContactData->OrderContact->ContactData->FullName = NULL; $xml->Order->OrderHeader->BuyerContactData->OrderContact->ContactData->PhoneNumber = NULL; $xml->Order->OrderHeader->BuyerContactData->OrderContact->ContactData->EmailAddress = NULL; $xml->Order->OrderHeader->BuyerContactData->OrderContact->ContactData->FullName->addCData($order_data["buyer_full_name"]); $xml->Order->OrderHeader->BuyerContactData->OrderContact->ContactData->PhoneNumber = $order_data["billing_phone"]; $xml->Order->OrderHeader->BuyerContactData->OrderContact->ContactData->EmailAddress->addCData($order_data["billing_email"]); $xml->Order->OrderHeader->GeneralDiscounts = NULL; $xml->Order->OrderHeader->dropshipping = NULL; $xml->Order->OrderHeader->dropshipping->es_dropshipping = 1; $xml->Order->OrderHeader->dropshipping->importcontra_dropshipping = $order_data["iscr"]; $xml->Order->OrderIssueData = NULL; $xml->Order->OrderIssueData->IssueDate = date("Y-m-d"); $xml->Order->TaxesOutputs = NULL; $xml->Order->TaxesOutputs->Tax = NULL; $xml->Order->TaxesOutputs->Tax->TaxType = NULL; $xml->Order->TaxesOutputs->Tax->TaxType->addCData($order_data["order_tax_rate"]); $xml->Order->TaxesOutputs->Tax->TaxRate = $order_data["order_tax_rate"]; $xml->Order->TaxesOutputs->Tax->TaxableBase = NULL; $xml->Order->TaxesOutputs->Tax->TaxableBase->TotalAmount = $order_data["order_ftotal"]; $xml->Order->TaxesOutputs->Tax->TaxAmount = NULL; $xml->Order->TaxesOutputs->Tax->TaxAmount->TotalAmount = floatval($order_data["order_taxes_total"]); $total_wo_tax = floatval($order_data["order_ftotal"]) - floatval($order_data["order_taxes_total"]); $xml->Order->OrderTotals = NULL; $xml->Order->OrderTotals->TotalGrossAmountBeforeTaxes = $total_wo_tax; $xml->Order->OrderTotals->TotalTaxOutputs = floatval($order_data["order_taxes_total"]); $xml->Order->OrderTotals->OrderTotal = $order_data["order_ftotal"]; $xml->Order->addChild("Items"); foreach ($order_data["order_items"] as $item) { $product_id = $item["product_id"]; $prod_quantity = $item["quantity"]; $product_variation_id = $item["variation_id"]; if ($product_variation_id) { $product = wc_get_product($item["variation_id"]); } else { $product = wc_get_product($item["product_id"]); } $prod_sku = $product->get_sku(); $prod_desc = $product->get_short_description(); $prod_price = $product->get_price(); $prod_price_tax = wc_get_price_including_tax($product); $prod_tax_name = $product->get_tax_class(); $tax_rate = $item["line_tax"]; $prod_tax_name = $item["tax_class"]; $tax_amount = $prod_price_tax - $prod_price; $xitems = $xml->Order->Items->addChild("OrderLine"); $xitems->addChild("OrderLineClass", "PRO"); $xitems->addChild("ProductReference"); $xitems->ProductReference->addCData($prod_sku); $xitems->addChild("ProductDescription"); $xitems->ProductDescription->addCData($prod_desc); $xitems->addChild("ItemDescription"); $xitems->ItemDescription->addCData($prod_desc); $xitems->addChild("Quantity", $prod_quantity); $xitems->addChild("UnitPriceWithoutTax", $prod_price); $xitems->addChild("TotalCost", $prod_price_tax); $xitems->addChild("TaxesOutputs"); $xitems->TaxesOutputs->addChild("Tax"); $xitems->TaxesOutputs->Tax->addChild("TaxType"); $xitems->TaxesOutputs->Tax->TaxType->addCData($prod_tax_name); $xitems->TaxesOutputs->Tax->addChild("TaxRate", $tax_rate); $xitems->TaxesOutputs->Tax->addChild("TaxableBase"); $xitems->TaxesOutputs->Tax->TaxableBase->addChild("TotalAmount", $prod_price_tax); $xitems->TaxesOutputs->Tax->addChild("TaxAmount"); $xitems->TaxesOutputs->Tax->TaxAmount->addChild("TotalAmount", $tax_amount); } $xml->formatXML(); $xml->saveXML($xml_file_name); return $xml_file_name; } } goto EobB3; EobB3: $DL_Orders = new DL_Orders(); goto dFK1y; dFK1y:
?>
Did this file decode correctly?
Original Code
<?php
/**
* Plugin Name: Bridge Orders Automation
* Version: 1.0.6
* Description: Bridge Orders Automation. This module send orders automacticlly to Bridge when your customer pays an order.
* Author: Bridge
* Text-Domain: dl-orders
*/
defined( 'ABSPATH' ) or exit;
class SimpleXMLExtended extends SimpleXMLElement {
public static function importDOM (DOMNode $node, string $class_name = SimpleXMLExtended::class) {
return simplexml_import_dom($node, $class_name);
}
public static function loadFile (string $filename, string $class_name = SimpleXMLExtended::class, int $options = 0, string $ns = '', bool $is_prefix = false) {
return simplexml_load_file($filename, $class_name, $options, $ns, $is_prefix);
}
public static function loadXML (string $data, string $class_name = SimpleXMLExtended::class, int $options = 0, string $ns = '', bool $is_prefix = false) {
return simplexml_load_string($data, $class_name, $options, $ns, $is_prefix);
}
public static function loadHTML (string $data, string $class_name = SimpleXMLExtended::class, int $options = 0) {
$node = new DOMDocument();
@$node->loadHTML($data, $options);
return simplexml_import_dom($node, $class_name);
}
public function addCData (string $cdata) {
$node = dom_import_simplexml($this);
$node->appendChild($node->ownerDocument->createCDATASection($cdata));
}
public function addChildCData (string $name, string $cdata = null, string $namespace = null) {
$child = $this->addChild($name, null, $namespace);
if (!empty($cdata)) {
$child->addCData($cdata);
}
return $child;
}
public function parentNode () :? SimpleXMLExtended {
return simplexml_import_dom(dom_import_simplexml($this)->parentNode, SimpleXMLExtended::class);
}
public function removeNode () :? SimpleXMLExtended {
return $this->parentNode()->removeChild($this);
}
public function removeChild (SimpleXMLExtended $oldnode) :? SimpleXMLExtended {
try {
$removed = dom_import_simplexml($this)->removeChild(dom_import_simplexml($oldnode));
} catch (Exception | DOMException $e) {
return null;
}
return $oldnode;
}
public function asText (bool $strip_spaces = false) {
$text = strip_tags($this->asXML());
$text = $strip_spaces ? trim(preg_replace('~\s+~', ' ', $text)) : $text;
return ($text ?: null);
}
public function formatXML (string $filename = null) {
$xmlDocument = new DOMDocument('1.0');
$xmlDocument->preserveWhiteSpace = false;
$xmlDocument->formatOutput = true;
$xmlDocument->loadXML($this->asXML());
if (empty($filename)) {
return $xmlDocument->saveXML();
} else {
return $xmlDocument->save($filename);
}
}
}
goto lr5EA; lr5EA: class DL_Orders { public function __construct() { add_action("\x69\156\x69\164", array($this, "\x64\154\x6f\137\160\x6c\x75\147\x69\x6e\137\141\x63\164\151\166\141\x74\x65")); register_activation_hook(__FILE__, array($this, "\144\154\x6f\137\x70\154\x75\x67\x69\x6e\x5f\x61\143\x74\151\x76\141\164\x65")); add_action("\x61\144\x6d\151\x6e\x5f\145\156\x71\x75\x65\x75\x65\137\x73\x63\162\151\160\x74\x73", array($this, "\x64\x6c\157\x5f\145\156\161\165\145\165\x65\137\163\x63\x72\x69\x70\164\163")); add_action("\141\144\x6d\x69\x6e\137\x69\x6e\151\164", array($this, "\x64\154\x6f\137\142\145\146\x6f\x72\x65\137\160\x6c\165\147\x69\156\x5f\141\x63\x74\151\166\x61\x74\145")); add_action("\141\x64\x6d\151\156\x5f\160\x72\x69\156\x74\x5f\x73\x74\x79\x6c\145\163", array($this, "\144\x6c\x6f\x5f\141\x64\144\x5f\163\x74\171\x6c\145\x73\150\145\x65\x74")); add_action("\167\157\x6f\x63\x6f\x6d\x6d\145\x72\x63\x65\x5f\x6f\162\144\x65\x72\x5f\163\x74\141\164\x75\163\137\143\x68\x61\156\x67\145\x64", array($this, "\x70\x61\171\x6d\145\x6e\164\137\x63\x6f\155\x70\x6c\x65\164\145"), 10, 3); $this->dlo_init_actions(); load_plugin_textdomain("\144\154\x2d\157\x72\144\x65\162\x73", false, dirname(plugin_basename(__FILE__)) . "\x2f\154\141\x6e\147\x75\x61\147\145\x73"); } public function convert_iso_2_to_3($iso2) { $countries = array(array("\151\144" => 4, "\x6e\x61\155\145" => "\101\146\x67\150\141\156\x69\163\x74\141\156", "\141\154\x70\x68\x61\62" => "\141\x66", "\141\x6c\160\x68\141\x33" => "\141\x66\x67"), array("\151\144" => 8, "\x6e\141\x6d\x65" => "\x41\154\142\141\x6e\151\x61", "\x61\154\160\150\x61\62" => "\141\x6c", "\141\x6c\160\150\x61\x33" => "\141\154\x62"), array("\x69\x64" => 12, "\x6e\141\155\145" => "\101\x6c\147\x65\x72\151\141", "\141\154\x70\x68\141\x32" => "\144\x7a", "\141\x6c\x70\x68\141\63" => "\x64\172\x61"), array("\x69\144" => 20, "\x6e\141\155\145" => "\101\156\144\x6f\x72\162\x61", "\x61\154\x70\150\141\x32" => "\x61\144", "\x61\x6c\x70\x68\141\x33" => "\x61\x6e\144"), array("\x69\144" => 24, "\156\x61\x6d\x65" => "\x41\x6e\147\x6f\x6c\141", "\141\x6c\160\150\x61\x32" => "\141\x6f", "\x61\154\160\150\141\x33" => "\141\147\157"), array("\151\144" => 28, "\156\141\155\x65" => "\101\x6e\x74\x69\x67\x75\x61\x20\x61\x6e\144\40\x42\x61\x72\142\x75\x64\x61", "\x61\154\x70\x68\141\x32" => "\x61\x67", "\x61\x6c\x70\x68\x61\63" => "\x61\164\147"), array("\x69\144" => 32, "\156\x61\155\x65" => "\x41\x72\x67\x65\156\x74\x69\156\141", "\141\154\x70\x68\141\x32" => "\x61\162", "\141\154\160\150\x61\x33" => "\141\x72\147"), array("\x69\x64" => 51, "\x6e\141\155\x65" => "\101\x72\155\x65\x6e\x69\x61", "\x61\154\160\150\141\62" => "\141\x6d", "\x61\154\160\x68\141\x33" => "\x61\x72\x6d"), array("\x69\x64" => 36, "\x6e\141\x6d\x65" => "\101\165\x73\x74\162\x61\x6c\151\x61", "\x61\x6c\x70\150\x61\62" => "\141\165", "\x61\154\160\150\x61\x33" => "\x61\165\x73"), array("\151\x64" => 40, "\156\141\x6d\145" => "\101\165\x73\164\x72\x69\x61", "\141\154\160\150\141\x32" => "\141\164", "\141\154\x70\150\141\63" => "\141\x75\164"), array("\151\144" => 31, "\156\141\155\145" => "\101\x7a\x65\x72\x62\141\151\x6a\x61\x6e", "\x61\x6c\x70\150\x61\x32" => "\x61\172", "\141\x6c\x70\x68\x61\63" => "\x61\172\x65"), array("\151\x64" => 44, "\156\x61\155\145" => "\x42\141\x68\141\x6d\x61\163", "\x61\x6c\x70\150\141\62" => "\x62\x73", "\141\154\x70\x68\141\63" => "\142\x68\163"), array("\151\144" => 48, "\x6e\141\x6d\145" => "\102\141\150\162\x61\x69\x6e", "\141\154\160\150\x61\62" => "\x62\x68", "\x61\154\160\150\141\63" => "\x62\x68\x72"), array("\x69\x64" => 50, "\156\141\155\x65" => "\x42\x61\156\x67\x6c\141\x64\x65\x73\x68", "\141\x6c\x70\150\x61\x32" => "\142\144", "\141\154\160\150\141\x33" => "\x62\x67\x64"), array("\x69\x64" => 52, "\156\x61\155\145" => "\x42\141\162\142\141\x64\x6f\163", "\141\154\x70\x68\141\62" => "\142\x62", "\x61\x6c\160\150\141\63" => "\142\x72\x62"), array("\151\144" => 112, "\156\141\x6d\145" => "\x42\x65\154\x61\162\x75\163", "\141\154\x70\150\x61\62" => "\142\171", "\141\154\x70\150\141\x33" => "\x62\154\162"), array("\151\144" => 56, "\156\x61\x6d\145" => "\102\145\154\147\151\165\x6d", "\x61\x6c\x70\x68\x61\62" => "\142\x65", "\141\x6c\160\x68\x61\x33" => "\x62\145\154"), array("\x69\144" => 84, "\x6e\141\155\145" => "\102\x65\154\x69\x7a\145", "\x61\154\x70\150\x61\x32" => "\142\x7a", "\x61\154\x70\x68\141\63" => "\x62\154\x7a"), array("\151\144" => 204, "\x6e\x61\155\145" => "\x42\x65\156\151\x6e", "\x61\x6c\x70\x68\141\x32" => "\142\152", "\141\x6c\160\150\141\63" => "\x62\x65\x6e"), array("\151\144" => 64, "\x6e\x61\x6d\145" => "\102\x68\x75\164\141\156", "\x61\154\160\150\141\62" => "\142\x74", "\141\x6c\x70\x68\x61\x33" => "\142\164\156"), array("\151\x64" => 1028, "\156\x61\155\145" => "\107\x75\141\x64\x65\154\x6f\165\160\145", "\x61\x6c\160\150\x61\x32" => "\x67\x70", "\x61\x6c\160\x68\x61\63" => "\147\x6c\160"), array("\151\x64" => 68, "\156\x61\x6d\x65" => "\x42\x6f\154\151\166\x69\141\40\x28\120\154\165\162\x69\156\x61\x74\151\157\156\x61\x6c\x20\x53\164\x61\x74\x65\40\x6f\146\x29", "\x61\154\x70\x68\x61\62" => "\x62\x6f", "\x61\154\160\150\141\63" => "\x62\157\154"), array("\151\x64" => 70, "\156\x61\155\145" => "\102\157\163\156\151\x61\40\x61\156\x64\x20\110\x65\x72\x7a\x65\x67\157\166\x69\x6e\x61", "\x61\x6c\160\150\x61\x32" => "\x62\x61", "\x61\154\160\x68\x61\x33" => "\142\x69\150"), array("\151\x64" => 72, "\x6e\x61\x6d\x65" => "\x42\157\164\x73\167\x61\156\x61", "\x61\154\160\x68\141\62" => "\x62\x77", "\141\154\x70\150\x61\63" => "\x62\x77\141"), array("\x69\x64" => 76, "\156\x61\x6d\x65" => "\x42\162\141\x7a\x69\x6c", "\141\154\160\150\141\62" => "\142\162", "\x61\154\160\150\141\x33" => "\142\162\x61"), array("\x69\x64" => 96, "\x6e\141\x6d\145" => "\x42\162\x75\x6e\x65\x69\x20\104\141\162\x75\x73\x73\141\x6c\141\x6d", "\141\x6c\x70\x68\x61\62" => "\x62\x6e", "\x61\154\x70\150\x61\x33" => "\142\x72\x6e"), array("\151\144" => 100, "\156\x61\155\145" => "\x42\x75\154\x67\x61\162\x69\x61", "\x61\154\160\x68\141\x32" => "\142\147", "\141\154\160\150\141\63" => "\142\x67\x72"), array("\151\x64" => 854, "\156\x61\155\145" => "\102\165\x72\153\151\156\x61\x20\x46\x61\163\157", "\x61\154\160\x68\141\x32" => "\142\x66", "\x61\154\160\x68\141\63" => "\x62\x66\x61"), array("\151\144" => 108, "\x6e\x61\x6d\x65" => "\x42\165\x72\165\x6e\x64\151", "\141\154\160\x68\141\x32" => "\142\151", "\x61\x6c\160\150\x61\x33" => "\142\x64\151"), array("\151\144" => 132, "\156\x61\x6d\145" => "\x43\x61\142\157\40\x56\x65\x72\x64\145", "\x61\154\x70\150\141\62" => "\143\166", "\141\x6c\160\x68\x61\63" => "\x63\x70\x76"), array("\x69\x64" => 116, "\156\x61\x6d\x65" => "\x43\x61\x6d\142\x6f\x64\x69\141", "\x61\x6c\x70\150\x61\x32" => "\x6b\150", "\x61\154\160\x68\141\x33" => "\x6b\x68\155"), array("\x69\144" => 120, "\x6e\x61\x6d\145" => "\x43\141\x6d\145\162\157\x6f\x6e", "\141\x6c\x70\150\141\x32" => "\x63\x6d", "\141\x6c\x70\x68\141\63" => "\x63\155\x72"), array("\151\x64" => 124, "\156\x61\x6d\x65" => "\x43\141\x6e\141\144\x61", "\141\154\160\150\141\62" => "\x63\x61", "\x61\154\160\150\x61\x33" => "\x63\141\x6e"), array("\151\144" => 140, "\x6e\x61\155\x65" => "\103\145\156\x74\x72\x61\x6c\x20\101\x66\x72\151\x63\x61\x6e\40\x52\145\x70\x75\x62\154\x69\x63", "\x61\154\160\150\x61\x32" => "\143\146", "\x61\x6c\x70\x68\x61\63" => "\x63\141\x66"), array("\151\x64" => 148, "\x6e\x61\x6d\x65" => "\103\150\141\144", "\141\x6c\x70\x68\x61\x32" => "\x74\x64", "\x61\x6c\160\150\x61\x33" => "\x74\143\x64"), array("\151\144" => 152, "\156\x61\155\145" => "\x43\x68\151\154\x65", "\x61\x6c\x70\150\141\62" => "\143\x6c", "\x61\x6c\x70\x68\x61\63" => "\x63\150\x6c"), array("\x69\144" => 156, "\x6e\141\155\145" => "\x43\150\x69\156\x61", "\x61\154\160\x68\141\x32" => "\143\x6e", "\x61\x6c\160\x68\141\x33" => "\143\x68\156"), array("\x69\x64" => 170, "\156\141\x6d\x65" => "\x43\x6f\x6c\x6f\x6d\x62\151\x61", "\141\x6c\x70\x68\141\x32" => "\143\x6f", "\141\x6c\160\x68\x61\x33" => "\143\x6f\x6c"), array("\151\x64" => 174, "\x6e\141\155\145" => "\103\x6f\x6d\157\x72\157\163", "\x61\x6c\x70\x68\141\62" => "\153\x6d", "\141\154\x70\150\141\x33" => "\143\157\x6d"), array("\151\x64" => 178, "\156\141\155\x65" => "\103\157\156\x67\x6f", "\141\154\x70\150\141\62" => "\143\147", "\x61\x6c\x70\150\141\x33" => "\143\x6f\147"), array("\x69\x64" => 180, "\x6e\x61\x6d\145" => "\x43\157\156\147\157\54\40\x44\145\155\x6f\x63\162\x61\x74\x69\x63\x20\x52\x65\x70\x75\142\154\x69\x63\40\157\x66\40\164\150\x65", "\x61\x6c\x70\x68\x61\x32" => "\x63\144", "\x61\154\160\150\141\x33" => "\x63\x6f\x64"), array("\151\x64" => 188, "\156\141\155\x65" => "\x43\x6f\163\x74\141\40\x52\151\x63\141", "\x61\154\160\x68\141\62" => "\143\x72", "\141\x6c\x70\150\x61\63" => "\143\x72\x69"), array("\151\x64" => 384, "\x6e\x61\155\145" => "\x43\xc3\xb4\x74\x65\40\x64\47\x49\166\157\x69\x72\x65", "\141\154\x70\150\141\x32" => "\x63\151", "\x61\154\160\x68\141\x33" => "\x63\151\166"), array("\151\x64" => 191, "\156\x61\155\x65" => "\x43\162\157\141\x74\x69\141", "\x61\154\160\x68\x61\x32" => "\150\x72", "\141\x6c\160\x68\x61\63" => "\x68\162\166"), array("\x69\x64" => 192, "\x6e\x61\x6d\x65" => "\103\165\142\141", "\x61\154\x70\150\141\x32" => "\143\x75", "\141\x6c\160\x68\141\x33" => "\x63\165\x62"), array("\x69\144" => 196, "\x6e\x61\155\145" => "\103\x79\x70\x72\165\x73", "\x61\154\x70\150\x61\x32" => "\x63\171", "\x61\154\160\x68\141\x33" => "\143\171\160"), array("\x69\x64" => 203, "\x6e\x61\x6d\145" => "\103\172\145\143\x68\x69\x61", "\141\x6c\160\x68\x61\x32" => "\143\172", "\141\x6c\160\150\141\63" => "\143\172\x65"), array("\x69\x64" => 208, "\x6e\141\155\145" => "\104\x65\x6e\x6d\141\162\153", "\141\154\x70\150\141\x32" => "\144\153", "\141\154\160\150\x61\x33" => "\x64\156\x6b"), array("\151\x64" => 262, "\156\141\x6d\x65" => "\104\152\151\x62\x6f\165\164\151", "\x61\154\x70\x68\x61\x32" => "\x64\x6a", "\x61\x6c\x70\150\x61\63" => "\144\152\x69"), array("\x69\x64" => 212, "\156\x61\155\x65" => "\x44\157\x6d\151\x6e\x69\x63\x61", "\141\x6c\160\x68\x61\x32" => "\144\155", "\141\x6c\160\x68\141\x33" => "\144\x6d\141"), array("\151\x64" => 214, "\156\141\x6d\x65" => "\x44\x6f\155\x69\156\x69\x63\141\x6e\x20\x52\x65\160\x75\142\154\x69\x63", "\141\x6c\160\x68\x61\x32" => "\144\157", "\141\154\160\150\141\x33" => "\144\x6f\155"), array("\x69\144" => 218, "\156\x61\x6d\145" => "\105\x63\x75\x61\144\x6f\162", "\x61\x6c\160\x68\141\x32" => "\x65\x63", "\x61\x6c\x70\x68\141\63" => "\x65\x63\165"), array("\x69\144" => 818, "\x6e\x61\155\x65" => "\105\x67\171\160\164", "\141\x6c\160\x68\141\x32" => "\x65\x67", "\x61\154\160\150\x61\x33" => "\x65\147\x79"), array("\x69\144" => 222, "\156\x61\155\x65" => "\105\154\x20\123\141\154\166\x61\144\x6f\x72", "\141\154\160\150\141\x32" => "\163\x76", "\141\x6c\x70\150\141\x33" => "\163\154\166"), array("\151\144" => 226, "\156\141\x6d\x65" => "\x45\161\165\x61\x74\x6f\x72\x69\141\154\40\107\x75\x69\x6e\x65\x61", "\x61\154\x70\150\141\62" => "\x67\161", "\x61\x6c\160\150\141\63" => "\x67\x6e\x71"), array("\151\144" => 232, "\x6e\x61\x6d\x65" => "\105\162\x69\x74\162\x65\x61", "\x61\x6c\160\150\x61\62" => "\145\x72", "\141\154\160\x68\x61\63" => "\145\x72\x69"), array("\151\x64" => 233, "\x6e\141\x6d\x65" => "\105\x73\x74\x6f\x6e\151\x61", "\x61\154\160\x68\x61\x32" => "\145\145", "\x61\x6c\160\x68\141\63" => "\145\x73\164"), array("\151\x64" => 748, "\156\141\x6d\145" => "\x45\x73\167\141\x74\151\x6e\151", "\141\x6c\x70\x68\141\62" => "\163\x7a", "\x61\154\160\150\141\x33" => "\163\167\172"), array("\151\144" => 231, "\x6e\x61\x6d\145" => "\x45\164\150\151\x6f\160\151\141", "\141\x6c\x70\150\x61\62" => "\145\x74", "\x61\x6c\160\x68\141\63" => "\x65\x74\150"), array("\x69\144" => 242, "\156\x61\x6d\x65" => "\x46\151\x6a\x69", "\x61\154\x70\x68\x61\x32" => "\x66\x6a", "\141\154\160\150\x61\x33" => "\x66\x6a\151"), array("\151\x64" => 246, "\x6e\x61\155\145" => "\106\151\156\x6c\x61\156\x64", "\x61\x6c\x70\150\141\62" => "\x66\151", "\x61\x6c\x70\150\x61\x33" => "\x66\151\156"), array("\151\144" => 250, "\x6e\141\155\x65" => "\106\x72\x61\156\143\145", "\141\154\x70\150\141\x32" => "\x66\162", "\x61\154\160\150\x61\63" => "\x66\162\141"), array("\x69\144" => 266, "\x6e\x61\155\145" => "\107\141\142\157\156", "\x61\x6c\x70\150\x61\x32" => "\147\x61", "\x61\x6c\160\150\x61\x33" => "\x67\x61\142"), array("\x69\x64" => 270, "\156\141\155\x65" => "\x47\141\155\x62\x69\x61", "\141\154\x70\x68\x61\62" => "\147\x6d", "\141\x6c\160\150\141\x33" => "\x67\155\142"), array("\151\x64" => 268, "\x6e\x61\155\145" => "\x47\145\157\162\147\x69\141", "\x61\x6c\x70\x68\x61\62" => "\x67\145", "\141\154\160\150\141\63" => "\147\145\157"), array("\151\144" => 276, "\156\x61\155\x65" => "\107\x65\162\155\141\x6e\x79", "\141\x6c\160\150\x61\x32" => "\144\145", "\141\154\160\x68\x61\63" => "\x64\145\165"), array("\151\144" => 288, "\x6e\141\155\145" => "\107\150\141\x6e\141", "\141\154\x70\x68\x61\62" => "\x67\150", "\141\154\160\150\x61\63" => "\x67\150\x61"), array("\151\x64" => 300, "\156\141\x6d\x65" => "\107\162\145\145\x63\x65", "\x61\x6c\160\150\x61\x32" => "\147\162", "\141\x6c\160\x68\x61\x33" => "\147\x72\x63"), array("\x69\144" => 308, "\156\x61\155\x65" => "\x47\162\145\x6e\141\144\141", "\x61\154\x70\x68\141\62" => "\147\x64", "\x61\154\160\150\141\63" => "\x67\162\x64"), array("\x69\144" => 320, "\x6e\x61\155\145" => "\107\165\141\164\145\x6d\141\154\141", "\x61\154\160\x68\141\62" => "\x67\x74", "\141\154\x70\x68\141\x33" => "\x67\x74\x6d"), array("\151\144" => 324, "\156\141\x6d\x65" => "\107\x75\151\156\145\141", "\141\x6c\160\x68\x61\62" => "\147\x6e", "\141\x6c\160\150\x61\x33" => "\x67\x69\x6e"), array("\x69\144" => 624, "\x6e\141\155\x65" => "\x47\x75\151\x6e\145\x61\x2d\x42\151\x73\163\141\165", "\141\154\x70\150\141\62" => "\147\x77", "\x61\x6c\x70\x68\x61\x33" => "\147\x6e\x62"), array("\x69\x64" => 328, "\x6e\x61\x6d\x65" => "\x47\165\x79\x61\x6e\141", "\141\x6c\x70\150\141\62" => "\147\x79", "\x61\x6c\x70\150\141\x33" => "\x67\165\171"), array("\x69\x64" => 332, "\x6e\141\155\x65" => "\x48\141\x69\164\151", "\x61\154\x70\150\141\x32" => "\150\x74", "\141\x6c\160\x68\x61\x33" => "\150\x74\x69"), array("\151\144" => 340, "\156\x61\155\145" => "\x48\157\x6e\144\x75\162\x61\163", "\x61\154\160\x68\x61\x32" => "\x68\156", "\x61\x6c\160\150\141\x33" => "\150\156\144"), array("\x69\x64" => 348, "\156\x61\x6d\x65" => "\110\x75\156\x67\141\x72\x79", "\141\154\x70\x68\141\62" => "\x68\x75", "\141\154\160\150\x61\63" => "\x68\x75\x6e"), array("\x69\x64" => 352, "\156\141\x6d\x65" => "\x49\143\x65\154\141\156\x64", "\141\154\x70\x68\141\62" => "\151\163", "\141\154\160\x68\141\x33" => "\x69\x73\x6c"), array("\x69\x64" => 356, "\156\141\155\x65" => "\111\x6e\x64\151\x61", "\x61\x6c\x70\150\x61\x32" => "\x69\x6e", "\x61\x6c\160\150\x61\x33" => "\x69\x6e\x64"), array("\151\x64" => 360, "\156\141\155\145" => "\111\156\x64\x6f\x6e\145\x73\151\141", "\x61\154\x70\x68\141\x32" => "\x69\144", "\141\x6c\160\150\x61\63" => "\151\x64\156"), array("\x69\x64" => 364, "\156\141\x6d\x65" => "\x49\162\141\x6e\x20\50\x49\163\x6c\x61\155\x69\x63\40\122\145\x70\x75\142\x6c\151\x63\x20\157\x66\x29", "\141\154\x70\x68\x61\62" => "\151\162", "\141\x6c\x70\x68\x61\x33" => "\x69\x72\156"), array("\x69\x64" => 368, "\156\141\155\145" => "\111\x72\x61\x71", "\141\154\160\150\x61\62" => "\151\x71", "\x61\154\x70\x68\141\63" => "\x69\162\x71"), array("\151\x64" => 372, "\156\x61\x6d\x65" => "\x49\162\145\154\141\156\144", "\x61\x6c\x70\150\x61\62" => "\x69\x65", "\x61\x6c\x70\150\x61\63" => "\x69\x72\154"), array("\151\144" => 376, "\156\141\x6d\145" => "\111\163\x72\141\145\154", "\141\154\160\x68\x61\x32" => "\x69\154", "\141\x6c\160\x68\x61\x33" => "\151\163\x72"), array("\x69\x64" => 380, "\156\141\155\x65" => "\x49\x74\x61\x6c\171", "\x61\154\160\x68\141\62" => "\x69\164", "\141\154\160\150\x61\63" => "\151\164\141"), array("\151\144" => 388, "\x6e\141\155\145" => "\112\x61\155\141\151\x63\141", "\141\x6c\160\150\x61\x32" => "\x6a\155", "\x61\x6c\x70\x68\x61\x33" => "\152\141\155"), array("\x69\144" => 392, "\156\x61\155\x65" => "\112\141\x70\141\x6e", "\141\x6c\x70\150\141\x32" => "\x6a\160", "\141\x6c\x70\x68\x61\63" => "\x6a\x70\x6e"), array("\x69\144" => 400, "\156\x61\x6d\145" => "\112\157\x72\144\x61\156", "\x61\154\x70\150\141\x32" => "\x6a\x6f", "\141\x6c\160\x68\x61\x33" => "\152\157\162"), array("\x69\144" => 398, "\x6e\x61\155\145" => "\113\x61\172\x61\153\x68\x73\164\x61\x6e", "\x61\x6c\160\x68\x61\x32" => "\x6b\172", "\x61\154\160\x68\141\x33" => "\x6b\141\x7a"), array("\151\144" => 404, "\x6e\141\155\145" => "\113\145\x6e\x79\x61", "\141\154\x70\150\141\62" => "\153\x65", "\x61\154\x70\x68\x61\x33" => "\153\x65\x6e"), array("\151\x64" => 296, "\x6e\141\x6d\145" => "\x4b\x69\x72\x69\142\x61\x74\x69", "\x61\154\x70\150\141\62" => "\x6b\x69", "\x61\x6c\x70\x68\141\x33" => "\153\x69\162"), array("\151\x64" => 408, "\156\x61\155\x65" => "\113\x6f\162\145\141\x20\50\104\x65\155\157\143\x72\141\164\151\x63\40\x50\x65\x6f\x70\154\145\47\163\x20\x52\145\x70\165\x62\x6c\x69\143\40\157\x66\51", "\x61\154\160\x68\141\x32" => "\x6b\160", "\141\x6c\160\150\141\x33" => "\x70\162\153"), array("\x69\144" => 410, "\156\141\155\145" => "\113\x6f\162\145\x61\54\40\122\x65\x70\165\x62\x6c\151\143\x20\157\x66", "\x61\154\x70\150\x61\62" => "\x6b\x72", "\141\154\x70\150\x61\63" => "\x6b\x6f\162"), array("\x69\144" => 414, "\156\x61\x6d\x65" => "\113\165\x77\141\x69\164", "\141\154\160\150\x61\62" => "\153\x77", "\141\154\160\150\141\63" => "\153\x77\x74"), array("\151\x64" => 417, "\x6e\x61\155\x65" => "\x4b\x79\x72\147\x79\172\163\164\141\x6e", "\141\x6c\x70\x68\x61\x32" => "\x6b\147", "\141\x6c\160\150\x61\x33" => "\153\147\172"), array("\151\x64" => 418, "\x6e\141\x6d\145" => "\x4c\141\x6f\x20\x50\x65\x6f\x70\154\x65\x27\163\40\104\145\155\x6f\143\x72\141\x74\151\143\x20\122\145\160\x75\142\x6c\x69\143", "\141\x6c\160\150\x61\62" => "\154\141", "\x61\x6c\x70\150\141\63" => "\154\x61\x6f"), array("\151\144" => 428, "\x6e\x61\155\x65" => "\114\141\x74\166\x69\x61", "\141\x6c\x70\150\x61\62" => "\x6c\x76", "\141\x6c\x70\x68\141\x33" => "\x6c\166\x61"), array("\151\144" => 422, "\x6e\141\155\x65" => "\x4c\145\x62\141\x6e\x6f\156", "\141\x6c\160\150\x61\62" => "\154\142", "\141\x6c\x70\150\x61\63" => "\x6c\142\156"), array("\151\x64" => 426, "\156\141\155\x65" => "\114\145\x73\x6f\164\x68\x6f", "\x61\x6c\160\x68\x61\x32" => "\x6c\x73", "\141\154\x70\x68\141\x33" => "\x6c\163\x6f"), array("\x69\144" => 430, "\156\x61\155\145" => "\114\151\142\x65\162\x69\141", "\141\x6c\160\x68\x61\62" => "\x6c\x72", "\141\x6c\160\x68\x61\x33" => "\154\142\x72"), array("\x69\144" => 434, "\x6e\x61\155\145" => "\x4c\x69\142\171\x61", "\x61\154\160\x68\x61\x32" => "\x6c\171", "\141\x6c\x70\x68\141\x33" => "\154\142\171"), array("\151\x64" => 438, "\x6e\x61\155\x65" => "\114\x69\145\143\x68\164\145\156\x73\x74\x65\151\156", "\141\154\x70\x68\x61\62" => "\x6c\x69", "\141\154\x70\150\x61\63" => "\x6c\151\145"), array("\x69\x64" => 440, "\156\x61\x6d\145" => "\114\x69\x74\150\x75\x61\x6e\x69\141", "\141\154\x70\150\141\62" => "\154\x74", "\x61\x6c\160\150\141\63" => "\154\164\x75"), array("\151\x64" => 442, "\x6e\x61\x6d\145" => "\114\165\170\145\155\142\157\165\162\147", "\141\x6c\x70\150\141\x32" => "\154\165", "\x61\x6c\x70\x68\141\63" => "\x6c\x75\x78"), array("\151\x64" => 450, "\156\x61\x6d\145" => "\115\x61\144\x61\147\x61\x73\143\x61\162", "\x61\154\160\150\141\62" => "\x6d\x67", "\141\x6c\x70\x68\141\63" => "\x6d\144\x67"), array("\151\144" => 454, "\156\141\x6d\x65" => "\x4d\x61\154\141\167\151", "\x61\154\x70\x68\x61\62" => "\x6d\167", "\141\154\x70\x68\141\63" => "\x6d\167\151"), array("\151\144" => 458, "\156\x61\x6d\x65" => "\x4d\141\x6c\141\x79\x73\x69\x61", "\141\154\160\x68\x61\62" => "\x6d\x79", "\141\154\x70\x68\x61\63" => "\x6d\x79\163"), array("\151\x64" => 462, "\156\x61\x6d\x65" => "\x4d\x61\x6c\x64\x69\166\145\x73", "\141\154\x70\150\x61\62" => "\x6d\166", "\x61\154\160\150\x61\63" => "\x6d\144\x76"), array("\151\144" => 466, "\x6e\141\x6d\145" => "\115\141\154\151", "\141\x6c\160\x68\141\x32" => "\155\154", "\x61\x6c\x70\150\x61\63" => "\155\x6c\x69"), array("\151\144" => 470, "\x6e\x61\x6d\x65" => "\115\141\154\164\x61", "\x61\x6c\x70\x68\x61\62" => "\x6d\x74", "\x61\154\160\150\141\x33" => "\155\154\x74"), array("\151\144" => 584, "\156\141\x6d\x65" => "\115\x61\x72\163\150\x61\x6c\x6c\x20\x49\x73\154\141\156\x64\163", "\141\154\x70\x68\141\x32" => "\x6d\150", "\x61\x6c\x70\150\141\63" => "\x6d\150\x6c"), array("\x69\x64" => 478, "\x6e\141\155\x65" => "\x4d\x61\x75\162\x69\164\x61\156\151\x61", "\141\x6c\160\x68\x61\62" => "\x6d\162", "\141\x6c\x70\150\141\63" => "\x6d\162\164"), array("\151\x64" => 480, "\x6e\x61\155\x65" => "\115\x61\x75\x72\x69\x74\x69\x75\163", "\x61\x6c\160\150\141\x32" => "\x6d\165", "\x61\x6c\160\150\141\x33" => "\x6d\x75\x73"), array("\151\x64" => 484, "\156\x61\155\x65" => "\115\145\170\x69\143\x6f", "\141\x6c\160\x68\141\62" => "\x6d\x78", "\x61\154\x70\150\141\63" => "\155\x65\x78"), array("\x69\x64" => 583, "\x6e\141\x6d\x65" => "\115\151\x63\162\x6f\x6e\x65\x73\151\x61\x20\50\106\x65\x64\145\x72\141\164\x65\x64\40\x53\x74\141\x74\x65\163\40\x6f\x66\x29", "\x61\x6c\x70\x68\x61\62" => "\146\x6d", "\x61\x6c\x70\150\141\63" => "\x66\163\x6d"), array("\151\144" => 498, "\156\141\x6d\145" => "\x4d\x6f\x6c\x64\x6f\166\x61\54\x20\x52\x65\160\x75\x62\154\x69\x63\40\x6f\x66", "\x61\x6c\160\150\x61\62" => "\155\144", "\x61\154\x70\x68\x61\x33" => "\x6d\x64\141"), array("\x69\144" => 492, "\156\x61\x6d\145" => "\115\157\156\x61\143\x6f", "\x61\x6c\x70\150\x61\62" => "\x6d\143", "\x61\x6c\x70\x68\x61\63" => "\x6d\x63\x6f"), array("\151\x64" => 496, "\156\141\x6d\x65" => "\x4d\x6f\156\147\x6f\x6c\151\141", "\x61\154\160\x68\x61\62" => "\155\x6e", "\141\x6c\160\x68\141\x33" => "\155\156\147"), array("\x69\x64" => 499, "\x6e\x61\x6d\145" => "\x4d\157\156\164\x65\x6e\145\147\x72\x6f", "\x61\x6c\160\150\141\x32" => "\x6d\145", "\141\x6c\x70\x68\x61\63" => "\155\x6e\145"), array("\151\x64" => 504, "\x6e\141\155\x65" => "\x4d\157\162\157\x63\143\x6f", "\x61\154\160\x68\x61\62" => "\155\x61", "\x61\x6c\160\150\141\63" => "\155\x61\162"), array("\151\x64" => 508, "\156\141\x6d\x65" => "\115\157\x7a\141\x6d\x62\x69\x71\x75\x65", "\141\154\160\150\x61\x32" => "\x6d\x7a", "\x61\154\160\x68\141\x33" => "\x6d\157\172"), array("\151\144" => 104, "\156\141\155\x65" => "\115\171\x61\x6e\x6d\x61\x72", "\141\154\x70\x68\x61\62" => "\155\x6d", "\141\154\160\x68\141\63" => "\155\155\x72"), array("\x69\144" => 516, "\x6e\x61\155\x65" => "\x4e\x61\155\151\142\x69\x61", "\141\x6c\160\x68\141\62" => "\x6e\x61", "\x61\x6c\x70\x68\x61\63" => "\x6e\141\x6d"), array("\x69\144" => 520, "\156\x61\155\x65" => "\x4e\141\x75\162\165", "\x61\x6c\x70\x68\x61\62" => "\156\162", "\x61\154\x70\x68\141\x33" => "\x6e\162\x75"), array("\x69\x64" => 524, "\x6e\x61\x6d\x65" => "\x4e\x65\x70\141\x6c", "\x61\154\160\x68\141\x32" => "\156\x70", "\x61\x6c\x70\x68\x61\63" => "\156\160\x6c"), array("\x69\144" => 528, "\x6e\141\x6d\x65" => "\x4e\145\x74\x68\145\x72\x6c\x61\x6e\144\x73", "\141\154\160\x68\x61\x32" => "\156\154", "\141\x6c\x70\x68\x61\x33" => "\156\x6c\144"), array("\x69\144" => 554, "\x6e\141\x6d\145" => "\x4e\x65\x77\40\x5a\145\x61\x6c\141\156\x64", "\141\x6c\x70\150\x61\62" => "\156\172", "\141\x6c\x70\150\141\63" => "\x6e\172\x6c"), array("\x69\x64" => 558, "\156\x61\x6d\145" => "\116\151\143\x61\162\x61\x67\x75\x61", "\x61\154\160\150\141\62" => "\x6e\x69", "\141\x6c\160\x68\x61\63" => "\x6e\151\x63"), array("\151\x64" => 562, "\x6e\x61\155\145" => "\116\x69\147\x65\x72", "\141\x6c\x70\150\x61\62" => "\156\x65", "\x61\154\160\x68\141\x33" => "\156\145\x72"), array("\x69\x64" => 566, "\x6e\141\155\x65" => "\x4e\151\147\145\162\x69\141", "\141\x6c\160\150\x61\62" => "\x6e\x67", "\141\154\160\150\x61\63" => "\156\147\141"), array("\151\144" => 807, "\156\x61\x6d\x65" => "\116\157\x72\x74\150\40\115\x61\x63\145\x64\157\x6e\x69\141", "\141\x6c\160\x68\x61\x32" => "\x6d\153", "\x61\154\x70\x68\x61\63" => "\155\153\144"), array("\x69\x64" => 578, "\x6e\141\155\x65" => "\x4e\157\162\x77\141\171", "\x61\154\160\x68\x61\x32" => "\x6e\157", "\141\x6c\x70\x68\x61\63" => "\156\x6f\162"), array("\x69\144" => 512, "\x6e\x61\x6d\x65" => "\117\155\x61\156", "\x61\x6c\160\x68\x61\x32" => "\157\155", "\141\x6c\160\150\x61\63" => "\157\155\156"), array("\151\x64" => 586, "\156\x61\x6d\145" => "\120\141\x6b\151\163\164\141\x6e", "\x61\154\x70\150\x61\62" => "\160\153", "\x61\154\x70\x68\x61\x33" => "\x70\141\153"), array("\151\144" => 585, "\156\141\155\x65" => "\x50\141\154\x61\165", "\x61\154\x70\x68\141\x32" => "\160\167", "\141\154\x70\150\x61\x33" => "\x70\154\x77"), array("\151\144" => 591, "\x6e\141\155\x65" => "\x50\141\x6e\141\x6d\141", "\141\154\160\150\141\62" => "\x70\x61", "\x61\154\x70\150\x61\x33" => "\x70\x61\156"), array("\x69\x64" => 598, "\x6e\x61\155\145" => "\x50\x61\160\x75\141\40\116\145\x77\40\107\165\x69\x6e\x65\141", "\x61\x6c\160\150\141\62" => "\160\x67", "\141\154\x70\x68\x61\x33" => "\160\156\147"), array("\x69\x64" => 600, "\x6e\141\155\x65" => "\x50\141\162\x61\147\165\141\x79", "\x61\x6c\x70\x68\141\x32" => "\x70\x79", "\x61\154\160\150\x61\x33" => "\x70\162\x79"), array("\x69\144" => 604, "\x6e\x61\155\x65" => "\120\145\162\x75", "\x61\x6c\x70\150\141\62" => "\160\145", "\141\154\160\x68\x61\x33" => "\160\x65\x72"), array("\x69\x64" => 608, "\x6e\141\155\x65" => "\x50\150\x69\154\x69\160\160\151\156\x65\x73", "\141\154\160\x68\x61\62" => "\160\x68", "\141\x6c\x70\x68\141\x33" => "\x70\150\154"), array("\151\x64" => 616, "\156\141\155\x65" => "\120\x6f\154\141\156\x64", "\141\154\x70\x68\141\x32" => "\x70\x6c", "\x61\x6c\x70\x68\141\63" => "\160\157\154"), array("\x69\144" => 620, "\x6e\x61\155\145" => "\120\157\162\164\x75\147\141\154", "\141\x6c\160\x68\141\62" => "\160\x74", "\141\154\x70\x68\x61\x33" => "\160\162\x74"), array("\151\144" => 634, "\x6e\x61\x6d\x65" => "\x51\141\x74\x61\x72", "\x61\x6c\160\x68\x61\62" => "\161\141", "\141\x6c\x70\150\141\63" => "\x71\x61\164"), array("\x69\144" => 642, "\156\141\x6d\x65" => "\122\157\155\141\156\151\141", "\x61\x6c\x70\x68\x61\x32" => "\162\x6f", "\141\154\160\x68\x61\x33" => "\x72\x6f\x75"), array("\151\x64" => 643, "\156\x61\155\145" => "\122\165\x73\163\x69\141\x6e\40\x46\145\144\x65\x72\141\164\x69\x6f\156", "\x61\x6c\160\x68\141\62" => "\162\165", "\x61\154\160\x68\x61\x33" => "\162\x75\163"), array("\151\144" => 646, "\x6e\141\155\x65" => "\x52\167\x61\156\144\141", "\x61\154\x70\x68\x61\62" => "\x72\167", "\141\x6c\160\x68\x61\x33" => "\x72\x77\141"), array("\x69\144" => 659, "\156\x61\x6d\x65" => "\123\141\x69\156\164\40\x4b\x69\x74\164\x73\x20\141\x6e\x64\x20\116\145\x76\151\x73", "\x61\x6c\x70\150\141\62" => "\153\156", "\141\x6c\x70\x68\x61\x33" => "\153\156\x61"), array("\151\x64" => 662, "\x6e\x61\155\x65" => "\123\x61\x69\156\164\40\114\x75\x63\x69\x61", "\141\x6c\x70\x68\141\x32" => "\154\143", "\x61\x6c\x70\x68\x61\x33" => "\154\143\141"), array("\x69\x64" => 670, "\156\141\x6d\x65" => "\x53\141\151\156\x74\x20\x56\151\x6e\x63\x65\x6e\164\40\x61\156\x64\x20\x74\x68\145\40\107\162\145\156\x61\144\151\156\145\163", "\x61\x6c\x70\x68\141\62" => "\x76\143", "\141\154\160\150\141\63" => "\166\143\x74"), array("\151\x64" => 882, "\156\x61\x6d\145" => "\x53\141\x6d\x6f\x61", "\x61\154\x70\150\141\x32" => "\167\163", "\141\154\160\x68\141\63" => "\167\163\x6d"), array("\151\144" => 674, "\x6e\x61\155\x65" => "\123\141\156\40\115\141\x72\x69\156\x6f", "\x61\154\x70\150\141\62" => "\x73\x6d", "\141\154\160\x68\x61\x33" => "\x73\x6d\x72"), array("\151\144" => 678, "\x6e\x61\x6d\145" => "\x53\x61\157\x20\124\157\155\145\x20\x61\x6e\144\40\x50\x72\x69\x6e\143\x69\x70\x65", "\141\x6c\x70\x68\141\62" => "\x73\164", "\x61\154\160\150\x61\63" => "\163\x74\x70"), array("\151\x64" => 682, "\x6e\141\x6d\x65" => "\123\141\x75\144\x69\x20\x41\x72\x61\142\151\141", "\x61\x6c\x70\150\141\x32" => "\163\141", "\x61\x6c\x70\x68\x61\x33" => "\163\141\165"), array("\x69\x64" => 686, "\156\x61\155\145" => "\123\x65\x6e\x65\147\141\154", "\141\154\160\150\141\x32" => "\163\x6e", "\x61\154\160\150\x61\63" => "\x73\145\x6e"), array("\151\144" => 688, "\156\x61\155\145" => "\x53\x65\162\x62\x69\x61", "\141\x6c\x70\x68\x61\x32" => "\x72\x73", "\141\x6c\160\x68\x61\x33" => "\163\x72\142"), array("\x69\144" => 690, "\156\141\155\145" => "\x53\x65\x79\143\x68\x65\154\154\x65\x73", "\x61\154\160\150\x61\62" => "\163\143", "\x61\154\160\x68\141\63" => "\163\x79\143"), array("\x69\144" => 694, "\156\141\155\x65" => "\x53\x69\145\162\162\141\x20\x4c\x65\x6f\156\x65", "\141\154\160\x68\141\x32" => "\x73\154", "\141\x6c\160\x68\x61\63" => "\x73\154\x65"), array("\x69\x64" => 702, "\x6e\141\x6d\x65" => "\x53\151\156\147\141\160\x6f\x72\x65", "\141\154\x70\150\x61\x32" => "\x73\147", "\x61\154\x70\x68\x61\63" => "\x73\x67\160"), array("\151\x64" => 703, "\156\141\155\145" => "\x53\154\157\166\141\153\151\x61", "\141\x6c\x70\x68\x61\x32" => "\163\153", "\141\154\160\150\141\x33" => "\x73\166\x6b"), array("\151\x64" => 705, "\156\141\155\x65" => "\x53\154\x6f\x76\x65\x6e\x69\141", "\141\x6c\160\150\x61\62" => "\163\x69", "\141\154\160\150\x61\x33" => "\x73\166\x6e"), array("\x69\x64" => 90, "\x6e\141\155\145" => "\x53\x6f\154\157\155\x6f\x6e\x20\111\163\x6c\141\x6e\x64\163", "\141\x6c\x70\150\x61\x32" => "\163\142", "\141\154\160\x68\141\63" => "\x73\154\142"), array("\151\x64" => 706, "\156\x61\x6d\x65" => "\x53\157\x6d\141\154\x69\x61", "\141\154\160\150\x61\x32" => "\x73\157", "\x61\154\160\150\x61\x33" => "\163\157\x6d"), array("\151\x64" => 710, "\x6e\141\155\x65" => "\x53\157\165\164\150\x20\x41\146\x72\x69\x63\x61", "\141\154\160\x68\141\62" => "\x7a\141", "\x61\x6c\x70\x68\141\63" => "\x7a\141\x66"), array("\x69\144" => 728, "\x6e\x61\x6d\x65" => "\x53\x6f\x75\x74\x68\x20\x53\165\x64\141\156", "\141\x6c\x70\x68\141\62" => "\163\x73", "\x61\x6c\160\x68\x61\x33" => "\163\163\144"), array("\151\144" => 724, "\156\141\x6d\x65" => "\123\x70\141\x69\x6e", "\141\154\160\x68\x61\62" => "\145\x73", "\141\154\160\x68\141\x33" => "\x65\163\x70"), array("\x69\144" => 144, "\x6e\141\x6d\x65" => "\x53\162\151\x20\x4c\141\156\153\141", "\x61\154\160\150\141\x32" => "\154\153", "\141\154\160\150\141\x33" => "\x6c\153\141"), array("\151\x64" => 729, "\x6e\141\x6d\145" => "\x53\x75\x64\x61\156", "\x61\x6c\160\x68\x61\62" => "\163\144", "\x61\x6c\160\x68\x61\63" => "\x73\x64\x6e"), array("\151\x64" => 740, "\x6e\141\x6d\x65" => "\x53\165\162\x69\x6e\141\155\x65", "\141\154\160\x68\141\x32" => "\x73\162", "\141\x6c\160\150\141\63" => "\163\165\162"), array("\151\x64" => 752, "\156\x61\x6d\145" => "\123\x77\145\144\145\x6e", "\141\x6c\160\x68\x61\62" => "\x73\145", "\x61\154\160\150\x61\63" => "\163\167\x65"), array("\151\144" => 756, "\x6e\x61\155\145" => "\x53\x77\151\x74\x7a\145\162\154\141\x6e\x64", "\141\x6c\x70\x68\141\x32" => "\143\x68", "\141\x6c\x70\150\141\63" => "\x63\150\x65"), array("\x69\144" => 760, "\156\x61\x6d\x65" => "\x53\x79\x72\x69\x61\x6e\x20\101\162\141\142\40\122\x65\160\x75\x62\x6c\x69\x63", "\x61\154\160\x68\x61\x32" => "\x73\x79", "\141\x6c\160\x68\141\63" => "\x73\x79\x72"), array("\151\144" => 762, "\156\x61\155\145" => "\124\141\x6a\151\153\151\x73\164\141\156", "\141\x6c\160\x68\141\x32" => "\164\x6a", "\141\154\160\x68\141\x33" => "\164\x6a\x6b"), array("\151\x64" => 834, "\x6e\141\155\145" => "\124\141\156\x7a\141\x6e\x69\x61\54\40\125\156\x69\164\145\144\x20\x52\x65\x70\x75\142\x6c\151\143\x20\157\x66", "\141\x6c\x70\150\141\x32" => "\x74\x7a", "\x61\x6c\x70\150\141\63" => "\x74\172\x61"), array("\x69\144" => 764, "\156\x61\155\x65" => "\x54\150\x61\151\x6c\x61\156\144", "\x61\x6c\160\150\x61\x32" => "\164\150", "\x61\154\160\x68\141\63" => "\x74\150\141"), array("\x69\x64" => 626, "\x6e\141\x6d\145" => "\x54\x69\155\157\162\x2d\114\x65\x73\x74\145", "\x61\154\x70\150\141\x32" => "\x74\154", "\x61\154\x70\150\141\63" => "\164\x6c\x73"), array("\x69\x64" => 768, "\156\141\x6d\x65" => "\x54\x6f\x67\x6f", "\141\x6c\x70\150\x61\x32" => "\164\x67", "\x61\154\160\x68\141\x33" => "\164\147\x6f"), array("\x69\x64" => 776, "\x6e\141\x6d\145" => "\124\x6f\x6e\147\x61", "\x61\x6c\160\150\x61\62" => "\x74\157", "\x61\x6c\x70\x68\141\63" => "\x74\157\x6e"), array("\x69\144" => 780, "\156\141\x6d\145" => "\x54\x72\x69\156\x69\144\141\x64\40\x61\156\144\40\124\157\142\141\147\157", "\x61\154\160\150\x61\62" => "\x74\x74", "\141\154\x70\150\141\63" => "\x74\x74\157"), array("\151\144" => 788, "\x6e\x61\x6d\x65" => "\124\x75\x6e\x69\163\x69\x61", "\141\154\160\150\141\x32" => "\164\156", "\141\x6c\160\150\x61\x33" => "\x74\165\x6e"), array("\151\x64" => 792, "\156\x61\155\145" => "\124\x75\162\153\x65\x79", "\x61\x6c\x70\150\x61\62" => "\164\x72", "\x61\x6c\160\x68\141\x33" => "\164\165\162"), array("\151\144" => 795, "\156\141\155\x65" => "\124\x75\162\x6b\x6d\x65\x6e\x69\x73\x74\141\156", "\141\154\160\150\141\62" => "\x74\155", "\x61\x6c\x70\x68\141\x33" => "\164\x6b\x6d"), array("\x69\144" => 798, "\156\x61\155\x65" => "\x54\165\166\141\154\165", "\x61\154\x70\150\141\x32" => "\164\x76", "\141\x6c\x70\150\x61\63" => "\x74\165\x76"), array("\x69\144" => 800, "\x6e\141\x6d\x65" => "\x55\147\141\156\x64\x61", "\141\154\160\x68\141\62" => "\165\x67", "\141\x6c\160\x68\141\x33" => "\165\147\141"), array("\151\x64" => 804, "\156\x61\155\145" => "\125\x6b\x72\x61\x69\156\145", "\141\x6c\160\x68\141\62" => "\x75\141", "\141\154\160\150\x61\x33" => "\x75\x6b\x72"), array("\151\144" => 784, "\156\141\x6d\x65" => "\125\156\151\164\145\144\40\x41\x72\x61\142\x20\105\155\x69\x72\x61\x74\x65\x73", "\141\154\x70\x68\x61\62" => "\141\145", "\x61\154\x70\x68\x61\x33" => "\141\x72\x65"), array("\x69\x64" => 826, "\156\141\155\145" => "\x55\x6e\151\164\145\x64\40\113\151\x6e\147\x64\x6f\x6d\x20\157\146\x20\107\x72\x65\141\x74\x20\102\x72\x69\x74\141\x69\x6e\40\x61\156\x64\x20\x4e\157\162\164\150\x65\x72\156\x20\x49\x72\x65\x6c\x61\x6e\144", "\x61\154\160\x68\x61\62" => "\147\142", "\141\154\x70\x68\x61\x33" => "\147\x62\162"), array("\151\x64" => 840, "\x6e\141\155\145" => "\125\156\x69\164\145\144\x20\123\164\141\x74\145\163\x20\157\x66\40\101\x6d\145\162\x69\x63\x61", "\x61\154\160\150\141\62" => "\165\x73", "\x61\x6c\x70\x68\x61\63" => "\165\163\141"), array("\x69\144" => 858, "\x6e\141\155\x65" => "\x55\162\x75\147\x75\x61\x79", "\141\154\x70\150\141\x32" => "\x75\x79", "\141\154\x70\x68\141\x33" => "\x75\x72\x79"), array("\151\x64" => 860, "\156\x61\x6d\x65" => "\125\172\x62\145\153\x69\163\164\141\x6e", "\x61\x6c\160\150\x61\62" => "\165\x7a", "\x61\154\x70\x68\141\63" => "\165\x7a\x62"), array("\x69\144" => 548, "\156\141\x6d\145" => "\x56\x61\156\165\141\x74\165", "\x61\x6c\160\x68\x61\62" => "\x76\165", "\x61\154\x70\x68\x61\63" => "\x76\165\x74"), array("\151\144" => 862, "\x6e\141\155\x65" => "\126\145\156\145\172\x75\145\154\141\x20\50\x42\157\x6c\x69\x76\141\162\151\x61\156\40\x52\x65\x70\x75\142\154\x69\143\40\157\146\51", "\141\x6c\160\150\141\x32" => "\166\x65", "\x61\154\x70\150\141\63" => "\166\x65\x6e"), array("\x69\144" => 704, "\156\x61\x6d\145" => "\126\x69\145\164\40\x4e\141\155", "\141\x6c\160\150\x61\62" => "\x76\156", "\141\154\160\x68\x61\63" => "\166\156\155"), array("\x69\144" => 887, "\x6e\141\x6d\x65" => "\131\145\x6d\145\x6e", "\x61\154\160\150\141\62" => "\x79\145", "\x61\x6c\160\150\141\x33" => "\171\x65\x6d"), array("\x69\x64" => 894, "\x6e\x61\x6d\145" => "\132\141\155\x62\151\141", "\x61\x6c\160\150\x61\x32" => "\x7a\x6d", "\x61\x6c\x70\x68\141\63" => "\x7a\x6d\x62"), array("\x69\x64" => 716, "\x6e\141\155\145" => "\132\151\155\142\x61\x62\167\x65", "\x61\x6c\x70\150\141\62" => "\x7a\x77", "\x61\154\160\x68\141\63" => "\172\167\145")); foreach ($countries as $key => $value) { if (strtoupper($value["\x61\x6c\x70\150\141\62"]) == $iso2) { return strtoupper($value["\141\x6c\x70\x68\x61\63"]); } } } public function dlo_before_plugin_activate() { if (is_admin() && current_user_can("\x61\143\x74\x69\166\141\x74\x65\137\160\154\x75\x67\x69\156\163") && !is_plugin_active("\x77\x6f\157\143\x6f\x6d\155\x65\162\143\145\57\167\x6f\x6f\143\x6f\x6d\x6d\145\x72\x63\145\x2e\x70\150\x70")) { add_action("\x61\144\155\151\156\137\x6e\157\x74\x69\x63\x65\x73", array($this, "\x64\x6c\157\x5f\x70\x6c\x75\x67\151\156\137\x6e\x6f\164\151\143\145")); deactivate_plugins(plugin_basename(__FILE__)); if (isset($_GET["\141\x63\164\151\x76\141\164\145"])) { unset($_GET["\x61\x63\x74\x69\x76\x61\x74\145"]); } } if (is_admin() && current_user_can("\x61\143\x74\151\166\141\164\x65\137\160\154\165\147\x69\156\x73") && !is_plugin_active("\x64\154\x5f\x69\x6d\160\x6f\162\164\x5f\x70\x72\157\x64\x75\x63\164\x73\x2f\x64\154\x5f\x69\155\160\157\x72\x74\x5f\160\162\157\144\165\x63\164\x73\56\x70\150\160")) { add_action("\141\x64\x6d\x69\156\137\x6e\x6f\x74\x69\143\x65\163", array($this, "\x64\x6c\x6f\137\x70\154\165\x67\x69\156\x5f\x6e\x6f\x74\151\x63\x65")); deactivate_plugins(plugin_basename(__FILE__)); if (isset($_GET["\x61\143\x74\151\x76\141\164\x65"])) { unset($_GET["\141\143\x74\151\x76\141\164\x65"]); } } } public function dlo_plugin_notice() { if (!class_exists("\127\157\x6f\143\157\155\x6d\145\x72\x63\x65")) { echo "\x3c\144\x69\x76\40\x63\x6c\x61\x73\163\75\x22\156\157\x74\151\143\x65\40\x6e\157\x74\x69\x63\145\55\167\141\162\156\151\156\x67\x20\x69\163\x2d\x64\151\x73\155\x69\x73\163\x69\x62\154\145\42\x3e\xa\40\40\x20\40\x20\40\40\40\x20\x20\x20\40\40\40\x20\x20\74\x70\x3e" . __("\x50\154\165\x67\151\156\40\143\157\165\154\x64\x20\156\x6f\x74\40\142\x65\40\141\143\164\x69\166\141\164\145\x64\56\x20\x50\154\x65\x61\x73\145\x20\x69\x6e\x73\164\141\154\154\x20\141\x6e\144\40\141\143\x74\x69\166\141\164\x65\x20\x57\x6f\157\x63\157\x6d\x6d\x65\162\x63\145\x20\120\x6c\165\x67\x69\156\x2c\40\x74\157\x20\145\x6e\x61\142\154\x65\x20\102\x72\151\x64\147\145\40\101\x75\x74\157\155\141\x74\151\x6f\x6e\x20\117\x72\x64\145\162\163\56", "\x64\x6c\55\x6f\162\x64\145\162\x73") . "\x3c\57\160\x3e\xa\x20\x20\40\40\40\40\x20\x20\x20\40\40\40\74\57\144\x69\166\x3e"; } if (!class_exists("\x44\x4c\137\x49\155\x70\x6f\x72\164\137\120\x72\157\144\x75\143\164\x73")) { echo "\74\144\151\x76\x20\143\154\x61\x73\163\75\42\x6e\157\164\151\x63\x65\x20\156\x6f\164\x69\x63\x65\55\167\141\x72\x6e\151\x6e\x67\x20\151\163\55\x64\151\163\155\151\x73\x73\x69\142\154\145\42\76\xa\40\40\40\x20\x20\x20\x20\40\40\x20\40\x20\x20\40\40\x20\x3c\160\x3e" . __("\x50\x6c\x75\147\151\x6e\40\143\157\x75\x6c\x64\40\x6e\157\x74\40\x62\x65\x20\141\143\164\x69\166\141\x74\145\x64\x2e\40\120\154\145\141\x73\145\40\x69\156\163\x74\141\x6c\x6c\x20\x61\x6e\x64\x20\x61\x63\x74\151\x76\x61\x74\x65\40\102\x72\151\144\x67\145\40\x49\155\160\x6f\162\x74\40\x50\162\157\144\165\x63\164\x73\x20\x50\x6c\165\x67\151\x6e\54\x20\x74\157\40\145\x6e\141\142\154\145\40\102\x72\151\x64\147\x65\x20\x4f\x72\144\145\162\x73\40\101\165\x74\155\x61\x74\151\157\x6e\x20\x50\154\165\x67\x69\x6e\56", "\x64\154\55\157\x72\x64\x65\162\x73") . "\74\x2f\160\76\xa\40\40\40\40\x20\40\x20\x20\40\x20\x20\40\74\x2f\144\151\x76\76"; } } private function dlo_init_actions() { add_action("\141\x64\x6d\151\x6e\137\x6d\x65\x6e\x75", array($this, "\144\154\157\x5f\155\x65\156\165\137\x73\145\164\165\x70")); add_action("\x61\x64\155\x69\x6e\x5f\x69\156\151\164", array($this, "\144\154\x6f\x5f\163\145\164\x74\x69\156\147\x73\x5f\151\x6e\151\x74")); add_action("\x77\x70\x5f\141\152\141\x78\137\144\154\157\x5f\x75\163\x65\162\137\x61\x70\x69\137\x6b\x65\171\x5f\163\x75\x62\155\x69\x73\x73\151\x6f\x6e", array($this, "\x64\154\x6f\137\x75\x73\x65\162\137\x61\160\151\x5f\x6b\x65\x79\x5f\x73\165\142\155\151\163\163\x69\157\x6e")); add_action("\167\x70\137\141\x6a\141\x78\137\x6e\157\x70\162\151\166\x5f\144\x6c\157\x5f\165\x73\145\162\137\x61\160\x69\x5f\x6b\x65\171\x5f\x73\x75\142\155\x69\x73\163\151\x6f\156", array($this, "\144\154\x6f\x5f\x75\x73\x65\x72\137\x61\160\x69\x5f\153\x65\171\137\x73\165\142\155\x69\x73\x73\x69\157\156")); add_action("\x77\x70\x5f\141\x6a\x61\x78\x5f\144\x6c\137\163\x68\151\x70\x70\x69\x6e\x67\x5f\155\x61\160", array($this, "\144\x6c\x5f\x73\x68\151\160\x70\151\156\147\137\x6d\x61\x70")); add_action("\167\160\x5f\x61\152\x61\170\137\156\157\160\162\151\x76\137\x64\154\137\163\150\x69\160\x70\x69\156\147\137\155\x61\x70", array($this, "\144\x6c\137\x73\150\151\x70\160\151\x6e\x67\x5f\x6d\x61\x70")); add_action("\x77\x70\137\141\x6a\141\x78\x5f\x64\154\x5f\160\x61\171\x5f\155\141\160", array($this, "\144\154\x5f\x70\141\171\137\155\141\160")); add_action("\167\x70\137\141\152\x61\x78\137\156\x6f\160\162\151\166\137\x64\154\x5f\x70\x61\171\137\155\x61\160", array($this, "\x64\x6c\137\x70\x61\x79\137\155\x61\160")); add_action("\167\160\137\141\x6a\141\170\137\x64\154\137\x72\x65\163\x65\x6e\x64", array($this, "\144\x6c\137\162\x65\x73\145\x6e\x64")); add_action("\167\x70\137\141\x6a\141\170\x5f\x6e\x6f\160\x72\x69\x76\137\x64\x6c\137\x72\145\163\x65\156\x64", array($this, "\144\x6c\x5f\162\145\x73\x65\x6e\x64")); } public function dlo_plugin_activate() { $this->generate_user_activation_key(); } public function dl_resend() { if (isset($_POST["\x6f\162\144\x65\x72\137\151\144"])) { $order_id = $_POST["\157\x72\144\145\162\x5f\x69\144"]; $this->dlo_wo_send_order($order_id); echo "\61"; } } public function generate_user_activation_key() { if (!isset($_SERVER["\x48\124\x54\120\x5f\110\x4f\123\124"])) { return; } $site_domain = $_SERVER["\110\x54\x54\120\x5f\110\x4f\x53\124"]; $site_domain = str_replace("\x77\x77\x77\x2e", '', $site_domain); $s_data = "\144\x6c\137\157\162\x64\145\x72\x73\x5f"; $dd = implode('', unpack("\x43\52", $s_data)); $nd = implode('', unpack("\x43\x2a", $site_domain)); $userd = $dd ^ $nd; $eu = base64_encode($userd); update_option("\x64\x6c\137\x6f\x72\144\145\x72\x73\x5f\x74", $eu); } public function dlo_enqueue_scripts() { wp_enqueue_script("\152\x71\x75\145\x72\171"); wp_enqueue_script("\x64\x6c\157\x2d\152\163", plugin_dir_url(__FILE__) . "\141\x73\x73\x65\164\x73\x2f\x6a\163\57\x73\143\x72\151\160\x74\x73\56\152\x73", array("\152\161\x75\x65\162\171"), 1.1, true); wp_localize_script("\144\154\157\x2d\152\163", "\x64\x6c\x6f\x5f\x73\143\162\151\x70\164", array("\x61\x6a\x61\170\x5f\165\x72\154" => admin_url("\141\x64\155\x69\x6e\55\x61\152\x61\170\x2e\160\150\x70"))); } public function dlo_add_stylesheet() { wp_enqueue_style("\x64\x6c\x6f\55\163\x74\x79\x6c\x65", plugins_url("\x61\x73\163\145\x74\x73\57\x63\163\163\x2f\x73\x74\171\154\145\x2e\x63\163\x73", __FILE__)); } public function dlo_menu_setup() { add_menu_page(__("\x53\145\164\x74\x69\156\147\163", "\x64\x6c\55\157\x72\x64\145\162\x73"), __("\102\x72\151\x64\147\145\x20\x4f\162\x64\145\162\163\x20\101\165\x74\x6f\x6d\141\x74\x69\157\156", "\144\154\x2d\157\x72\x64\145\x72\163"), "\x6d\141\156\x61\147\x65\137\x6f\x70\164\x69\157\156\x73", "\144\154\157\55\x73\x65\164\x74\151\156\147\163", array($this, "\144\x6c\x6f\137\163\x65\x74\x74\x69\x6e\x67\163")); add_submenu_page("\x64\154\x6f\x2d\x73\145\164\x74\x69\x6e\x67\163", __("\123\x65\x74\164\x69\156\x67\x73", "\144\154\55\157\x72\144\145\x72\x73"), __("\x53\x65\164\164\x69\156\147\x73", "\144\x6c\x2d\157\162\144\145\162\163"), "\155\x61\x6e\141\147\x65\137\x6f\x70\x74\x69\157\156\x73", "\144\x6c\157\x2d\x73\145\x74\x74\151\x6e\147\x73", array($this, "\144\x6c\157\137\x73\x65\164\164\151\156\x67\163")); add_submenu_page("\x64\154\x6f\x2d\163\145\164\x74\x69\x6e\147\163", __("\x43\157\165\162\151\145\162\163", "\x64\154\55\157\x72\x64\145\x72\163"), __("\103\157\165\x72\x69\145\162\x73", "\x64\x6c\x2d\x6f\x72\144\x65\x72\163"), "\155\141\x6e\141\x67\x65\x5f\x6f\160\164\151\x6f\156\163", "\x64\x6c\157\55\143\x6f\x75\x72\151\145\x72\163", array($this, "\144\x6c\157\137\143\x6f\165\x72\x69\145\162\x73")); add_submenu_page("\x64\x6c\157\55\163\x65\164\x74\151\x6e\147\x73", __("\120\141\171\x6d\x65\156\x74\40\x4d\145\164\150\x6f\x64\x73", "\144\154\55\x6f\x72\x64\145\x72\163"), __("\x50\x61\x79\x6d\x65\156\164\40\115\145\164\150\x6f\144\163", "\x64\154\x2d\x6f\162\x64\x65\x72\x73"), "\x6d\x61\x6e\x61\147\145\x5f\x6f\x70\164\x69\x6f\x6e\163", "\x64\154\x6f\x2d\160\141\171\155\x65\x6e\x74\55\155\145\x74\150\x6f\x64\x73", array($this, "\144\x6c\157\137\160\x61\171\155\x65\156\x74\x5f\155\145\x74\x68\x6f\x64\163")); add_submenu_page("\144\x6c\157\55\x73\x65\164\x74\151\x6e\x67\x73", __("\110\151\163\x74\157\162\151\x63", "\144\154\55\x6f\x72\144\145\x72\163"), __("\110\x69\x73\164\x6f\162\151\x63", "\144\154\x2d\x6f\162\x64\145\x72\163"), "\155\141\x6e\141\x67\145\x5f\x6f\160\164\x69\157\156\163", "\x64\154\157\x2d\x68\151\x73\164\157\162\x69\143\55\x6f\x72\144\145\x72\x73", array($this, "\x64\x6c\157\137\x68\x69\x73\x74\x6f\x72\151\x63\x5f\x6f\162\144\x65\x72\x73")); add_submenu_page("\x64\154\x6f\55\x73\145\x74\164\151\156\x67\163", __("\x41\143\x74\x69\x76\141\x74\x69\157\156", "\144\x6c\x2d\x6f\162\144\145\162\163"), __("\x41\143\x74\151\166\x61\164\x69\x6f\156", "\x64\154\55\x6f\162\144\x65\162\163"), "\x6d\141\x6e\x61\147\x65\x5f\x6f\x70\x74\x69\157\156\x73", "\x64\154\157\x2d\x61\143\x74\151\166\x61\x74\151\157\156", array($this, "\144\154\157\x5f\x61\143\x74\151\166\141\164\x69\157\x6e")); } public function dlo_user_api_key_submission() { $udd = htmlspecialchars_decode($_POST["\x75\x73\x65\162\x5f\x61\x70\x69\x5f\153\145\x79"]); $dl_orders_t = get_option("\144\x6c\137\x6f\162\x64\145\x72\x73\137\164"); if ($dl_orders_t == $udd) { $user_key_message = __("\125\x73\x65\x72\x20\x6b\145\x79\40\141\x63\164\x69\x76\141\x74\x65\x64\x20\x73\x75\x63\x63\x65\x73\163\x66\165\x6c\154\x79\56", "\x64\x6c\x2d\x6f\x72\x64\x65\162\163"); update_option("\144\154\141\x6f", true); } else { $user_key_message = __("\x55\x73\x65\162\x20\153\x65\x79\40\x61\x63\x74\x69\166\x61\164\151\x6f\x6e\x20\x66\141\x69\154\x65\144\56", "\x64\154\x2d\157\x72\144\x65\162\163"); update_option("\144\154\141\x6f", false); } echo $user_key_message; die; } public function dlo_activation() { $ok = get_option("\144\x6c\x61\x6f"); if (!$ok) { require "\141\x73\x73\145\x74\163\57\166\151\145\x77\163\x2f\144\x6c\x6f\x5f\165\163\145\162\x5f\141\143\x74\x69\166\x61\x74\x69\157\x6e\x5f\x70\x61\147\x65\x2e\x70\x68\160"; } else { require "\141\x73\163\145\164\x73\x2f\x76\x69\x65\x77\x73\x2f\144\x6c\x6f\137\x61\143\x74\x69\x76\141\164\x69\157\156\x5f\x70\147\x5f\163\x63\162\145\x65\x6e\137\157\x76\x65\162\x6c\141\x79\56\160\150\160"; } } public function dlo_settings() { $ok = get_option("\x64\154\141\157"); if ($ok) { require "\x61\x73\163\145\164\163\x2f\166\151\x65\x77\163\57\x64\154\x6f\137\163\145\164\x74\x69\x6e\147\x73\137\x70\x61\147\x65\56\x70\x68\x70"; } else { require "\141\x73\163\x65\164\163\57\x76\x69\145\167\x73\57\x64\154\x6f\x5f\141\143\164\151\x76\141\x74\x69\157\156\x5f\163\x63\x72\x65\x65\156\x5f\x6f\166\x65\x72\154\141\171\x2e\x70\x68\160"; } } public function payment_complete($a, $old_status, $new_status) { $order = new WC_Order($a); $key = $order->get_status(); if (get_option("\x64\154\x6f\x5f\146\154\x61\x67\137\x73\x74\141\x74\x75\163\137" . $key)) { $this->dlo_wo_send_order($a); } else { if (get_option("\144\x6c\157\x5f\x66\154\141\x67\x5f\x73\164\x61\164\x75\x73\x5f\167\x63\x2d" . $key)) { $this->dlo_wo_send_order($a); } } } public function dlo_couriers() { $def_selected = ''; $def_checked = ''; $ok = get_option("\144\154\141\157"); if ($ok) { $delivery_zones = WC_Shipping_Zones::get_zones(); $LShip = array(); foreach ((array) $delivery_zones as $key => $the_zone) { foreach ($the_zone["\x73\150\151\160\x70\151\156\147\137\x6d\x65\x74\x68\157\x64\163"] as $the_zones) { array_push($LShip, array("\x69\144" => $the_zone["\x69\144"], "\x7a\x6e\141\155\x65" => $the_zone["\172\x6f\x6e\x65\x5f\156\x61\155\x65"], "\163\x6e\141\x6d\145" => $the_zones->title, "\163\143\x6f\x73\164" => $the_zones->cost)); } } $couriers = $this->dlo_wo_retrieve_couriers(); $couriers = $this->XtoA($couriers["\163\x68\x69\160\160\151\156\147\106\145\x65\x73"])["\x73\x66"]; require "\141\x73\x73\x65\164\163\57\166\151\x65\167\x73\x2f\x64\154\x6f\x5f\143\x6f\x75\x72\x69\145\x72\x73\x5f\155\141\x70\x70\x69\156\147\x5f\x70\x61\147\145\x2e\160\150\x70"; } else { require "\x61\163\163\145\164\163\x2f\x76\x69\145\167\x73\x2f\144\154\157\137\141\143\164\x69\x76\x61\x74\151\x6f\156\x5f\x73\143\162\x65\145\156\137\x6f\x76\x65\162\154\141\171\x2e\160\x68\x70"; } } public function dl_shipping_map() { if (isset($_POST["\x64\x6c\137\167\143\x5f\155\x61\160\137\163\x68\x69\160\160\151\156\147\x5f\151\144"]) && $_POST["\144\154\x5f\167\x63\137\163\x68\x69\160\x70\151\x6e\x67\x5f\156\x61\155\x65"] && $_POST["\x64\x6c\137\x6d\x61\x70\x5f\163\x68\x69\x70\160\x69\156\x67\x5f\143\x6f\x64\x65"]) { $dl_wc_map_shipping_id = $_POST["\x64\x6c\137\167\x63\x5f\x6d\x61\x70\137\x73\x68\x69\x70\x70\151\156\x67\x5f\151\x64"]; $dl_wc_shipping_name = $_POST["\144\154\x5f\x77\143\137\x73\150\151\160\160\x69\156\x67\137\x6e\141\x6d\x65"]; $dl_map_shipping_code = $_POST["\x64\154\x5f\x6d\x61\x70\x5f\x73\x68\151\x70\160\x69\156\x67\x5f\143\157\144\145"]; $dl_map_shipping_name = $_POST["\144\x6c\137\155\141\x70\x5f\x73\x68\x69\x70\x70\x69\x6e\x67\137\x6e\141\x6d\x65"]; $arr_count = count($_POST["\144\x6c\x5f\167\x63\x5f\x6d\x61\160\137\x73\150\151\160\160\151\156\147\137\151\144"]); $arr_map_shipping = array(); for ($i = 0; $i < $arr_count; $i++) { array_push($arr_map_shipping, array("\151\144" => $dl_wc_map_shipping_id[$i], "\163\156\x61\155\145" => $dl_wc_shipping_name[$i], "\x63\x6f\x64\x65" => $dl_map_shipping_code[$i], "\x6e\141\x6d\145" => $dl_map_shipping_name[$i])); } $mapping_updated = update_option("\155\141\160\137\x73\150\151\160\x70\151\156\147", $arr_map_shipping); echo $mapping_updated; } } public function dlo_settings_init() { register_setting("\144\x6c\x6f\x2d\163\145\164\164\151\156\147\x73", "\144\x6c\x6f\137\163\145\x74\x74\151\156\x67\x5f\x6e\141\x6d\x65", "\163\x61\x6e\151\164\x69\x7a\x65\137\x74\x65\x78\164\x5f\x66\151\145\x6c\x64"); add_settings_section("\144\154\157\137\163\145\164\x74\x69\156\x67\x73\x5f\x73\145\143\164\x69\157\156", "\104\162\145\141\155\x20\x4c\x6f\166\145\40\123\x65\164\x74\x69\156\147\x73\x20\123\x65\143\x74\151\x6f\x6e", "\144\154\157\x5f\x73\145\x74\164\x69\x6e\x67\x73\137\163\145\x63\164\151\x6f\156\x5f\143\142", "\144\154\157\x2d\x73\145\164\164\151\x6e\x67\x73"); add_settings_field("\144\154\157\x5f\163\145\164\164\151\x6e\147\x73\137\x66\x69\145\154\144", "\104\x4c\117\x20\x53\145\x74\x74\151\x6e\147\40\146\151\145\x6c\x64", "\144\x6c\157\x5f\163\145\x74\x74\x69\x6e\x67\x73\137\x66\151\x65\x6c\x64\x5f\x63\x62", "\144\154\x6f\55\x73\x65\164\x74\151\x6e\147\x73", "\144\154\x6f\137\x73\x65\164\x74\151\x6e\147\163\x5f\163\145\143\x74\x69\157\156"); register_setting("\144\154\x6f\x2d\163\x65\164\164\x69\x6e\x67\x73", "\144\154\x6f\137\x61\160\151\137\153\x65\x79", "\x73\x61\x6e\x69\x74\151\172\x65\137\x74\145\x78\164\x5f\x66\x69\145\x6c\x64"); register_setting("\144\x6c\x6f\55\x73\145\x74\164\151\x6e\147\163", "\144\154\x6f\x5f\141\143\x74\x69\x76\x61\x74\145\144", "\163\x61\156\151\164\151\x7a\145\137\164\x65\170\164\137\x66\x69\145\x6c\144"); register_setting("\144\154\x6f\55\163\145\x74\164\151\x6e\147\163", "\144\154\x6f\137\x77\157\x5f\x75\162\x6c", "\x73\141\x6e\x69\x74\151\172\x65\x5f\x74\x65\x78\x74\137\146\x69\145\x6c\x64"); register_setting("\144\x6c\x6f\x2d\x73\145\x74\164\x69\156\x67\163", "\144\154\157\137\167\157\x5f\x75\x73\x65\x72", "\x73\141\156\x69\x74\151\172\145\137\164\145\170\164\137\x66\x69\x65\154\x64"); register_setting("\x64\154\x6f\x2d\x73\x65\164\164\151\156\x67\163", "\x64\x6c\157\x5f\x77\x6f\137\x70\x61\163\163", "\x73\x61\x6e\151\164\x69\172\x65\137\x74\145\170\x74\137\146\x69\x65\154\x64"); register_setting("\x64\x6c\x6f\x2d\163\145\164\164\151\156\x67\163", "\144\154\x6f\137\146\x6c\x61\x67\x5f\x73\145\156\x64\x5f\x78\x6d\154"); $order = wc_get_order_statuses(); foreach ($order as $key => $value) { register_setting("\144\x6c\x6f\x2d\x73\145\164\164\x69\x6e\x67\163", "\x64\x6c\157\x5f\x66\x6c\x61\147\137\163\x74\x61\164\x75\x73\137" . $key); } $dlo_wo_url = get_option("\144\154\x6f\137\167\x6f\x5f\165\x72\x6c"); if (!isset($dlo_wo_url)) { update_option("\144\x6c\157\x5f\x77\157\x5f\x75\162\154", "\150\x74\x74\x70\x73\x3a\x2f\x2f\163\164\157\x72\x65\x2e\144\162\x65\141\x6d\154\157\x76\x65\56\x65\163\x2f\x77\x65\142\x73\145\x72\x76\151\x63\145\x73\x2f\x6f\162\144\x65\x72\x73\145\162\166\151\143\x65\x5f\167\163\144\154\x2e\x70\150\160"); } } public function dlo_payment_methods() { $ok = get_option("\x64\154\141\x6f"); if ($ok) { $paymetns = $this->dlo_wo_retrieve_payments_methods(); $pd = $this->XtoA($paymetns["\x70\x61\171\155\145\x6e\164\104\157\x63\165\155\x65\x6e\x74\163"])["\160\144"]; $gateways = WC()->payment_gateways->get_available_payment_gateways(); $enabled_gateways = array(); if ($gateways) { foreach ($gateways as $gateway) { if ($gateway->enabled == "\171\x65\x73") { array_push($enabled_gateways, array("\x69\x64" => $gateway->id, "\156\141\x6d\145" => $gateway->title)); } } } require "\x61\163\163\145\164\163\x2f\166\x69\x65\167\x73\x2f\x64\x6c\x6f\x5f\x70\141\171\155\x65\156\164\x73\137\x6d\x65\164\x68\157\x64\x73\137\x70\141\147\x65\x2e\160\150\x70"; } else { require "\x61\x73\x73\x65\x74\163\x2f\166\151\x65\167\x73\x2f\144\154\x6f\137\141\143\164\x69\x76\141\164\151\x6f\156\137\x73\x63\x72\x65\x65\156\x5f\157\x76\x65\162\154\x61\x79\56\x70\x68\x70"; } } public function dl_pay_map() { if (isset($_POST["\144\x6c\137\x77\143\137\155\x61\160\137\x70\x61\171\137\151\144"]) && $_POST["\144\154\137\167\x63\x5f\x70\141\171\137\156\141\155\145"] && $_POST["\144\x6c\x5f\x6d\141\x70\x5f\160\x61\x79\137\143\157\144\x65"]) { $dl_wc_map_pay_id = $_POST["\x64\154\137\x77\143\x5f\x6d\x61\x70\x5f\x70\141\x79\x5f\x69\x64"]; $dl_wc_pay_name = $_POST["\144\x6c\137\x77\x63\137\x70\141\171\137\x6e\x61\x6d\145"]; $dl_map_pay_code = $_POST["\144\154\137\x6d\141\x70\137\x70\x61\171\x5f\143\x6f\144\x65"]; $dl_map_pay_name = $_POST["\144\154\x5f\155\x61\x70\137\x70\141\171\137\x6e\x61\155\x65"]; $dl_map_payc_id = $_POST["\144\154\137\x6d\x61\160\137\160\x61\171\143\x5f\x69\x64"]; $arr_count = count($_POST["\x64\x6c\x5f\167\x63\x5f\155\x61\x70\x5f\160\x61\x79\x5f\x69\144"]); $arr_map_pay = array(); for ($i = 0; $i < $arr_count; $i++) { array_push($arr_map_pay, array("\151\x64" => $dl_wc_map_pay_id[$i], "\163\156\141\x6d\x65" => $dl_wc_pay_name[$i], "\x63\x6f\144\x65" => $dl_map_pay_code[$i], "\x6e\141\x6d\145" => $dl_map_pay_name[$i], "\x63\x72" => $dl_map_payc_id[$i])); } $mapping_updated = update_option("\x6d\141\x70\137\160\141\x79", $arr_map_pay); echo $mapping_updated; } } public function dlo_historic_orders() { $ok = get_option("\x64\154\x61\157"); if ($ok) { require "\x61\x73\163\145\x74\x73\57\x76\x69\145\x77\163\57\x64\154\x6f\x5f\x68\x69\163\164\157\162\151\143\137\160\141\x67\145\x2e\x70\150\160"; } else { require "\141\x73\x73\x65\164\x73\x2f\x76\x69\x65\167\163\57\x64\154\157\x5f\x61\143\164\x69\x76\x61\164\x69\x6f\156\137\163\143\162\x65\145\x6e\x5f\x6f\x76\145\162\x6c\141\171\x2e\160\150\160"; } } public function clean_text($texto, $clean = true, $charlimit = null) { $texto = trim($texto); $texto = html_entity_decode($texto); $texto = trim(preg_replace("\x2f\x5c\x74\x2b\57", '', $texto)); $texto = addslashes($texto); if ($clean) { $texto = strip_tags($texto); } $texto = preg_replace("\x2f\x5b\134\170\x7b\62\x30\x30\102\x7d\x2d\x5c\170\173\x32\60\60\104\x7d\135\57\165", '', $texto); $texto = preg_replace("\57\133\134\170\x7b\x32\60\x30\x42\x7d\x2d\134\x78\173\x32\x30\x30\104\x7d\x5c\x78\x7b\106\x45\106\106\x7d\x5d\x2f\165", '', $texto); $texto = str_replace("\342\x80\214", '', $texto); $texto = str_replace("\x26\x23\70\62\60\63\73", '', $texto); $texto = str_replace(array("\xd\xa", "\xa", "\xd"), "\x3c\142\x72\x3e", $texto); $texto = str_replace("\134\134\162", "\74\x62\162\x3e", $texto); $texto = str_replace("\134\x72", "\74\x62\162\76", $texto); $texto = str_replace("\15", "\x3c\x62\162\x3e", $texto); $texto = str_replace("\157\156\143\154\151\143\x6b", "\x69\144", $texto); $texto = str_replace(array("\x5c", "\xc2\xa8", "\302\272", "\xe2\200\x93", "\x7e", "\x7c", "\xc2\xb7", "\x26", "\xc2\xbf", "\136", "\302\250", "\302\264", "\x23"), '', $texto); $texto = str_replace(array("\x5c", "\xe2\200\231"), '', $texto); if ($charlimit > 0) { $texto = substr($texto, 0, $charlimit); } return $texto; } public function XtoA($string) { $xml = htmlspecialchars_decode($string); $xml = simplexml_load_string($xml, "\123\x69\155\160\154\x65\x58\115\114\x45\154\x65\155\x65\x6e\x74", LIBXML_NOCDATA); $encode = json_encode($xml); return json_decode($encode, true); } public function dlo_wo_connect() { $dlo_wo_url = get_option("\x64\154\x6f\137\167\x6f\x5f\165\162\154"); $dlo_wo_user = get_option("\144\x6c\157\x5f\167\157\x5f\x75\x73\x65\x72"); $dlo_wo_pass = get_option("\144\154\157\137\x77\157\x5f\160\141\163\163"); $clientArgs = array("\x74\x72\x61\x63\x65" => 0, "\x63\157\156\x6e\x65\143\164\151\x6f\156\137\164\151\x6d\x65\x6f\x75\164" => 30, "\163\157\x61\x70\x5f\166\145\162\163\151\x6f\156" => "\123\x4f\x41\x50\137\61\x5f\61", "\x65\156\143\x6f\x64\x69\x6e\x67" => "\x75\164\146\55\70", "\x63\141\x63\x68\x65\x5f\167\163\x64\154" => WSDL_CACHE_NONE); $sClient = new SoapClient($dlo_wo_url, $clientArgs); $sKeys = array("\x55\x73\145\x72\x6e\141\x6d\145" => $dlo_wo_user, "\x50\x61\x73\163\x77\x6f\162\x64" => $dlo_wo_pass); $headers = new SoapHeader($dlo_wo_url, "\125\x73\x65\162\103\162\x65\x64\x65\x6e\x74\151\x61\x6c\x73", $sKeys); $sClient->__setSoapHeaders(array($headers)); return $sClient; } public function dlo_wo_retrieve_payments_methods() { $dlo_wo_url = get_option("\x64\154\157\137\x77\157\137\165\x72\x6c"); $dlo_wo_user = get_option("\x64\154\157\137\167\x6f\x5f\x75\163\145\x72"); $dlo_wo_pass = get_option("\x64\154\x6f\137\x77\157\137\160\x61\x73\163"); $client = $this->dlo_wo_connect(); $getPaymentFiles_response = $client->getPaymentFiles("\x62\141\x73\x69\x63", $dlo_wo_user, $dlo_wo_pass); return $getPaymentFiles_response; } public function dlo_wo_retrieve_couriers() { $dlo_wo_url = get_option("\144\x6c\157\x5f\x77\157\137\x75\162\154"); $dlo_wo_user = get_option("\x64\x6c\157\x5f\x77\157\137\165\x73\145\x72"); $dlo_wo_pass = get_option("\144\154\x6f\137\x77\x6f\x5f\x70\x61\x73\163"); $client = $this->dlo_wo_connect(); $getLogisticsFiles_response = $client->getLogisticsFiles("\142\x61\163\x69\x63", $dlo_wo_user, $dlo_wo_pass); return $getLogisticsFiles_response; } public function dlo_wo_new_order($order_id) { $dlo_wo_url = get_option("\144\x6c\157\137\167\x6f\x5f\x75\162\x6c"); $dlo_wo_user = get_option("\x64\154\157\137\167\157\x5f\165\x73\x65\x72"); $dlo_wo_pass = get_option("\x64\154\157\137\167\157\137\160\141\163\163"); $order_xml = dlo_order_xml($order_id); $client = $this->dlo_wo_connect(); $newOrder_response = $client->newOrder("\x62\141\x73\x69\143", $dlo_wo_user, $dlo_wo_pass, $order_id, $order_xml); return $newOrder_response; } public function dlo_wo_retrieve_product_info() { $dlo_wo_url = get_option("\144\x6c\157\x5f\x77\x6f\x5f\165\x72\154"); $dlo_wo_user = get_option("\x64\154\157\x5f\167\157\137\165\x73\x65\162"); $dlo_wo_pass = get_option("\144\x6c\157\x5f\167\157\137\160\141\163\x73"); $resource_string = "\160\x72\157\x64\165\143\164\111\x64\x46\x6f\162\x6d\141\164\137\144\162\145\141\x6d\x6c\157\x76\145\151\x64"; $client = $this->dlo_wo_connect(); try { $getBasicProductInfo_response = $client->getBasicProductInfo("\x62\141\x73\151\x63", $dlo_wo_user, $dlo_wo_pass, $resource_string, $product_id, 0, 1); echo "\147\x65\x74\x42\x61\163\x69\143\x50\162\x6f\x64\x75\143\x74\111\156\x66\x6f\137\162\x65\163\x70\x6f\x6e\x73\145\72\74\x70\162\145\x3e"; print_r($getBasicProductInfo_response); echo "\x3c\x2f\x70\x72\x65\76"; } catch (SoapFault $fault) { echo "\x53\157\141\x70\106\x61\165\x6c\164\x20\x30\x30\x32\72\x3c\x70\162\x65\x3e" . $fault->getMessage() . "\x3c\x70\162\145\x3e\x3c\x62\162\40\x2f\76\12"; } return $getBasicProductInfo_response; } public function dlo_wo_send_order($order_id) { if (!get_option("\x64\x6c\x6f\137\x66\154\x61\x67\137\x73\145\x6e\x64\x5f\x78\155\x6c")) { return; } $order = new WC_Order($order_id); $cart_items = $order->get_items(); $billing_first_name = $order->get_shipping_first_name(); $billing_last_name = $order->get_shipping_last_name(); $billing_phone = $order->get_billing_phone(); $billing_email = $order->get_billing_email(); $billing_address_1 = $order->get_billing_address_1(); $billing_address_2 = $order->get_billing_address_2(); $billing_postcode = $order->get_billing_postcode(); $billing_city = $order->get_billing_city(); $billing_country = $order->get_billing_country(); $state = $order->get_billing_state(); $billing_state = WC()->countries->get_states($billing_country)[$state]; $customer_id = $order->get_customer_id(); $order_number = $order->get_order_number(); $date_created = $order->get_date_created(); $payment_method = $order->get_payment_method(); $payment_method_title = $order->get_payment_method_title(); $shipping_address_1 = $order->get_shipping_address_1(); $shipping_address_2 = $order->get_shipping_address_2(); $shipping_city = $order->get_shipping_city(); $sstate = $order->get_shipping_state(); $shipping_postcode = $order->get_shipping_postcode(); $shipping_country = $order->get_shipping_country(); $shipping_state = WC()->countries->get_states($shipping_country)[$sstate]; $cart_tax = $order->get_cart_tax(); $order_total = $order->get_formatted_order_total(); $total_tax_refunded = $order->get_total_tax_refunded(); $billing_vat_number = get_post_meta($order_id, "\x5f\x62\151\x6c\x6c\x69\x6e\x67\137\x76\x61\164\137\156\x75\x6d\x62\x65\x72", true); $order_key = get_post_meta($order_id, "\137\157\162\x64\x65\x72\x5f\x6b\x65\171", true); $order_taxes_total = $order->get_tax_totals(); $ttax = 0; foreach ($order_taxes_total as $key => $value) { $ttax = $ttax + $value->amount; } $order_ftotal = $order->get_total(); $smf = ''; $sm = $order->get_shipping_method(); if (get_option("\x6d\141\x70\137\x73\x68\x69\160\160\x69\x6e\147") != '') { $svmap = get_option("\x6d\141\x70\137\x73\150\151\x70\x70\151\156\147"); foreach ($svmap as $key => $value) { if ($sm == $value["\x73\x6e\x61\155\145"]) { $smf = $value["\x63\157\x64\x65"]; break; } } } $pm = ''; $pmt = ''; $iscr = ''; if (get_option("\x6d\x61\160\x5f\x70\141\171") != '') { $svmap = get_option("\x6d\141\160\137\x70\x61\171"); foreach ($svmap as $key => $value) { if ($payment_method == $value["\x69\144"]) { $pm = $value["\143\157\x64\x65"]; $pmt = $value["\x6e\x61\x6d\145"]; if ($value["\x63\x72"] == "\x74\x72\x75\145") { $iscr = $order_ftotal; } break; } } } $order_data = array("\x62\x75\171\145\x72\137\x66\x75\x6c\154\137\156\x61\x6d\x65" => $billing_first_name . "\40" . $billing_last_name, "\142\151\154\154\151\x6e\x67\x5f\146\151\x72\x73\x74\137\156\141\x6d\x65" => $billing_first_name, "\x62\x69\x6c\154\x69\x6e\x67\137\x6c\141\x73\164\137\156\141\155\145" => $billing_last_name, "\x62\x69\x6c\154\151\156\147\137\160\x68\157\156\145" => $billing_phone, "\142\x69\x6c\154\x69\x6e\x67\137\145\x6d\x61\x69\154" => $billing_email, "\142\x69\x6c\x6c\x69\156\147\137\x61\x64\x64\x72\x65\163\x73" => $billing_address_1 . "\40" . $billing_address_2, "\142\x69\154\154\x69\156\147\x5f\x70\x6f\x73\164\143\x6f\x64\145" => $billing_postcode, "\x62\151\154\154\151\156\147\x5f\143\x69\164\171" => $billing_city, "\142\151\x6c\x6c\x69\156\x67\137\x63\x6f\165\x6e\164\x72\171" => $billing_country, "\x62\151\x6c\x6c\x69\156\x67\x5f\163\164\x61\164\x65" => $billing_state, "\143\x75\x73\x74\157\x6d\145\x72\x5f\151\x64" => $customer_id, "\157\x72\x64\x65\162\137\156\165\155\142\x65\x72" => $order_number, "\157\162\144\x65\162\x5f\153\145\x79" => $order_key, "\x64\x61\x74\x65\x5f\x63\162\x65\141\164\x65\x64" => $date_created, "\x70\141\x79\x6d\x65\x6e\164\x5f\x6d\x65\x74\150\157\x64\x5f\164\151\x74\x6c\x65" => $pmt, "\x70\141\x79\155\145\156\164\137\x6d\x65\x74\150\157\x64" => $pm, "\163\150\x69\x70\160\151\x6e\147\137\141\x64\144\x72\145\163\x73" => $shipping_address_1 . "\40" . $shipping_address_2, "\163\x68\x69\160\x70\151\156\x67\x5f\143\x69\x74\171" => $shipping_city, "\x73\x68\151\x70\x70\151\x6e\x67\x5f\163\164\141\164\145" => $shipping_state, "\x73\150\151\x70\160\x69\156\x67\137\160\157\163\x74\x63\157\x64\x65" => $shipping_postcode, "\163\150\x69\x70\160\151\x6e\x67\x5f\143\157\x75\156\164\162\171" => $shipping_country, "\143\x61\x72\x74\137\164\141\x78" => $cart_tax, "\x6f\162\144\x65\x72\x5f\164\157\164\x61\154" => $order_total, "\164\x6f\164\141\x6c\137\x74\141\170\x5f\162\145\x66\165\x6e\144\145\144" => $total_tax_refunded, "\142\x69\154\x6c\x69\156\x67\x5f\166\x61\164\137\156\165\155\x62\x65\x72" => $billing_vat_number, "\x73\x68\x69\160\x70\151\156\x67\x5f\155\x65\x74\x68\x6f\x64" => $smf, "\x6f\162\x64\145\x72\x5f\151\164\x65\155\163" => $cart_items, "\157\x72\144\145\x72\x5f\164\141\170\145\163\x5f\x74\157\164\141\x6c" => $ttax, "\157\162\144\145\x72\137\x66\x74\x6f\164\141\154" => $order_ftotal, "\x6f\x72\144\x65\162\x5f\x74\x61\x78\137\x72\141\164\x65" => "\62\61", "\151\163\143\x72" => $iscr); $rstatus = "\x2d\x31"; $rdesc = _e("\105\x72\x72\x6f\x72\40\151\x6e\x20\x73\x65\x74\164\x69\156\147\163", "\x64\154\x2d\x6f\162\x64\145\162\x73"); $rdl = "\55\61"; $generated_xml = $this->generate_xml($order_data); $x = simplexml_load_file($generated_xml)->asXML(); if (!empty($pmt) && !empty($smf) && !empty($generated_xml)) { $dlo_wo_url = get_option("\x64\x6c\157\x5f\x77\157\x5f\165\162\154"); $dlo_wo_user = get_option("\x64\154\x6f\x5f\x77\x6f\x5f\165\x73\145\x72"); $dlo_wo_pass = get_option("\x64\154\157\137\x77\x6f\137\x70\x61\163\163"); $client = $this->dlo_wo_connect(); $response = $client->newOrder("\x62\141\x73\x69\x63", $dlo_wo_user, $dlo_wo_pass, $order_id, utf8_encode($x)); $rstatus = $response["\163\164\141\x74\x75\x73"]; $rdesc = $response["\145\x72\162\x6f\162\x44\145\x73\x63\162\x69\160\164\151\157\x6e"]; $rdl = $response["\144\x72\145\141\x6d\x6c\157\x76\x65\x4f\x72\x64\145\162\111\144"]; $rtrack = $response["\164\162\141\143\x6b\x69\156\x67\137\156\x75\x6d\142\x65\162"]; } if ($rstatus == 1) { $rdesc = __("\117\x72\144\145\x72\x20\x73\x65\156\164\40\x73\165\x63\x63\x65\x73\x73\x66\x75\154\154\x79\54\x20\x54\x72\141\143\153\151\156\x67\40\116\x75\x6d\x62\x65\x72\72", "\144\x6c\x2d\x6f\162\144\145\162\163") . "\40" . $rtrack; } $order->update_meta_data("\144\154\x72\145\163", $rstatus); $order->update_meta_data("\x64\x6c\x69\x6e\x66\157", $rdesc); $order->update_meta_data("\x64\x6c\151\144", $rdl); $order->update_meta_data("\x64\154\164\162\141\143\x6b\x69\x6e\x67", $rtrack); $order->save(); } public function generate_xml($order_data) { $uploads = wp_upload_dir(); $extract_path = $uploads["\x62\x61\x73\145\144\151\162"] . "\x2f\144\154"; if (!file_exists($extract_path)) { mkdir($extract_path, 493, true); } $xml_path = $extract_path . "\x2f\x78\x6d\x6c\x2f"; if (!file_exists($xml_path)) { mkdir($xml_path, 484, true); } $date = date("\x59\x2d\155\x2d\x64\40\110\x3a\x69\x3a\x73", strtotime($order_data["\144\141\164\145\137\143\162\145\x61\164\145\x64"])); $delivery_date = date("\x59\55\155\x2d\x64\40\110\72\x69\72\x73", strtotime($date . "\40\53\x31\x20\x64\141\x79")); $date_created = date("\x59\x2d\x6d\x2d\144\x20\110\x3a\151\72\163", strtotime($order_data["\144\x61\x74\145\137\143\x72\145\x61\164\x65\144"])); $xml_file_name = $xml_path . "\57\170\x6d\154\x5f" . $order_data["\157\162\x64\145\162\137\x6e\165\x6d\x62\x65\x72"] . "\x2e\170\155\x6c"; $xml = new SimpleXMLExtended("\x3c\107\145\x73\151\x6f\117\162\x64\145\162\57\76"); $xml->FileHeader = NULL; $xml->FileHeader->SchemaVersion = "\x31\x2e\60"; $xml->FileHeader->Plataforma = "\61"; $xml->FileHeader->Batch = NULL; $xml->FileHeader->Batch->OrdersCount = "\x31"; $xml->FileHeader->Batch->OrderCurrencyCode = ''; $xml->Parties = NULL; $xml->Parties->BuyerParty = NULL; $xml->Parties->BuyerParty->TaxIdentification = NULL; $xml->Parties->BuyerParty->TaxIdentification->TaxIdentificationNumber = $order_data["\x62\151\x6c\x6c\x69\156\147\x5f\166\x61\x74\137\x6e\165\x6d\x62\145\162"]; $xml->Parties->BuyerParty->Individual = NULL; $xml->Parties->BuyerParty->Individual->Name = NULL; $xml->Parties->BuyerParty->Individual->Name->addCData($order_data["\142\151\x6c\x6c\151\156\147\x5f\x66\x69\x72\163\164\137\x6e\x61\x6d\x65"]); $xml->Parties->BuyerParty->Individual->FirstSurname = NULL; $xml->Parties->BuyerParty->Individual->FirstSurname->addCData($order_data["\x62\151\x6c\154\x69\156\147\137\154\141\163\164\x5f\x6e\x61\x6d\x65"]); $xml->Parties->BuyerParty->Individual->PhoneNumber = NULL; $xml->Parties->BuyerParty->Individual->PhoneNumber->addCData($order_data["\142\x69\154\154\151\156\147\137\160\x68\157\156\x65"]); $xml->Parties->BuyerParty->Individual->EmailAddress = NULL; $xml->Parties->BuyerParty->Individual->EmailAddress->addCData($order_data["\x62\x69\x6c\x6c\151\156\x67\137\145\155\141\151\154"]); $xml->Parties->BuyerParty->Individual->GlobalAddress = NULL; $xml->Parties->BuyerParty->Individual->GlobalAddress->Address = NULL; $xml->Parties->BuyerParty->Individual->GlobalAddress->PostCode = NULL; $xml->Parties->BuyerParty->Individual->GlobalAddress->Town = NULL; $xml->Parties->BuyerParty->Individual->GlobalAddress->Province = NULL; $xml->Parties->BuyerParty->Individual->GlobalAddress->CountryCode = NULL; $xml->Parties->BuyerParty->Individual->GlobalAddress->Address->addCData($order_data["\142\151\x6c\x6c\x69\156\x67\137\x61\144\x64\162\145\163\x73"]); $xml->Parties->BuyerParty->Individual->GlobalAddress->PostCode = $order_data["\142\151\154\x6c\x69\156\147\x5f\x70\x6f\163\164\143\157\x64\145"]; $xml->Parties->BuyerParty->Individual->GlobalAddress->Town->addCData($order_data["\142\x69\154\x6c\x69\156\x67\137\x63\x69\x74\x79"]); if ($order_data["\x62\x69\x6c\154\x69\156\147\x5f\x73\x74\141\164\145"] == NULL) { $xml->Parties->BuyerParty->Individual->GlobalAddress->Province->addCData("\x4e\117"); } else { $xml->Parties->BuyerParty->Individual->GlobalAddress->Province->addCData($order_data["\x62\x69\154\154\x69\156\x67\x5f\163\x74\x61\164\x65"]); } $xml->Parties->BuyerParty->Individual->GlobalAddress->CountryCode = $this->convert_iso_2_to_3($order_data["\x62\151\154\x6c\x69\156\x67\x5f\143\x6f\165\156\164\x72\x79"]); $xml->Order = NULL; $xml->Order->OrderTypeCode = NULL; $xml->Order->OrderHeader = NULL; $xml->Order->OrderHeader->UserIdentifier = $order_data["\x63\165\x73\x74\x6f\155\x65\162\137\x69\144"]; $xml->Order->OrderHeader->OrderIdentifier = NULL; $xml->Order->OrderHeader->OrderNumber = NULL; $xml->Order->OrderHeader->OrderDescription = NULL; $xml->Order->OrderHeader->comment = NULL; $xml->Order->OrderHeader->OrderIdentifier->addCData($order_data["\x6f\162\x64\145\x72\137\x6e\165\155\x62\145\x72"]); $xml->Order->OrderHeader->OrderNumber->addCData($order_data["\157\x72\x64\145\x72\x5f\x6e\165\x6d\x62\x65\x72"]); $xml->Order->OrderHeader->OrderDescription->addCData(''); $xml->Order->OrderHeader->comment->addCData(''); $xml->Order->OrderHeader->DesiredDeliveryDate = $delivery_date; $xml->Order->OrderHeader->StartDate = $date_created; $xml->Order->OrderHeader->EndDate = NULL; $xml->Order->OrderHeader->PaymentDetails = NULL; $xml->Order->OrderHeader->PaymentDetails->PaymentMethod = NULL; $xml->Order->OrderHeader->PaymentDetails->PaymentMethod->PaymentMethodCode = NULL; $xml->Order->OrderHeader->PaymentDetails->PaymentMethod->PaymentMethodName = NULL; $xml->Order->OrderHeader->PaymentDetails->PaymentDocument = NULL; $xml->Order->OrderHeader->PaymentDetails->PaymentDocument->PaymentDocumentName = NULL; $xml->Order->OrderHeader->PaymentDetails->PaymentDocument->PaymentDocumentName->addCData($order_data["\x70\x61\171\x6d\x65\156\164\x5f\155\145\x74\150\x6f\x64\x5f\x74\x69\164\154\x65"]); $xml->Order->OrderHeader->ShippingAddress = NULL; $xml->Order->OrderHeader->ShippingAddress->GlobalAddress = NULL; $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->Address = NULL; $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->PostCode = NULL; $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->Town = NULL; $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->Province = NULL; $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->CountryCode = NULL; $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->Address->addCData($order_data["\163\150\x69\x70\160\151\x6e\x67\x5f\x61\144\x64\x72\x65\163\x73"]); $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->PostCode = $order_data["\163\150\x69\160\160\151\x6e\x67\137\x70\157\163\164\x63\157\144\x65"]; $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->Town->addCData($order_data["\x73\150\x69\160\x70\151\156\147\x5f\x63\x69\x74\171"]); if ($order_data["\x73\150\151\x70\160\x69\156\147\137\163\164\141\x74\145"] == NULL) { $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->Province->addCData("\x4e\117"); } else { $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->Province->addCData($order_data["\x73\x68\151\x70\x70\151\x6e\147\x5f\x73\164\x61\x74\x65"]); } $xml->Order->OrderHeader->ShippingAddress->GlobalAddress->CountryCode = $this->convert_iso_2_to_3($order_data["\x73\x68\x69\160\160\x69\156\147\137\x63\157\x75\156\x74\162\171"]); $xml->Order->OrderHeader->ShippingDetails = NULL; $xml->Order->OrderHeader->ShippingDetails->ShippingModeCode = $order_data["\163\x68\151\x70\x70\151\156\x67\x5f\155\x65\x74\150\x6f\144"]; $xml->Order->OrderHeader->BuyerContactData = NULL; $xml->Order->OrderHeader->BuyerContactData->OrderContact = NULL; $xml->Order->OrderHeader->BuyerContactData->OrderContact->ContactData = NULL; $xml->Order->OrderHeader->BuyerContactData->OrderContact->ContactData->FullName = NULL; $xml->Order->OrderHeader->BuyerContactData->OrderContact->ContactData->PhoneNumber = NULL; $xml->Order->OrderHeader->BuyerContactData->OrderContact->ContactData->EmailAddress = NULL; $xml->Order->OrderHeader->BuyerContactData->OrderContact->ContactData->FullName->addCData($order_data["\x62\165\x79\145\162\137\146\x75\154\x6c\x5f\156\x61\155\x65"]); $xml->Order->OrderHeader->BuyerContactData->OrderContact->ContactData->PhoneNumber = $order_data["\142\x69\x6c\x6c\x69\156\147\137\x70\150\x6f\156\145"]; $xml->Order->OrderHeader->BuyerContactData->OrderContact->ContactData->EmailAddress->addCData($order_data["\x62\x69\x6c\x6c\151\156\x67\137\145\155\141\151\154"]); $xml->Order->OrderHeader->GeneralDiscounts = NULL; $xml->Order->OrderHeader->dropshipping = NULL; $xml->Order->OrderHeader->dropshipping->es_dropshipping = 1; $xml->Order->OrderHeader->dropshipping->importcontra_dropshipping = $order_data["\x69\163\x63\162"]; $xml->Order->OrderIssueData = NULL; $xml->Order->OrderIssueData->IssueDate = date("\x59\x2d\155\x2d\x64"); $xml->Order->TaxesOutputs = NULL; $xml->Order->TaxesOutputs->Tax = NULL; $xml->Order->TaxesOutputs->Tax->TaxType = NULL; $xml->Order->TaxesOutputs->Tax->TaxType->addCData($order_data["\157\x72\144\x65\162\x5f\164\141\170\137\x72\141\164\x65"]); $xml->Order->TaxesOutputs->Tax->TaxRate = $order_data["\157\162\144\145\162\137\164\x61\x78\137\x72\141\x74\145"]; $xml->Order->TaxesOutputs->Tax->TaxableBase = NULL; $xml->Order->TaxesOutputs->Tax->TaxableBase->TotalAmount = $order_data["\157\x72\144\145\x72\137\146\x74\x6f\164\141\x6c"]; $xml->Order->TaxesOutputs->Tax->TaxAmount = NULL; $xml->Order->TaxesOutputs->Tax->TaxAmount->TotalAmount = floatval($order_data["\x6f\162\x64\x65\162\x5f\164\x61\x78\145\x73\137\x74\x6f\164\x61\x6c"]); $total_wo_tax = floatval($order_data["\157\x72\144\145\x72\x5f\x66\164\157\x74\141\x6c"]) - floatval($order_data["\157\162\x64\145\162\x5f\x74\141\170\x65\163\137\x74\157\164\x61\154"]); $xml->Order->OrderTotals = NULL; $xml->Order->OrderTotals->TotalGrossAmountBeforeTaxes = $total_wo_tax; $xml->Order->OrderTotals->TotalTaxOutputs = floatval($order_data["\x6f\x72\x64\145\x72\137\164\x61\x78\x65\163\x5f\x74\157\x74\141\x6c"]); $xml->Order->OrderTotals->OrderTotal = $order_data["\157\x72\x64\145\162\137\x66\164\x6f\x74\x61\154"]; $xml->Order->addChild("\x49\x74\x65\155\x73"); foreach ($order_data["\157\162\x64\145\x72\137\x69\164\x65\x6d\163"] as $item) { $product_id = $item["\x70\x72\157\x64\165\143\x74\x5f\151\144"]; $prod_quantity = $item["\161\x75\141\156\164\151\164\x79"]; $product_variation_id = $item["\x76\141\162\151\141\x74\x69\x6f\x6e\x5f\x69\144"]; if ($product_variation_id) { $product = wc_get_product($item["\166\x61\162\x69\141\164\151\x6f\156\x5f\151\144"]); } else { $product = wc_get_product($item["\160\162\157\x64\x75\143\164\x5f\x69\144"]); } $prod_sku = $product->get_sku(); $prod_desc = $product->get_short_description(); $prod_price = $product->get_price(); $prod_price_tax = wc_get_price_including_tax($product); $prod_tax_name = $product->get_tax_class(); $tax_rate = $item["\154\x69\x6e\x65\137\x74\x61\x78"]; $prod_tax_name = $item["\x74\x61\170\x5f\143\x6c\141\x73\163"]; $tax_amount = $prod_price_tax - $prod_price; $xitems = $xml->Order->Items->addChild("\x4f\162\x64\x65\162\114\x69\156\145"); $xitems->addChild("\117\x72\x64\x65\162\x4c\x69\x6e\x65\103\154\141\x73\163", "\120\122\x4f"); $xitems->addChild("\120\162\157\x64\165\143\164\x52\145\146\145\162\x65\x6e\143\145"); $xitems->ProductReference->addCData($prod_sku); $xitems->addChild("\x50\x72\157\x64\x75\x63\164\x44\x65\163\x63\x72\x69\160\x74\151\157\x6e"); $xitems->ProductDescription->addCData($prod_desc); $xitems->addChild("\111\164\145\x6d\x44\x65\163\143\162\151\160\164\x69\x6f\x6e"); $xitems->ItemDescription->addCData($prod_desc); $xitems->addChild("\121\x75\x61\x6e\x74\x69\164\x79", $prod_quantity); $xitems->addChild("\125\x6e\x69\164\x50\x72\151\x63\x65\x57\x69\164\x68\x6f\165\164\124\x61\x78", $prod_price); $xitems->addChild("\x54\x6f\164\x61\154\x43\x6f\163\x74", $prod_price_tax); $xitems->addChild("\124\x61\170\145\163\x4f\165\x74\x70\x75\x74\163"); $xitems->TaxesOutputs->addChild("\124\141\x78"); $xitems->TaxesOutputs->Tax->addChild("\x54\141\170\x54\171\x70\145"); $xitems->TaxesOutputs->Tax->TaxType->addCData($prod_tax_name); $xitems->TaxesOutputs->Tax->addChild("\x54\x61\x78\122\x61\164\145", $tax_rate); $xitems->TaxesOutputs->Tax->addChild("\124\x61\170\x61\142\x6c\145\x42\141\163\x65"); $xitems->TaxesOutputs->Tax->TaxableBase->addChild("\x54\157\164\x61\x6c\101\155\157\165\x6e\164", $prod_price_tax); $xitems->TaxesOutputs->Tax->addChild("\x54\x61\x78\101\155\x6f\165\156\x74"); $xitems->TaxesOutputs->Tax->TaxAmount->addChild("\x54\x6f\x74\x61\154\x41\155\157\165\x6e\x74", $tax_amount); } $xml->formatXML(); $xml->saveXML($xml_file_name); return $xml_file_name; } } goto EobB3; EobB3: $DL_Orders = new DL_Orders(); goto dFK1y; dFK1y:
?>
Function Calls
None |
Stats
MD5 | 6931307bdbb66f826df545c6650a3cd2 |
Eval Count | 0 |
Decode Time | 94 ms |