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: Wanderlust - MP QR Dinamico * Plugin URI: httpss://wanderlus..

Decoded Output download

<?php 
/** 
 * Plugin Name: Wanderlust - MP QR Dinamico 
 * Plugin URI: httpss://wanderlust-webdesign.com/ 
 * Description: Wanderlust - Cobrar con QR de Mercado Pago Dinamico 
 * Author: Wanderlust Web Design 
 * Author URI: https://wanderlust-webdesign.com/ 
 * Version: 0.0.2 
 * WC tested up to: 6.4.5 
 * Text Domain: wanderlust-mp-qr 
 * Domain Path: /i18n/languages/ 
 * 
 * Copyright: (c) 2010-2022 Wanderlust Web Design 
 * 
 * 
 * @package   Wanderlust-QR 
 * @author    Wanderlust Web Design 
 * @category  Admin 
 * @copyright Copyright (c) 2010-2022, Wanderlust Web Design 
 * 
 */ 
   
  
 
add_filter("woocommerce_payment_gateways", "wanderlustqr_add_gateway_class"); add_action("wp_ajax_wanderlust_revisar_pagoqr", "wanderlust_revisar_pagoqr", 1); add_action("wp_ajax_nopriv_wanderlust_revisar_pagoqr", "wanderlust_revisar_pagoqr", 1); add_action("plugins_loaded", "wanderlustqr_init_gateway_class"); function wanderlustqr_add_gateway_class($gateways) { $gateways[] = "WC_WanderlustQr_Gateway"; return $gateways; } function wanderlust_revisar_pagoqr() { if ($_POST["dataid"]) { $order_id = $_POST["dataid"]; $qr_data = get_post_meta($order_id, "qr_status", true); if ($qr_data == "approved") { $order = wc_get_order($order_id); $urlok = $order->get_checkout_order_received_url(); $final_url = str_replace("order-pay", "order-received", $urlok); echo "<h3 class="pagorecibido" style="text-align: left;"><img style="max-width:45px;float:left;margin-right: 15px;"  src="" . esc_url(plugins_url("img/5aa78e207603fc558cffbf19.png", __FILE__)) . " " >  Felicitaciones hemos recibido su pago! </h3></br><a class="button" href="" . $final_url . "">Continuar al pedido </a>"; die; } } die; } function wanderlustqr_init_gateway_class() { class WC_WanderlustQr_Gateway extends WC_Payment_Gateway { public function __construct() { define("WANDERLUST_MPQR_DIR_PATH", plugin_dir_path(__FILE__)); define("WANDERLUST_MPQR_DIR_URL", plugin_dir_url(__FILE__)); $this->id = "wanderlustqr_gateway"; $this->icon = apply_filters("woocommerce_wanderlustqr_icon", plugins_url("wanderlust-mp-qr/img/logos-tarjetas.png", plugin_dir_path(__FILE__))); $this->has_fields = false; $this->method_title = "Mercado Pago QR"; $this->method_description = "El Sistema Mercado Pago QR permite cobrar con cualquier APP que permita pagos con QR."; $this->supports = array("products"); $this->init_form_fields(); $this->init_settings(); $this->title = $this->get_option("title"); $this->description = $this->get_option("description"); $this->enabled = $this->get_option("enabled"); $this->api_key = $this->get_option("api_key"); $this->client_id = $this->get_option("client_id"); $this->client_secret_id = $this->get_option("client_secret_id"); $this->user_id = $this->get_option("user_id"); $this->pos_id = $this->get_option("pos_id"); add_action("woocommerce_update_options_payment_gateways_" . $this->id, array($this, "process_admin_options")); add_action("woocommerce_api_wanderlustqr", array($this, "webhook")); add_action("woocommerce_thankyou_" . $this->id, array($this, "thankyou_page")); add_action("woocommerce_receipt_" . $this->id, array($this, "receipt_page")); } public function init_form_fields() { $this->form_fields = array("enabled" => array("title" => "Enable/Disable", "label" => "Enable Mercado Pago QR", "type" => "checkbox", "description" => '', "default" => "no"), "title" => array("title" => "Title", "type" => "text", "description" => "This controls the title which the user sees during checkout.", "default" => "Pagar con QR", "desc_tip" => true), "description" => array("title" => "Description", "type" => "textarea", "description" => "This controls the description which the user sees during checkout.", "default" => "Pay with your credit card via our super-cool payment gateway."), "api_key" => array("title" => "Wanderlust API KEY", "type" => "text"), "client_id" => array("title" => "MP Public Key", "type" => "text"), "client_secret_id" => array("title" => "MP Access Token", "type" => "text"), "user_id" => array("title" => "MP User ID", "type" => "text"), "pos_id" => array("title" => "MP POS External ID", "type" => "text")); } public function payment_fields() { if ($this->description) { echo wpautop(wp_kses_post($this->description)); } } public function generate_qr_form($order_id) { global $woocommerce; $notification_url = get_site_url(); $notification_url = $notification_url . "/?wc-api=wanderlustqr"; $order = wc_get_order($order_id); $order->reduce_order_stock(); WC()->cart->empty_cart(); $nombre = ''; $items = $order->get_items(); $itemsmp = array(); foreach ($items as $item) { if ($item["product_id"] > 0) { $product = wc_get_product($item["product_id"]); if (empty($nombre)) { $nombre = $product->get_name(); } else { $nombre = $nombre . " - " . $product->get_name(); } $itemsmp = array("title" => $product->get_name(), "description" => $product->get_name(), "unit_price" => intval($product->get_price()), "quantity" => 1, "unit_measure" => "unit", "total_amount" => intval($order->get_total())); } } $pload = ["external_reference" => "QR-" . $order_id, "title" => $nombre, "description" => $nombre, "notification_url" => $notification_url, "expiration_date" => "2025-08-22T16:34:56.559-04:00", "total_amount" => intval($order->get_total()), "items" => array($itemsmp)]; $body = wp_json_encode($pload); $options = ["body" => $body, "headers" => ["Authorization" => "Bearer " . $this->client_secret_id, "Content-Type" => "application/json"], "timeout" => 30, "redirection" => 5, "blocking" => true, "httpversion" => "1.0", "sslverify" => false, "data_format" => "body"]; $qr_response = wp_remote_post("https://api.mercadopago.com/instore/orders/qr/seller/collectors/" . $this->user_id . "/pos/" . $this->pos_id . "/qrs", $options); if (!is_wp_error($qr_response)) { $response = json_decode($qr_response["body"]); if ($response->qr_data) { echo "<div id="qr">"; echo "<img style="margin: 0px auto;" id="qrmpwanderlust" data-id="" . $order_id . "" src="https://chart.googleapis.com/chart?chs=500x500&cht=qr&chl=" . $response->qr_data . "&choe=UTF-8" title="Wanderlust Codes QR" />"; echo "</div> <div id="waitingqr" style="display:none;">"; echo "</br><small>Esperando notificaci\xc3\xb3n de pago por parte de Mercado Pago..</small>"; echo "</div>"; echo "<div class="pago-recibido"> </div>"; echo "      <script type="text/javascript">		
\xa        
\xa        jQuery('#waitingqr').delay( 10000 ).fadeIn(2000);\xd
        \xd
        setInterval(function(){\xd
          \xd\xa          if (jQuery(".pagorecibido")[0]){\xd
\xd

\xa          } else {\xd\xa
              var ajaxurl = ""; echo admin_url("admin-ajax.php"); echo "";\xd\xa              var dataid = jQuery('#qrmpwanderlust').data("id");\xd\xa              jQuery.ajax({
                type: 'POST',
\xa                cache: false,\xd\xa                url: ajaxurl,
\xa                data: {\xd
                  action: 'wanderlust_revisar_pagoqr',
\xa                  dataid: dataid
\xa                },\xd\xa                success: function(data, textStatus, XMLHttpRequest){ 
\xd\xa                 if (data.indexOf("received") >= 0){
\xa                    jQuery('#qr').fadeOut();\xd
                    jQuery('#waitingqr').fadeOut();\xd
                    jQuery(".pago-recibido").html('');
\xa                    jQuery(".pago-recibido").append(data);\xd
                 }  \xd
 \xd
                },
                error: function(MLHttpRequest, textStatus, errorThrown){\xd

                }
\xa              });
\xa            \xd\xa          }\xd\xa
          
\xa          }, 10000 );            \xd
         

\xd\xa
        </script>\xd\xa"; } else { echo "<h4>QR ERROR</h4>"; } } } public function receipt_page($order) { echo "<p>" . __("Gracias por tu pedido, por favor escanear el QR con tu aplicaci\xc3\263n de pagos preferida.", $this->id) . "</p>"; echo $this->generate_qr_form($order); } public function process_payment($order_id) { $order = new WC_Order($order_id); return array("result" => "success", "redirect" => $order->get_checkout_payment_url(true)); } public function thankyou_page($order_id) { } public function webhook() { header("Content-type: application/json", "HTTP/1.1 200 OK"); $postBodyRaw = file_get_contents("php://input"); if ($postBodyRaw) { $qr_reponse = json_decode($postBodyRaw); if ($qr_reponse->action && $qr_reponse->live_mode) { if ($qr_reponse->data->id) { $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => "https://api.mercadopago.com/v1/payments/" . $qr_reponse->data->id, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array("Authorization: Bearer APP_USR-5238137064662936-042010-7d1260506f207338dea50e9a2b61f9df__LA_LC__-179350675"))); $response = curl_exec($curl); curl_close($curl); $paymentdata = json_decode($response); $order_id = trim($paymentdata->external_reference, "QR-"); update_post_meta($order_id, "qr_respose", $response); if ($paymentdata->status == "approved") { update_post_meta($order_id, "qr_status", $paymentdata->status); $order = wc_get_order($order_id); $order->add_order_note("Mercado Pago QR: " . __("Payment approved.", "wanderlust-qr")); $order = wc_get_order($order_id); $order->payment_complete(); } } } } } } } ?>

Did this file decode correctly?

Original Code

<?php
/**
 * Plugin Name: Wanderlust - MP QR Dinamico
 * Plugin URI: httpss://wanderlust-webdesign.com/
 * Description: Wanderlust - Cobrar con QR de Mercado Pago Dinamico
 * Author: Wanderlust Web Design
 * Author URI: https://wanderlust-webdesign.com/
 * Version: 0.0.2
 * WC tested up to: 6.4.5
 * Text Domain: wanderlust-mp-qr
 * Domain Path: /i18n/languages/
 *
 * Copyright: (c) 2010-2022 Wanderlust Web Design
 *
 *
 * @package   Wanderlust-QR
 * @author    Wanderlust Web Design
 * @category  Admin
 * @copyright Copyright (c) 2010-2022, Wanderlust Web Design
 *
 */
  
 

add_filter("\167\157\157\x63\x6f\x6d\x6d\145\162\x63\145\x5f\160\x61\171\x6d\x65\x6e\164\137\147\141\164\x65\167\x61\x79\163", "\167\x61\x6e\144\145\162\154\165\x73\x74\161\162\x5f\x61\144\x64\137\147\141\164\145\x77\x61\171\x5f\x63\x6c\141\163\x73"); add_action("\167\x70\x5f\x61\152\141\170\137\167\x61\x6e\144\145\x72\154\x75\163\x74\137\162\x65\166\x69\163\141\x72\137\160\141\147\x6f\x71\x72", "\167\x61\x6e\x64\145\x72\x6c\x75\163\x74\137\x72\x65\166\151\163\141\x72\x5f\x70\x61\x67\157\161\x72", 1); add_action("\x77\x70\x5f\141\x6a\141\x78\x5f\x6e\x6f\160\x72\151\x76\137\x77\141\x6e\x64\145\x72\x6c\165\x73\x74\137\162\145\x76\151\163\x61\x72\137\160\141\x67\x6f\161\162", "\167\x61\x6e\144\145\162\154\x75\163\164\x5f\x72\145\166\151\163\x61\162\137\x70\141\x67\157\x71\x72", 1); add_action("\160\x6c\165\x67\x69\x6e\163\x5f\x6c\x6f\141\144\145\144", "\x77\141\x6e\144\145\162\154\x75\x73\164\x71\162\137\151\x6e\151\x74\137\147\141\x74\145\x77\141\171\x5f\x63\x6c\141\x73\163"); function wanderlustqr_add_gateway_class($gateways) { $gateways[] = "\127\103\x5f\x57\x61\x6e\x64\x65\x72\x6c\x75\163\x74\x51\162\137\107\141\x74\x65\x77\141\171"; return $gateways; } function wanderlust_revisar_pagoqr() { if ($_POST["\144\x61\164\x61\151\144"]) { $order_id = $_POST["\x64\141\164\x61\x69\x64"]; $qr_data = get_post_meta($order_id, "\161\x72\137\163\x74\141\x74\x75\x73", true); if ($qr_data == "\x61\160\160\x72\157\x76\x65\144") { $order = wc_get_order($order_id); $urlok = $order->get_checkout_order_received_url(); $final_url = str_replace("\157\162\x64\145\x72\55\x70\x61\171", "\x6f\x72\x64\145\162\x2d\162\145\143\x65\151\x76\145\144", $urlok); echo "\x3c\150\x33\40\143\x6c\x61\x73\163\x3d\42\x70\x61\x67\157\x72\x65\x63\151\142\151\x64\x6f\42\40\163\164\171\x6c\x65\x3d\42\x74\145\x78\164\x2d\x61\x6c\x69\x67\x6e\72\x20\154\x65\146\164\x3b\x22\76\x3c\x69\155\x67\x20\x73\164\x79\154\145\x3d\x22\x6d\x61\x78\x2d\167\x69\144\164\x68\72\x34\65\x70\x78\x3b\x66\154\157\141\164\x3a\x6c\145\146\x74\x3b\155\x61\162\x67\x69\x6e\x2d\162\x69\147\x68\x74\72\40\61\65\160\x78\73\42\40\x20\x73\162\143\x3d\42" . esc_url(plugins_url("\151\155\147\57\65\141\141\67\70\145\62\x30\67\66\60\63\146\143\65\65\70\x63\146\146\142\x66\x31\71\x2e\160\x6e\x67", __FILE__)) . "\40\42\40\x3e\x20\40\x46\145\x6c\x69\x63\x69\x74\x61\x63\x69\x6f\156\x65\x73\40\150\145\155\x6f\x73\x20\162\x65\143\x69\142\151\x64\157\x20\x73\165\x20\160\x61\x67\157\41\40\74\57\150\63\76\x3c\x2f\142\162\76\74\x61\x20\143\154\141\163\x73\75\42\x62\x75\x74\x74\157\156\x22\40\150\x72\145\146\x3d\42" . $final_url . "\x22\76\x43\157\156\164\151\x6e\165\x61\x72\40\x61\154\x20\160\145\x64\151\x64\157\40\x3c\x2f\141\76"; die; } } die; } function wanderlustqr_init_gateway_class() { class WC_WanderlustQr_Gateway extends WC_Payment_Gateway { public function __construct() { define("\x57\x41\x4e\x44\x45\122\x4c\x55\x53\124\137\x4d\x50\121\x52\137\104\111\x52\x5f\x50\101\124\x48", plugin_dir_path(__FILE__)); define("\127\x41\116\104\105\122\x4c\x55\123\x54\137\115\120\x51\x52\137\x44\x49\122\137\x55\122\114", plugin_dir_url(__FILE__)); $this->id = "\167\x61\156\x64\x65\162\x6c\165\163\x74\161\162\137\147\141\x74\145\x77\x61\171"; $this->icon = apply_filters("\167\157\157\143\x6f\x6d\x6d\145\x72\x63\145\x5f\x77\x61\156\144\x65\162\154\165\x73\164\161\x72\137\151\143\157\156", plugins_url("\167\x61\156\144\145\162\x6c\165\x73\x74\55\x6d\160\x2d\x71\162\57\x69\155\147\57\x6c\157\x67\x6f\x73\x2d\164\141\x72\x6a\x65\164\x61\x73\56\160\x6e\147", plugin_dir_path(__FILE__))); $this->has_fields = false; $this->method_title = "\x4d\x65\162\x63\141\144\x6f\x20\x50\141\147\157\x20\121\122"; $this->method_description = "\x45\154\40\x53\151\x73\x74\x65\155\141\40\115\145\x72\143\x61\x64\x6f\x20\x50\x61\147\157\x20\x51\x52\x20\x70\145\x72\155\151\x74\x65\40\x63\157\142\x72\x61\162\40\x63\x6f\156\x20\143\165\141\x6c\161\165\151\145\162\x20\101\120\x50\40\x71\165\145\x20\x70\145\162\x6d\x69\x74\x61\x20\160\x61\x67\157\163\x20\143\x6f\x6e\40\x51\x52\x2e"; $this->supports = array("\x70\x72\157\x64\165\x63\164\163"); $this->init_form_fields(); $this->init_settings(); $this->title = $this->get_option("\x74\151\x74\154\x65"); $this->description = $this->get_option("\x64\145\163\x63\x72\x69\160\x74\x69\x6f\x6e"); $this->enabled = $this->get_option("\145\156\x61\142\154\145\144"); $this->api_key = $this->get_option("\x61\160\151\x5f\x6b\x65\171"); $this->client_id = $this->get_option("\x63\x6c\x69\145\x6e\164\x5f\x69\x64"); $this->client_secret_id = $this->get_option("\143\154\151\145\156\x74\x5f\x73\x65\143\x72\145\x74\x5f\x69\144"); $this->user_id = $this->get_option("\165\x73\x65\162\137\151\x64"); $this->pos_id = $this->get_option("\x70\x6f\x73\137\151\x64"); add_action("\x77\x6f\x6f\143\157\155\x6d\145\x72\143\145\137\x75\x70\144\141\x74\145\x5f\x6f\x70\164\x69\x6f\x6e\163\x5f\x70\x61\x79\155\145\x6e\x74\137\x67\141\x74\145\x77\x61\171\x73\x5f" . $this->id, array($this, "\160\x72\x6f\x63\x65\163\x73\x5f\x61\144\155\x69\x6e\x5f\x6f\x70\x74\151\157\x6e\x73")); add_action("\167\157\157\143\157\155\x6d\x65\x72\143\145\x5f\141\160\151\x5f\x77\x61\x6e\144\x65\162\154\x75\163\164\161\x72", array($this, "\167\145\x62\150\157\x6f\x6b")); add_action("\167\x6f\x6f\x63\157\155\x6d\145\162\x63\x65\137\164\x68\x61\156\x6b\x79\157\x75\x5f" . $this->id, array($this, "\164\150\x61\156\153\x79\x6f\x75\x5f\160\141\147\x65")); add_action("\x77\x6f\157\x63\x6f\155\x6d\x65\162\x63\x65\x5f\162\145\x63\x65\x69\x70\x74\x5f" . $this->id, array($this, "\x72\145\x63\145\x69\160\x74\x5f\x70\x61\147\145")); } public function init_form_fields() { $this->form_fields = array("\145\156\141\142\154\x65\144" => array("\164\x69\164\154\145" => "\105\x6e\x61\142\154\x65\x2f\x44\151\163\141\142\x6c\x65", "\x6c\141\x62\x65\154" => "\x45\156\141\x62\x6c\x65\40\x4d\x65\x72\143\x61\x64\x6f\40\x50\x61\x67\x6f\x20\121\122", "\x74\171\x70\x65" => "\143\x68\145\143\x6b\142\157\x78", "\144\145\163\143\x72\x69\x70\164\x69\157\156" => '', "\x64\x65\146\x61\x75\154\x74" => "\156\157"), "\x74\x69\x74\154\145" => array("\164\151\x74\154\x65" => "\x54\151\164\x6c\x65", "\164\171\x70\145" => "\x74\145\170\x74", "\x64\x65\x73\143\162\151\x70\164\x69\x6f\x6e" => "\124\x68\151\x73\40\x63\x6f\x6e\164\x72\x6f\x6c\x73\x20\x74\150\145\40\x74\x69\164\x6c\x65\40\x77\150\x69\143\x68\40\164\150\x65\40\x75\x73\145\x72\40\163\x65\x65\x73\40\x64\165\x72\151\x6e\147\40\143\x68\145\143\153\157\x75\164\x2e", "\144\145\146\x61\x75\x6c\x74" => "\x50\141\x67\141\x72\40\143\157\156\40\x51\x52", "\x64\x65\163\x63\137\x74\151\160" => true), "\x64\145\x73\x63\x72\x69\160\164\151\x6f\x6e" => array("\x74\x69\x74\x6c\145" => "\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6f\156", "\x74\x79\x70\145" => "\164\145\170\x74\x61\162\x65\141", "\x64\x65\163\x63\162\x69\160\x74\x69\157\x6e" => "\x54\150\x69\x73\40\143\157\x6e\x74\162\x6f\154\x73\x20\164\150\145\x20\144\x65\163\x63\x72\x69\x70\x74\151\157\x6e\40\x77\x68\x69\x63\150\40\x74\x68\145\40\165\163\x65\x72\x20\163\x65\x65\x73\x20\x64\x75\162\x69\156\x67\x20\x63\x68\x65\x63\x6b\x6f\165\164\x2e", "\144\x65\146\141\165\x6c\x74" => "\x50\x61\171\40\167\151\x74\150\x20\x79\157\x75\162\x20\143\x72\145\144\151\x74\x20\x63\141\162\x64\40\166\x69\x61\x20\157\165\x72\40\163\x75\160\x65\162\x2d\x63\x6f\x6f\x6c\40\160\141\x79\x6d\145\x6e\x74\40\147\141\x74\145\167\141\x79\x2e"), "\x61\x70\151\x5f\153\x65\x79" => array("\164\151\164\x6c\x65" => "\127\141\x6e\144\145\162\x6c\x75\163\164\40\101\120\111\40\113\105\131", "\x74\x79\160\145" => "\164\145\x78\x74"), "\x63\154\x69\145\156\164\137\x69\144" => array("\x74\151\x74\154\145" => "\115\120\40\x50\165\142\x6c\x69\143\40\113\145\x79", "\x74\171\x70\x65" => "\164\145\170\164"), "\x63\154\151\145\x6e\164\137\x73\x65\x63\x72\145\x74\x5f\x69\x64" => array("\164\151\164\x6c\145" => "\115\120\x20\101\x63\143\145\163\163\x20\124\x6f\153\x65\x6e", "\164\x79\160\x65" => "\x74\x65\x78\164"), "\165\x73\x65\x72\137\151\x64" => array("\x74\x69\164\154\145" => "\x4d\x50\40\x55\163\145\x72\x20\111\x44", "\164\171\x70\x65" => "\164\x65\x78\x74"), "\160\x6f\163\x5f\151\144" => array("\164\x69\164\x6c\145" => "\x4d\120\x20\120\x4f\123\x20\105\x78\x74\145\162\x6e\141\x6c\x20\111\104", "\164\x79\160\145" => "\x74\x65\170\x74")); } public function payment_fields() { if ($this->description) { echo wpautop(wp_kses_post($this->description)); } } public function generate_qr_form($order_id) { global $woocommerce; $notification_url = get_site_url(); $notification_url = $notification_url . "\57\77\x77\x63\55\x61\x70\x69\75\x77\x61\x6e\144\145\162\x6c\165\x73\164\x71\x72"; $order = wc_get_order($order_id); $order->reduce_order_stock(); WC()->cart->empty_cart(); $nombre = ''; $items = $order->get_items(); $itemsmp = array(); foreach ($items as $item) { if ($item["\x70\162\157\x64\165\143\x74\137\x69\x64"] > 0) { $product = wc_get_product($item["\160\x72\x6f\x64\x75\143\x74\137\x69\144"]); if (empty($nombre)) { $nombre = $product->get_name(); } else { $nombre = $nombre . "\40\55\x20" . $product->get_name(); } $itemsmp = array("\164\x69\x74\x6c\145" => $product->get_name(), "\x64\x65\163\143\x72\x69\160\x74\151\157\156" => $product->get_name(), "\165\156\151\164\137\160\162\x69\143\145" => intval($product->get_price()), "\161\x75\x61\156\x74\151\164\x79" => 1, "\x75\x6e\x69\164\137\x6d\x65\141\x73\x75\x72\x65" => "\165\156\151\x74", "\164\157\164\x61\x6c\x5f\141\x6d\157\x75\156\x74" => intval($order->get_total())); } } $pload = ["\145\170\x74\145\162\156\x61\154\137\162\x65\x66\145\162\x65\x6e\143\x65" => "\x51\122\x2d" . $order_id, "\x74\151\164\154\145" => $nombre, "\x64\145\163\143\x72\x69\x70\x74\151\x6f\x6e" => $nombre, "\x6e\x6f\x74\x69\146\151\x63\141\x74\x69\x6f\x6e\x5f\165\162\x6c" => $notification_url, "\145\170\x70\151\162\x61\164\151\x6f\x6e\137\144\141\164\x65" => "\62\x30\62\x35\x2d\x30\x38\x2d\x32\x32\124\61\x36\x3a\x33\64\72\x35\x36\x2e\x35\x35\x39\55\x30\x34\x3a\60\60", "\x74\157\164\141\154\137\x61\155\x6f\165\156\164" => intval($order->get_total()), "\151\x74\x65\x6d\x73" => array($itemsmp)]; $body = wp_json_encode($pload); $options = ["\142\157\x64\x79" => $body, "\150\x65\x61\x64\x65\x72\163" => ["\101\165\164\x68\x6f\x72\x69\172\141\x74\x69\157\x6e" => "\x42\x65\141\x72\x65\162\x20" . $this->client_secret_id, "\103\157\156\164\x65\156\164\55\x54\x79\160\x65" => "\x61\x70\160\x6c\x69\143\141\164\x69\157\156\57\152\163\157\x6e"], "\164\x69\155\x65\x6f\165\x74" => 30, "\162\x65\144\x69\x72\x65\143\x74\x69\x6f\x6e" => 5, "\142\x6c\x6f\x63\x6b\x69\x6e\x67" => true, "\150\x74\x74\x70\166\x65\x72\163\151\x6f\156" => "\61\56\60", "\163\x73\x6c\166\145\162\x69\x66\171" => false, "\144\141\x74\141\137\x66\157\162\x6d\x61\x74" => "\142\x6f\x64\171"]; $qr_response = wp_remote_post("\x68\164\164\x70\163\x3a\x2f\x2f\x61\x70\151\x2e\x6d\145\162\143\141\144\x6f\160\x61\147\157\56\143\x6f\155\x2f\x69\x6e\x73\x74\157\162\145\57\157\162\x64\145\162\163\57\161\162\x2f\163\145\154\x6c\145\162\x2f\x63\157\154\154\x65\x63\164\x6f\162\163\57" . $this->user_id . "\x2f\160\157\x73\57" . $this->pos_id . "\x2f\161\x72\163", $options); if (!is_wp_error($qr_response)) { $response = json_decode($qr_response["\x62\x6f\144\171"]); if ($response->qr_data) { echo "\74\144\151\166\40\151\x64\x3d\x22\161\162\x22\x3e"; echo "\x3c\x69\x6d\147\x20\x73\164\171\154\145\x3d\42\x6d\x61\x72\x67\151\156\72\x20\x30\x70\x78\x20\x61\x75\x74\x6f\73\42\x20\151\144\75\x22\x71\162\x6d\x70\167\141\156\x64\x65\x72\154\165\163\164\42\40\144\141\164\141\55\151\x64\75\x22" . $order_id . "\x22\x20\163\162\x63\75\42\150\x74\164\x70\x73\x3a\x2f\x2f\x63\150\x61\x72\x74\x2e\x67\157\x6f\x67\x6c\145\x61\x70\x69\163\56\143\157\x6d\x2f\x63\x68\141\162\x74\77\143\x68\163\x3d\x35\60\x30\170\x35\x30\60\x26\143\x68\164\75\x71\162\46\143\150\154\75" . $response->qr_data . "\x26\143\x68\x6f\x65\x3d\125\124\x46\x2d\x38\42\40\164\151\164\x6c\145\x3d\42\x57\x61\156\144\x65\x72\154\x75\x73\x74\x20\103\157\144\145\163\40\x51\x52\x22\x20\57\x3e"; echo "\x3c\x2f\144\151\166\76\x20\x3c\144\x69\x76\40\151\144\75\x22\167\141\151\164\x69\156\147\x71\162\42\x20\163\x74\x79\154\x65\x3d\x22\x64\151\163\160\154\x61\171\72\x6e\157\x6e\x65\x3b\x22\x3e"; echo "\74\57\142\x72\x3e\x3c\x73\155\x61\x6c\154\x3e\105\x73\160\145\x72\x61\156\x64\157\40\156\x6f\x74\x69\x66\151\143\x61\143\x69\xc3\xb3\x6e\40\144\145\x20\x70\x61\x67\x6f\40\160\157\162\40\x70\x61\x72\x74\x65\40\x64\x65\40\115\145\x72\x63\141\144\x6f\40\120\x61\x67\x6f\56\x2e\x3c\x2f\163\155\x61\154\154\x3e"; echo "\74\57\144\x69\166\x3e"; echo "\74\144\x69\166\40\x63\x6c\141\163\163\75\x22\x70\141\x67\157\55\162\x65\x63\x69\x62\151\144\157\x22\76\40\74\x2f\144\151\x76\x3e"; echo "\40\40\40\40\40\40\x3c\x73\143\x72\151\x70\x74\x20\164\x79\x70\145\75\x22\164\145\x78\164\57\x6a\x61\166\x61\x73\143\x72\151\160\x74\42\76\11\11\15\xa\40\x20\x20\40\x20\40\40\40\15\xa\40\x20\40\40\40\x20\x20\x20\x6a\x51\165\145\x72\x79\50\x27\x23\x77\141\x69\x74\x69\156\x67\x71\x72\x27\51\x2e\x64\145\154\x61\x79\50\40\x31\x30\60\60\60\x20\51\56\x66\141\144\x65\111\156\50\62\60\x30\60\x29\73\xd\12\x20\x20\x20\x20\40\x20\x20\40\xd\12\x20\x20\x20\x20\x20\40\x20\40\163\145\x74\111\x6e\x74\145\x72\x76\141\154\x28\x66\x75\x6e\x63\x74\x69\157\156\50\x29\173\xd\12\40\40\x20\x20\x20\40\40\40\40\x20\xd\xa\x20\40\x20\40\40\x20\40\x20\x20\x20\x69\x66\x20\50\152\x51\x75\x65\162\x79\50\x22\x2e\160\141\147\x6f\162\x65\143\x69\142\x69\144\x6f\x22\x29\x5b\x30\135\51\x7b\xd\12\xd\12\15\xa\x20\x20\x20\40\x20\x20\x20\x20\x20\40\x7d\40\145\x6c\163\x65\40\x7b\xd\xa\15\12\40\x20\40\40\x20\x20\x20\x20\40\40\x20\40\40\x20\x76\x61\x72\40\x61\x6a\141\170\165\162\154\40\75\x20\42"; echo admin_url("\141\x64\x6d\151\156\x2d\x61\x6a\141\x78\x2e\x70\x68\x70"); echo "\x22\73\xd\xa\x20\40\x20\x20\40\40\x20\40\40\x20\40\40\40\40\166\141\162\40\x64\x61\x74\x61\x69\x64\40\x3d\40\x6a\x51\x75\x65\162\171\50\x27\x23\161\162\x6d\160\x77\141\156\144\x65\162\x6c\165\163\x74\x27\51\56\144\x61\x74\141\50\42\x69\x64\42\51\x3b\xd\xa\x20\x20\40\x20\40\x20\x20\x20\x20\40\x20\40\x20\40\x6a\121\165\x65\162\x79\56\x61\152\141\x78\x28\173\15\12\40\40\x20\40\x20\x20\40\x20\40\40\x20\40\40\x20\x20\x20\164\171\160\145\72\40\x27\x50\x4f\x53\x54\47\54\15\xa\40\40\x20\40\40\40\x20\x20\x20\40\40\40\x20\x20\40\x20\x63\141\143\150\x65\x3a\40\x66\141\154\163\x65\x2c\xd\xa\x20\x20\x20\x20\x20\40\40\x20\40\x20\x20\40\x20\x20\x20\40\x75\162\154\x3a\40\141\152\141\170\x75\162\x6c\54\15\xa\40\40\x20\x20\x20\x20\40\x20\40\x20\40\40\40\40\x20\x20\x64\141\164\x61\72\x20\x7b\xd\12\40\x20\x20\x20\x20\40\x20\x20\40\x20\40\x20\x20\40\40\x20\40\40\141\143\x74\x69\157\156\x3a\40\47\x77\141\x6e\144\145\x72\x6c\165\x73\x74\137\x72\145\166\x69\163\x61\x72\137\x70\141\x67\x6f\x71\162\x27\54\15\xa\40\x20\40\x20\40\40\40\40\x20\x20\40\x20\40\40\40\x20\40\x20\144\x61\x74\x61\151\144\72\x20\x64\x61\x74\x61\151\x64\15\xa\x20\40\x20\40\x20\x20\x20\40\40\x20\x20\40\x20\40\40\40\x7d\54\xd\xa\x20\40\x20\40\40\x20\40\x20\40\x20\40\x20\x20\40\x20\x20\163\x75\x63\143\x65\163\x73\x3a\40\146\165\156\143\164\x69\x6f\x6e\x28\x64\141\x74\x61\54\x20\164\x65\x78\164\x53\x74\141\x74\165\163\x2c\40\130\x4d\114\110\x74\164\x70\x52\145\161\x75\145\163\164\x29\x7b\x20\15\12\xd\xa\40\x20\x20\x20\40\x20\x20\40\40\40\40\x20\x20\x20\x20\x20\40\151\x66\40\x28\144\141\164\141\56\x69\156\x64\x65\170\117\x66\x28\x22\x72\x65\143\x65\x69\x76\x65\x64\42\x29\40\76\x3d\40\x30\x29\173\15\xa\40\40\40\x20\40\x20\40\40\x20\x20\40\x20\40\x20\x20\x20\40\40\40\40\152\x51\x75\x65\x72\x79\x28\x27\43\x71\162\x27\x29\56\146\x61\144\145\x4f\165\x74\50\x29\x3b\xd\12\40\40\40\40\40\x20\x20\x20\x20\40\40\x20\x20\40\x20\40\40\x20\40\x20\152\121\165\x65\x72\171\x28\47\x23\x77\141\151\x74\x69\x6e\147\161\162\x27\x29\x2e\146\x61\x64\x65\x4f\165\x74\50\51\x3b\xd\12\40\x20\x20\40\x20\x20\x20\40\40\x20\40\40\40\40\x20\x20\x20\x20\x20\40\152\121\165\145\x72\x79\x28\42\56\160\x61\147\157\x2d\x72\145\143\x69\x62\151\144\x6f\42\51\56\x68\164\155\x6c\50\x27\47\51\73\15\xa\x20\40\40\40\40\x20\40\x20\40\40\x20\x20\40\x20\40\x20\x20\40\x20\40\x6a\x51\x75\145\x72\171\50\42\x2e\160\141\147\x6f\x2d\162\145\143\151\x62\151\144\157\42\51\56\141\x70\x70\x65\156\x64\x28\144\141\x74\141\51\73\xd\12\40\x20\x20\x20\x20\x20\40\40\40\x20\x20\40\x20\x20\40\x20\40\175\x20\x20\xd\12\x20\xd\12\x20\40\x20\x20\40\x20\40\x20\x20\x20\x20\40\40\x20\40\40\175\x2c\15\12\x20\x20\40\40\x20\x20\40\40\40\x20\40\x20\x20\x20\40\40\x65\x72\x72\x6f\162\72\40\146\x75\x6e\143\x74\151\157\156\x28\x4d\114\110\164\164\160\122\145\161\x75\x65\x73\164\54\40\x74\x65\x78\164\123\x74\141\x74\165\x73\54\x20\145\162\x72\157\x72\x54\150\162\x6f\167\x6e\51\x7b\xd\12\15\12\x20\x20\40\40\40\40\x20\x20\40\40\40\x20\x20\40\40\x20\175\15\xa\x20\x20\40\40\x20\40\x20\40\40\x20\40\40\x20\40\x7d\51\73\15\xa\x20\40\40\x20\40\x20\x20\40\40\x20\x20\x20\xd\xa\x20\40\40\x20\x20\40\x20\x20\40\40\x7d\xd\xa\15\12\40\x20\40\40\x20\40\x20\40\40\40\15\xa\x20\x20\x20\x20\40\x20\x20\x20\x20\x20\175\x2c\x20\61\60\x30\x30\60\40\x29\73\x20\40\40\40\40\40\40\40\40\40\x20\40\xd\12\x20\40\40\40\40\x20\40\x20\x20\15\12\15\12\xd\xa\15\12\x20\40\x20\x20\40\x20\40\x20\x3c\x2f\x73\x63\x72\151\x70\164\x3e\xd\xa"; } else { echo "\74\x68\64\76\x51\x52\x20\x45\x52\122\117\x52\74\57\150\64\x3e"; } } } public function receipt_page($order) { echo "\x3c\160\x3e" . __("\107\162\141\143\151\141\163\x20\160\157\x72\x20\x74\x75\x20\160\145\x64\x69\144\x6f\x2c\40\x70\157\162\x20\x66\x61\166\x6f\162\x20\145\x73\x63\x61\x6e\145\141\162\40\x65\154\40\121\122\40\x63\x6f\156\x20\x74\x75\40\x61\x70\154\151\x63\x61\143\151\xc3\263\156\40\144\x65\40\160\141\x67\157\163\40\160\x72\145\146\x65\x72\x69\x64\141\x2e", $this->id) . "\x3c\x2f\x70\x3e"; echo $this->generate_qr_form($order); } public function process_payment($order_id) { $order = new WC_Order($order_id); return array("\x72\145\x73\165\x6c\x74" => "\x73\x75\143\x63\145\x73\163", "\x72\x65\x64\x69\x72\x65\143\164" => $order->get_checkout_payment_url(true)); } public function thankyou_page($order_id) { } public function webhook() { header("\103\x6f\x6e\164\x65\156\164\55\x74\x79\x70\x65\72\x20\x61\x70\160\154\x69\x63\x61\x74\x69\x6f\156\57\152\x73\x6f\156", "\110\124\x54\x50\x2f\x31\56\61\x20\62\60\x30\x20\x4f\113"); $postBodyRaw = file_get_contents("\160\x68\x70\x3a\x2f\x2f\x69\x6e\x70\x75\164"); if ($postBodyRaw) { $qr_reponse = json_decode($postBodyRaw); if ($qr_reponse->action && $qr_reponse->live_mode) { if ($qr_reponse->data->id) { $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => "\150\x74\x74\160\163\72\x2f\57\141\x70\x69\56\155\x65\162\143\141\144\157\x70\141\x67\x6f\56\143\x6f\x6d\x2f\166\x31\x2f\160\141\x79\155\145\156\x74\x73\57" . $qr_reponse->data->id, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\107\x45\124", CURLOPT_HTTPHEADER => array("\x41\165\164\150\157\162\x69\172\141\164\x69\157\156\72\40\x42\145\141\162\x65\x72\x20\101\x50\120\137\125\x53\x52\55\x35\62\x33\70\x31\63\67\x30\x36\x34\x36\66\x32\71\x33\66\x2d\x30\x34\62\60\61\60\55\67\x64\x31\x32\x36\x30\x35\x30\x36\146\62\60\67\63\63\x38\144\145\x61\65\x30\145\71\141\62\x62\66\x31\x66\x39\x64\146\137\137\x4c\101\x5f\x4c\x43\x5f\x5f\x2d\x31\67\71\x33\65\x30\66\x37\65"))); $response = curl_exec($curl); curl_close($curl); $paymentdata = json_decode($response); $order_id = trim($paymentdata->external_reference, "\x51\122\55"); update_post_meta($order_id, "\x71\162\x5f\162\145\x73\x70\157\x73\x65", $response); if ($paymentdata->status == "\141\x70\160\162\157\166\x65\x64") { update_post_meta($order_id, "\x71\162\x5f\x73\164\x61\164\165\x73", $paymentdata->status); $order = wc_get_order($order_id); $order->add_order_note("\x4d\x65\x72\143\x61\x64\x6f\x20\x50\x61\x67\157\x20\x51\x52\x3a\x20" . __("\120\x61\171\x6d\145\x6e\164\40\x61\160\160\x72\x6f\x76\x65\x64\x2e", "\x77\x61\156\144\x65\162\x6c\x75\163\x74\x2d\161\162")); $order = wc_get_order($order_id); $order->payment_complete(); } } } } } } }

Function Calls

None

Variables

None

Stats

MD5 b0931cadd2dd381e9fefca147055813b
Eval Count 0
Decode Time 70 ms