WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] [closed] Payement gateways and update to woocommerce 2.0.4 (29 posts)

  1. lilireed
    Member
    Posted 1 year ago #

    Hi, I had some code that I added to the plugin to add DineroMail as a gateway. It worked fine before the last version of woocommerce came up, when I updated the fix no longer worked. What I would like to know is if anyone knows what changed in the last woocommerce version (2.0.4) that I should have to change in the code I have.

    I'll copy it below so you can see.
    First the gateway had to be added to woocommerce.php by adding
    include( 'classes/gateways/dineromail/class-wc-dineromail.php' );

    Second the DineroMail icon had to be added to the icons folder and finally in the classes folder add a file named class-wc-dineromail.php that contained:

    <?php
    /**
     * DineroMail Standard Payment Gateway
     *
     * Provides a Dineromail Standard Payment Gateway.
     *
     * @class 		WC_Dineromail
     * @extends		WC_Payment_Gateway
     */
    class WC_Dineromail extends WC_Payment_Gateway {
    
        /**
         * Constructor for the gateway.
         *
         * @access public
         * @return void
         */
    	public function __construct() {
    		global $woocommerce;
    
            $this->id			= 'dineromail';
            $this->icon 		= apply_filters('woocommerce_dineromail_icon', $woocommerce->plugin_url() . '/assets/images/icons/dineromail.png');
            $this->has_fields 	= false;
            $this->liveurl 		= 'https://checkout.dineromail.com/CheckOut';
    		$this->testurl 		= 'https://checkout.dineromail.com/CheckOut';
            $this->method_title = __( 'DineroMail', 'woocommerce' );
    
    		// Load the form fields.
    		$this->init_form_fields();
    
    		// Load the settings.
    		$this->init_settings();
    
    		// Define user set variables
    		$this->title 			= $this->settings['title'];
    		$this->description 		= $this->settings['description'];
            $this->cuenta    = $this->settings['cuenta'];
    		$this->email 			= $this->settings['email'];
            $this->country    = $this->settings['country'];
            $this->logo    = $this->settings['logo'];
            $this->ipnpass    = $this->settings['ipnpass'];
    		$this->form_submission_method = ( isset( $this->settings['form_submission_method'] ) && $this->settings['form_submission_method'] == 'yes' ) ? true : false;
    		// Logs
    		$this->log = $woocommerce->logger();
    
    		// Actions
    		add_action( 'init', array(&$this, 'check_ipn_response') );
    		add_action('valid-dineromail-standard-ipn-request', array(&$this, 'successful_request') );
    		add_action('woocommerce_receipt_dineromail', array(&$this, 'receipt_page'));
    		add_action('woocommerce_update_options_payment_gateways', array(&$this, 'process_admin_options'));
    
    		if ( !$this->is_valid_for_use() ) $this->enabled = false;
        }
    
        function is_valid_for_use() {
            if (!in_array(get_woocommerce_currency(), array('ARS', 'BRL', 'CLP', 'MXN', 'USD'))) return false;
    
            return true;
        }
    
    	public function admin_options() {
    
        	?>
        	<h3><?php _e('DineroMail standard', 'woocommerce'); ?></h3>
        	<p><?php _e('DineroMail standard works by sending the user to DineroMail to enter their payment information.', 'woocommerce'); ?></p>
        	<table class="form-table">
        	<?php
        		if ( $this->is_valid_for_use() ) :
    
        			// Generate the HTML For the settings form.
        			$this->generate_settings_html();
    
        		else :
    
        			?>
                		<div class="inline error"><p><strong><?php _e( 'Gateway Disabled', 'woocommerce' ); ?></strong>: <?php _e( 'DineroMail does not support your store currency.', 'woocommerce' ); ?></p></div>
            		<?php
    
        		endif;
        	?>
    		</table><!--/.form-table-->
        	<?php
        }
    
        function init_form_fields() {
    
        	$this->form_fields = array(
    			'enabled' => array(
    							'title' => __( 'Activar/Desactivar', 'woocommerce' ),
    							'type' => 'checkbox',
    							'label' => __( 'Activar DineroMail Estándar', 'woocommerce' ),
    							'default' => 'yes'
    						),
    			'title' => array(
    							'title' => __( 'Title', 'woocommerce' ),
    							'type' => 'text',
    							'description' => __( '<br />Este el título que el usuario mira en el checkout de WordPress.', 'woocommerce' ),
    							'default' => __( 'DineroMail', 'woocommerce' )
    						),
    			'description' => array(
    							'title' => __( 'Description', 'woocommerce' ),
    							'type' => 'textarea',
    							'description' => __( 'Esta és la descripción que el usuario mira en el checkout de WordPress.', 'woocommerce' ),
    							'default' => __("Pago con DineroMail", 'woocommerce')
    						),
    			'cuenta' => array(
    							'title' => __( 'Número de la Cuenta', 'woocommerce' ),
    							'type' => 'text',
    							'description' => __( '<br />Debe ser insertado sin la barra(/) y sin el último dígito.', 'woocommerce' ),
    							'default' => ''
    						),
                'email' => array(
                                'title' => __( 'Mail de Registro en DineroMail', 'woocommerce' ),
                                'type' => 'text',
                                'description' => __( '<br />Informe el mail que usou para se registrar en DineroMail.', 'woocommerce' ),
                                'default' => ''
                            ),
                'country' => array(
                                'title' => __( 'País de Registro', 'woocommerce' ),
                                'type' => 'select',
                                'description' => __( '<br />Informe el país de registro de su cuenta de DineroMail.', 'woocommerce' ),
                                'options' => array(
                                    'Argentina' => __( 'Argentina', 'woocommerce' ),
                                    'Brasil' => __( 'Brasil', 'woocommerce' ),
                                    'Chile' => __( 'Chile', 'woocommerce' ),
                                    'México' => __( 'México', 'woocommerce' )
                                )
                            ),
    
                'logo' => array(
                                'title' => __( 'Logo de la Tienda', 'woocommerce' ),
                                'type' => 'text',
                                'description' => __( '<br />Informe la url donde está alojada la imagen. Ejemplo: http://www.meusite/imagens/logo.jpg<br />Tamaño máximo que debes tener <b>756x100</b>.', 'woocommerce' ),
                                'default' => '',
                                'readyonli'
                            ),
                'ipnpass' => array(
                                'title' => __( 'Contraseña IPN', 'woocommerce' ),
                                'type' => 'text',
                                'description' => __( '<br />Informe la contraseña IPN caso vás usar la notificación de DienroMail.<br />Use la URL informada abajo para configurar la Notificación de DineroMail.<br />Para más informaciones sobre la IPN, consulte el manual IPN disponible en la url <a href="https://br.dineromail.com/biblioteca" target="_blank">https://br.dineromail.com/biblioteca</a>.', 'woocommerce' ),
                                'default' => ''
                            ),
                'ipnurl' => array(
                                'title' => __( 'URL IPN', 'woocommerce' ),
                                'type' => 'textarea',
                                'description' => __( 'Caso vás usar la notificacion de DineroMail use la url ariba.<br />Para más informaciones sobre la URL IPN consulte el Manual IPN disponible en la url <a href="https://br.dineromail.com/biblioteca" target="_blank">https://br.dineromail.com/biblioteca</a>', 'woocommerce' ),
                                'default' => trailingslashit( home_url() ) . '?dineromailListener=dineromail_standard_IPN'
                            )
    			);
    
        }
    
    	function get_dineromail_args( $order ) {
    		global $woocommerce;
    
    		$order_id = $order->id;
    
            if($this->country == "Argentina") {
                $currency = "ars";
                $language = "es";
                $countryid = 1;
            }
            elseif($this->country == "Brasil") {
                $currency = "brl";
                $language = "pt";
                $countryid = 2;
            }
            elseif($this->country == "Chile") {
                $currency = "clp";
                $language = "es";
                $countryid = 3;
            }
            elseif($this->country == "México") {
                $currency = "mxn";
                $language = "es";
                $countryid = 4;
            }
    
    		if ($this->debug=='yes') $this->log->add( 'dineromail', 'Generating payment form for order #' . $order_id . '. Notify URL: ' . trailingslashit(home_url()).'?dineromailListener=dineromail_standard_IPN');
    
    		$dineromail_args = array_merge(
    			array(
    				'change_quantity' => '0',
    				'payment_method_available' => 'all',
    				'merchant' 		  => $this->cuenta,
    				'country_id' 	  => $countryid,
    				'header_image' 	  => $this->logo,
    				'seller_name' 	  => get_bloginfo( 'name' ),
    				'language' 		  => $language,
    				'transaction_id'  => $order_id,
    				'currency'        => $currency,
    				'ok_url'          => add_query_arg( 'utm_nooverride', '1', $this->get_return_url( $order ) ),
    				'pending_url' 	  => add_query_arg( 'utm_nooverride', '1', $this->get_return_url( $order ) ),
    				'error_url'		  => $order->get_cancel_order_url(),
    
    				// Billing Address info
    				'buyer_name'	  => $order->billing_first_name,
    				'buyer_lastname'  => $order->billing_last_name,
    				'buyer_email'     => $order->billing_email,
    				'buyer_phone'	  => str_replace( array( '(', '-', ' ', ')', '.' ), '', $order->billing_phone )
    
    			)
    		);
    
    		// If prices include tax or have order discounts, send the whole order as a single item
    		if ( get_option('woocommerce_prices_include_tax')=='yes' || $order->get_order_discount() > 0 ) :
                $pricediscount = sprintf('%.1f',$order->get_order_discount());
    			// Discount
    			$dineromail_args['display_additional_charge'] = 1;
                $dineromail_args['additional_fixed_charge'] = $pricediscount.'-';
    			$dineromail_args['additional_fixed_charge_currency'] = get_woocommerce_currency();
            endif;    
    
    		$item_names = array();
    
    		if (sizeof($order->get_items())>0) : foreach ($order->get_items() as $item) :
                if ($item['qty']) :
    
                    $item_loop++;
    
                    $product = $order->get_product_from_item($item);
    
                    $item_name  = $item['name'];
    
                    $item_meta = new WC_Order_Item_Meta( $item['item_meta'] );
                    if ($meta = $item_meta->display( true, true )) :
                        $item_name .= ' ('.$meta.')';
                    endif;
    
                    $dineromail_args['item_name_'.$item_loop] = $item_name;
                    $dineromail_args['item_quantity_'.$item_loop] = $item['qty'];
                    $dineromail_args['item_ammount_'.$item_loop] = $order->get_item_total( $item, false );//$order->get_item_total( $item, true, true );
                    $dineromail_args['item_currency_'.$item_loop] = get_woocommerce_currency();
    
                endif;
            endforeach; endif;
    			// Shipping Cost
    
    		if ( ( $order->get_shipping() + $order->get_shipping_tax() ) > 0 ) :
                $item_loop++;
    			$dineromail_args['item_name_'.$item_loop] ='WPW - Tasa de Flete';
    			$dineromail_args['item_quantity_'.$item_loop] 	= '1';
    			$dineromail_args['item_ammount_'.$item_loop] 	= number_format( $order->get_shipping(), 2, '.', '' );//number_format( $order->get_shipping() + $order->get_shipping_tax() , 2, '.', '' );
                $dineromail_args['item_currency_'.$item_loop] = get_woocommerce_currency();
    		endif;
    
            if ( $order->get_total_tax() > 0 ) :
                $item_loop++;
                $dineromail_args['item_name_'.$item_loop] ='WPW - Tasa de Impuesto';
                $dineromail_args['item_quantity_'.$item_loop]  = '1';
                $dineromail_args['item_ammount_'.$item_loop]    = number_format( $order->get_total_tax() , 2, '.', '' );
                $dineromail_args['item_currency_'.$item_loop] = get_woocommerce_currency();
            endif;
    
    		$dineromail_args = apply_filters( 'woocommerce_dineromail_args', $dineromail_args );
    
    		return $dineromail_args;
    	}
    
        function generate_dineromail_form( $order_id ) {
    		global $woocommerce;
    
    		$order = new WC_Order( $order_id );
    
            $dineromail_adr = $this->liveurl;
    
    		$dineromail_args = $this->get_dineromail_args( $order );
    
    		$dineromail_args_array = array();
    
    		foreach ($dineromail_args as $key => $value) {
    			$dineromail_args_array[] = '<input type="hidden" name="'.esc_attr( $key ).'" value="'.esc_attr( $value ).'" />';
    		}
    
    		$woocommerce->add_inline_js('
    			jQuery("body").block({
    					message: "<img src=\"' . esc_url( apply_filters( 'woocommerce_ajax_loader_url', $woocommerce->plugin_url() . '/assets/images/ajax-loader.gif' ) ) . '\" alt=\"Redirecting…\" style=\"float:left; margin-right: 10px;\" />'.__('Gracias por su pedido. Ahora estamos te redirigiremos a DineroMail para hacer el pago.', 'woocommerce').'",
    					overlayCSS:
    					{
    						background: "#fff",
    						opacity: 0.6
    					},
    					css: {
    				        padding:        28,
    				        textAlign:      "center",
    				        color:          "#555",
    				        border:         "3px solid #aaa",
    				        backgroundColor:"#fff",
    				        cursor:         "wait",
    				        lineHeight:		"32px"
    				    }
    				});
    			jQuery("#submit_dineromail_payment_form").click();
    		');
    
    		return '<form action="'.esc_url( $dineromail_adr ).'" method="post" id="dineromail_payment_form" target="_top">
    				' . implode('', $dineromail_args_array) . '
    				<input type="submit" class="button-alt" id="submit_dineromail_payment_form" value="'.__('Pay via DineroMail', 'woocommerce').'" /> <a class="button cancel" href="'.esc_url( $order->get_cancel_order_url() ).'">'.__('Cancel order & restore cart', 'woocommerce').'</a>
    			</form>';
    
    	}
    
    	function process_payment( $order_id ) {
    
    		$order = new WC_Order( $order_id );
    
    		if ( $this->form_submission_method ) {
    
    			$dineromail_args = $this->get_dineromail_args( $order );
    
    			$dineromail_args = http_build_query( $dineromail_args, '', '&' );
    
    			$dineromail_adr = $this->liveurl . '?';
    
    			return array(
    				'result' 	=> 'success',
    				'redirect'	=> $dineromail_adr . $dineromail_args
    			);
    
    		} else {
    
    			return array(
    				'result' 	=> 'success',
    				'redirect'	=> add_query_arg('order', $order->id, add_query_arg('key', $order->order_key, get_permalink(woocommerce_get_page_id('pay'))))
    			);
    
    		}
    
    	}
    
    	function receipt_page( $order ) {
    
    		echo '<p>'.__('Thank you for your order, please click the button below to pay with DineroMail.', 'woocommerce').'</p>';
    
    		echo $this->generate_dineromail_form( $order );
    
    	}
    
    	/**
    	 * Check DineroMail IPN validity
    	 **/
    	function check_ipn_request_is_valid() {
    		global $woocommerce;
    
    		if ($this->debug=='yes') $this->log->add( 'dineromail', 'Checking IPN response is valid...' );
    
        	// Get recieved values from post data
    		$received_values = (array) stripslashes_deep( $_POST );
    
    		 // Add cmd to the post array
    		$received_values['cmd'] = '_notify-validate';
    
            // Send back post vars to dineromail
            $params = array(
            	'body' 			=> $received_values,
            	'sslverify' 	=> false,
            	'timeout' 		=> 30,
            	'user-agent'	=> 'WooCommerce/' . $woocommerce->version
            );
    
            // Get url
           	if ( $this->testmode == 'yes' ):
    			$dineromail_adr = $this->testurl;
    		else :
    			$dineromail_adr = $this->liveurl;
    		endif;
    
    		// Post back to get a response
            $response = wp_remote_post( $dineromail_adr, $params );
    
            if ($this->debug=='yes') $this->log->add( 'dineromail', 'IPN Response: ' . print_r($response, true) );
    
            // check to see if the request was valid
            if ( !is_wp_error($response) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 && (strcmp( $response['body'], "VERIFIED") == 0)) {
                if ($this->debug=='yes') $this->log->add( 'dineromail', 'Received valid response from DineroMail' );
                return true;
            }
    
            if ($this->debug=='yes') :
            	$this->log->add( 'dineromail', 'Received invalid response from DineroMail' );
            	if (is_wp_error($response)) :
            		$this->log->add( 'dineromail', 'Error response: ' . $result->get_error_message() );
            	endif;
            endif;
    
            return false;
        }
    
    	/**
    	 * Check for DineroMail IPN Response
    	 *
    	 * @access public
    	 * @return void
    	 */
    	function check_ipn_response() {
    
    		if (isset($_GET['dineromailListener']) && $_GET['dineromailListener'] == 'dineromail_standard_IPN'):
    
            	$_POST = stripslashes_deep($_POST);
                if($_REQUEST['Notificacion']){          
    
                    ini_set("allow_url_fopen", 1);
                    ini_set("allow_url_include", 1);            
    
                    $notificacion = htmlspecialchars_decode($_REQUEST['Notificacion']);
                    $notificacion = str_replace("<?xml version='1.0'encoding='ISO-8859-1'?>", "", $notificacion);
                    $notificacion = str_replace("<?xml version=\'1.0\'encoding=\'ISO-8859-1\'?>", "", $notificacion);
                    $notificacion = str_replace("<?xmlversion=\'1.0\'encoding=\'ISO-8859-1\'?>", "", $notificacion);
                    $notificacion = str_replace("<?xmlversion='1.0'encoding='ISO-8859-1'?>", "", $notificacion);
                    $notificacion = str_replace("<?xml version='1.0' encoding='ISO-8859-1'?>", "", $notificacion);
                    $notificacion = str_replace("<?xml version=\'1.0\' encoding=\'ISO-8859-1\'?>", "", $notificacion);
    
                    $doc = new SimpleXMLElement($notificacion);
                    $tipo_notificacion = $doc ->tiponotificacion;
                    foreach ($doc ->operaciones ->operacion  as  $OPERACION){
                        $id_operacion = $OPERACION->id;
                        $this->successful_request($id_operacion);
                    }
                }
    
           	endif;
    	}
    
    	/**
    	 * Successful Payment!
    	 *
    	 * @access public
    	 * @param array $posted
    	 * @return void
    	 */
    	function successful_request( $id_operacion ) {
    
            global $woocommerce;
    
            $order = new WC_Order( (int)$id_operacion );      
    
            $nrocta = $this->cuenta;
            $senhaipn = $this->ipnpass;
            //var_dump($order);
            if($this->country == "Argentina") {
                 $url="https://argentina.dineromail.com/Vender/Consulta_IPN.asp";
            }
            elseif($this->country == "Brasil") {
                $url="https://brasil.dineromail.com/Vender/Consulta_IPN.asp";
            }
            elseif($this->country == "Chile") {
                $url="https://chile.dineromail.com/Vender/Consulta_IPN.asp";
            }
            elseif($this->country == "México") {
                $url="https://mexico.dineromail.com/Vender/Consulta_IPN.asp";
            }
    
            $data = 'DATA=<REPORTE><NROCTA>'.$nrocta.'</NROCTA><DETALLE><CONSULTA><CLAVE>'.$senhaipn.'</CLAVE><TIPO>1</TIPO><OPERACIONES><ID>'.$id_operacion.'</ID></OPERACIONES></CONSULTA></DETALLE></REPORTE>';
    
            $url = parse_url($url);
            $host = $url['host'];
            $path = $url['path'];
            $fp = fsockopen($host, 80);
            fputs($fp, "POST $path HTTP/1.1\r\n");
            fputs($fp, "Host: $host\r\n");
            //fputs($fp, "Referer: $referer\r\n");
            fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");
            fputs($fp, "Content-length: ". strlen($data) ."\r\n");
            fputs($fp, "Connection: close\r\n\r\n");
            fputs($fp, $data);
            $result = ''; 
    
            while(!feof($fp)) {
                // resultado del request
                $result .= fgets($fp, 128);
            }
            // cierra conexion
            fclose($fp);
            // separa el header del content
            $result = explode("\r\n\r\n", $result, 2);
            //$header = isset($result[0]) ? $result[0] : '';
            $content = isset($result[1]) ? $result[1] : '';  
    
            $xml = new SimpleXMLElement($content);
            $estadoxml = $xml ->ESTADOREPORTE;
    
            if($estadoxml==1){
    
                foreach ($xml ->DETALLE->OPERACIONES->OPERACION  as  $OPERACION){
    
                    $trx_id= $OPERACION->ID;
                    $estadotrans= $OPERACION->ESTADO; 
    
                    if($estadotrans==1){
                       $order->update_status( 'pending' );
                    }
                    elseif($estadotrans==2){
                       $order->update_status( 'completed' );
                    }
                    elseif($estadotrans==3){
                       $order->update_status( 'cancelled' );
                    }
                }
            }
        }
    
    }
    
    /**
     * Add the gateway to WooCommerce
     *
     * @access public
     * @param array $methods
     * @package		WooCommerce/Classes/Payment
     * @return array
     */
    function add_dineromail_gateway( $methods ) {
    	$methods[] = 'WC_Dineromail';
    	return $methods;
    }
    
    add_filter('woocommerce_payment_gateways', 'add_dineromail_gateway' );

    if anyone understands spanish the whole explanation is here

    Could anyone help me out here?

    Thanks so much.

    Lili

    http://wordpress.org/extend/plugins/woocommerce/

  2. kbilicicweb
    Member
    Posted 1 year ago #

    edit this code:

    function is_valid_for_use() {
    if (!in_array(get_woocommerce_currency(), array('ARS', 'BRL', 'CLP', 'MXN', 'USD'))) return false;

    return true;
    }

    you have to add your currency code to the array of currencies
    find out your currentcy by echoing result from get_woocommerce_currency() and add it to array

    It should work!

    I had the same problem with Croatian kuna

  3. lilireed
    Member
    Posted 1 year ago #

    thanks kbilicicweb!

    I had my currency added to woocommerce with a plugin so that should've been working...
    Anyway, Claudio from http://claudiosmweb.com/ helped me tons and made a working plugin out of that code that so far has had no glitches.
    If anyone is interested in the results let me know and I'll send you the files.

    cheers!

  4. GutieC
    Member
    Posted 1 year ago #

    Hello lilireed,

    I'm interested in the files, you can send them to me?
    Gracias!

    cgutierrezv[@]gmail.com

  5. mwq1971
    Member
    Posted 1 year ago #

    Hello lilireed,

    I'm also interested in the files you got from claudio, you can send them to me?
    Gracias!

    [email address moderated - these forums do not provide support via email]

  6. ngonchan
    Member
    Posted 1 year ago #

    lilireed, can you send me those files?
    Thanks in advance.
    ngonchan[at]gmail dot com.

  7. cristianryu
    Member
    Posted 1 year ago #

    hola lilireed, puedes pegar aquí esos códigos así los vemos todos?

    Gracias!!!

  8. lilireed
    Member
    Posted 1 year ago #

    Hola Cristian,
    Te lo adjunto aquí pero también necesitas una carpeta asociada con el logo de Dineromail. Si quieres usar este código agrega una carpeta llamada "images" que tenga un archivo dineromail.jpg de 48x48px.

    <?php
    /**
     * Plugin Name: Woocommerce DineroMail Gateway
     * Plugin URI: http://foro.dineromail.com/viewtopic.php?f=48&t=67
     * Description: Provides a Dineromail Standard Payment Gateway.
     * Author: dineromail, claudiosanches, lilireed
     * Author URI: http://foro.dineromail.com/
     * Version: 0.1
     */
    
    /**
     * Load functions.
     */
    add_action( 'plugins_loaded', 'wcdinheiromail_gateway_load', 0 );
    
    function wcdinheiromail_gateway_load() {
    
        /**
         * Add the gateway to WooCommerce
         *
         * @access public
         * @param array $methods
         * @package     WooCommerce/Classes/Payment
         * @return array
         */
        function add_dineromail_gateway( $methods ) {
            $methods[] = 'WC_Dineromail';
            return $methods;
        }
    
        add_filter( 'woocommerce_payment_gateways', 'add_dineromail_gateway' );
    
        /**
         * DineroMail Standard Payment Gateway
         *
         * Provides a Dineromail Standard Payment Gateway.
         *
         * @class 		WC_Dineromail
         * @extends		WC_Payment_Gateway
         */
        class WC_Dineromail extends WC_Payment_Gateway {
    
            /**
             * Constructor for the gateway.
             *
             * @access public
             * @return void
             */
        	public function __construct() {
        		global $woocommerce;
    
                $this->id			= 'dineromail';
                $this->icon 		= plugins_url( 'images/dineromail.jpg', __FILE__ );
                $this->has_fields 	= false;
                $this->liveurl 		= 'https://checkout.dineromail.com/CheckOut';
        		$this->testurl 		= 'https://checkout.dineromail.com/CheckOut';
                $this->method_title = __( 'DineroMail', 'woocommerce' );
    
        		// Load the form fields.
        		$this->init_form_fields();
    
        		// Load the settings.
        		$this->init_settings();
    
        		// Define user set variables
        		$this->title 			= $this->settings['title'];
        		$this->description 		= $this->settings['description'];
                $this->cuenta    = $this->settings['cuenta'];
        		$this->email 			= $this->settings['email'];
                $this->country    = $this->settings['country'];
                $this->logo    = $this->settings['logo'];
                $this->ipnpass    = $this->settings['ipnpass'];
        		$this->form_submission_method = ( isset( $this->settings['form_submission_method'] ) && $this->settings['form_submission_method'] == 'yes' ) ? true : false;
        		// Logs
        		$this->log = $woocommerce->logger();
    
        		// Actions
        		add_action( 'init', array(&$this, 'check_ipn_response') );
        		add_action('valid-dineromail-standard-ipn-request', array(&$this, 'successful_request') );
        		add_action('woocommerce_receipt_dineromail', array(&$this, 'receipt_page'));
                if ( version_compare( WOOCOMMERCE_VERSION, '2.0.0', '>=' ) ) {
                    add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( &$this, 'process_admin_options' ) );
                } else {
                    add_action( 'woocommerce_update_options_payment_gateways', array( &$this, 'process_admin_options' ) );
                }
    
        		if ( !$this->is_valid_for_use() ) $this->enabled = false;
            }
    
            function is_valid_for_use() {
                if (!in_array(get_woocommerce_currency(), array('ARS', 'BRL', 'CLP', 'MXN', 'USD'))) return false;
    
                return true;
            }
    
        	public function admin_options() {
    
            	?>
            	<h3><?php _e('DineroMail standard', 'woocommerce'); ?></h3>
            	<p><?php _e('DineroMail standard works by sending the user to DineroMail to enter their payment information.', 'woocommerce'); ?></p>
            	<table class="form-table">
            	<?php
            		if ( $this->is_valid_for_use() ) :
    
            			// Generate the HTML For the settings form.
            			$this->generate_settings_html();
    
            		else :
    
            			?>
                    		<div class="inline error"><p><strong><?php _e( 'Gateway Disabled', 'woocommerce' ); ?></strong>: <?php _e( 'DineroMail does not support your store currency.', 'woocommerce' ); ?></p></div>
                		<?php
    
            		endif;
            	?>
        		</table><!--/.form-table-->
            	<?php
            }
    
            function init_form_fields() {
    
            	$this->form_fields = array(
        			'enabled' => array(
        							'title' => __( 'Activar/Desactivar', 'woocommerce' ),
        							'type' => 'checkbox',
        							'label' => __( 'Activar DineroMail Estándar', 'woocommerce' ),
        							'default' => 'yes'
        						),
        			'title' => array(
        							'title' => __( 'Title', 'woocommerce' ),
        							'type' => 'text',
        							'description' => __( '<br />Este el título que el usuario mira en el checkout de WordPress.', 'woocommerce' ),
        							'default' => __( 'DineroMail', 'woocommerce' )
        						),
        			'description' => array(
        							'title' => __( 'Description', 'woocommerce' ),
        							'type' => 'textarea',
        							'description' => __( 'Esta es la descripción que el usuario mira en el checkout de WordPress.', 'woocommerce' ),
        							'default' => __("Pago con DineroMail", 'woocommerce')
        						),
        			'cuenta' => array(
        							'title' => __( 'Número de la Cuenta', 'woocommerce' ),
        							'type' => 'text',
        							'description' => __( '<br />Debe ser insertado sin la barra(/) y sin el último dígito.', 'woocommerce' ),
        							'default' => ''
        						),
                    'email' => array(
                                    'title' => __( 'Mail de Registro en DineroMail', 'woocommerce' ),
                                    'type' => 'text',
                                    'description' => __( '<br />Informe el mail que uso para se registrar en DineroMail.', 'woocommerce' ),
                                    'default' => ''
                                ),
                    'country' => array(
                                    'title' => __( 'País de Registro', 'woocommerce' ),
                                    'type' => 'select',
                                    'description' => __( '<br />Informe el país de registro de su cuenta de DineroMail.', 'woocommerce' ),
                                    'options' => array(
                                        'Argentina' => __( 'Argentina', 'woocommerce' ),
                                        'Brasil' => __( 'Brasil', 'woocommerce' ),
                                        'Chile' => __( 'Chile', 'woocommerce' ),
                                        'México' => __( 'México', 'woocommerce' )
                                    )
                                ),
    
                    'logo' => array(
                                    'title' => __( 'Logo de la Tienda', 'woocommerce' ),
                                    'type' => 'text',
                                    'description' => __( '<br />Informe la url donde está alojada la imagen. Ejemplo: http://www.meusite/imagens/logo.jpg<br />Tama&ntilde;o m&aacute;ximo: <b>756x100</b>.', 'woocommerce' ),
                                    'default' => '',
                                    'readyonli'
                                ),
                    'ipnpass' => array(
                                    'title' => __( 'Contraseña IPN', 'woocommerce' ),
                                    'type' => 'text',
                                    'description' => __( '<br />Informe la contraseña IPN caso v&aacute;s usar la notificación de DineroMail.<br />Use la URL informada abajo para configurar la Notificación de DineroMail.<br />Para más informaciones sobre la IPN, consulte el manual IPN disponible en la url <a href="https://br.dineromail.com/biblioteca" target="_blank">https://br.dineromail.com/biblioteca</a>.', 'woocommerce' ),
                                    'default' => ''
                                ),
                    'ipnurl' => array(
                                    'title' => __( 'URL IPN', 'woocommerce' ),
                                    'type' => 'textarea',
                                    'description' => __( 'Caso v&aacute;s usar la notificacion de DineroMail use la url ariba.<br />Para más información sobre la URL IPN consulte el Manual IPN disponible en la url <a href="https://br.dineromail.com/biblioteca" target="_blank">https://br.dineromail.com/biblioteca</a>', 'woocommerce' ),
                                    'default' => trailingslashit( home_url() ) . '?dineromailListener=dineromail_standard_IPN'
                                )
        			);
    
            }
    
        	function get_dineromail_args( $order ) {
        		global $woocommerce;
    
        		$order_id = $order->id;
    
                if($this->country == "Argentina") {
                    $currency = "ars";
                    $language = "es";
                    $countryid = 1;
                }
                elseif($this->country == "Brasil") {
                    $currency = "brl";
                    $language = "pt";
                    $countryid = 2;
                }
                elseif($this->country == "Chile") {
                    $currency = "clp";
                    $language = "es";
                    $countryid = 3;
                }
                elseif($this->country == "México") {
                    $currency = "mxn";
                    $language = "es";
                    $countryid = 4;
                }
    
        		if ($this->debug=='yes') $this->log->add( 'dineromail', 'Generating payment form for order #' . $order_id . '. Notify URL: ' . trailingslashit(home_url()).'?dineromailListener=dineromail_standard_IPN');
    
        		$dineromail_args = array_merge(
        			array(
        				'change_quantity' => '0',
        				'payment_method_available' => 'all',
        				'merchant' 		  => $this->cuenta,
        				'country_id' 	  => $countryid,
        				'header_image' 	  => $this->logo,
        				'seller_name' 	  => get_bloginfo( 'name' ),
        				'language' 		  => $language,
        				'transaction_id'  => $order_id,
        				'currency'        => $currency,
        				'ok_url'          => add_query_arg( 'utm_nooverride', '1', $this->get_return_url( $order ) ),
        				'pending_url' 	  => add_query_arg( 'utm_nooverride', '1', $this->get_return_url( $order ) ),
        				'error_url'		  => $order->get_cancel_order_url(),
    
        				// Billing Address info
        				'buyer_name'	  => $order->billing_first_name,
        				'buyer_lastname'  => $order->billing_last_name,
        				'buyer_email'     => $order->billing_email,
        				'buyer_phone'	  => str_replace( array( '(', '-', ' ', ')', '.' ), '', $order->billing_phone )
    
        			)
        		);
    
        		// If prices include tax or have order discounts, send the whole order as a single item
        		if ( get_option('woocommerce_prices_include_tax')=='yes' || $order->get_order_discount() > 0 ) :
                    $pricediscount = sprintf('%.1f',$order->get_order_discount());
        			// Discount
        			$dineromail_args['display_additional_charge'] = 1;
                    $dineromail_args['additional_fixed_charge'] = $pricediscount.'-';
        			$dineromail_args['additional_fixed_charge_currency'] = get_woocommerce_currency();
                endif;
    
        		$item_names = array();
    
        		if (sizeof($order->get_items())>0) : foreach ($order->get_items() as $item) :
                    if ($item['qty']) :
    
                        $item_loop++;
    
                        $product = $order->get_product_from_item($item);
    
                        $item_name  = $item['name'];
    
                        $item_meta = new WC_Order_Item_Meta( $item['item_meta'] );
                        if ($meta = $item_meta->display( true, true )) :
                            $item_name .= ' ('.$meta.')';
                        endif;
    
                        $dineromail_args['item_name_'.$item_loop] = $item_name;
                        $dineromail_args['item_quantity_'.$item_loop] = $item['qty'];
                        $dineromail_args['item_ammount_'.$item_loop] = $order->get_item_total( $item, false );//$order->get_item_total( $item, true, true );
                        $dineromail_args['item_currency_'.$item_loop] = get_woocommerce_currency();
    
                    endif;
                endforeach; endif;
        			// Shipping Cost
    
        		if ( ( $order->get_shipping() + $order->get_shipping_tax() ) > 0 ) :
                    $item_loop++;
        			$dineromail_args['item_name_'.$item_loop] ='WPW - Tasa de Flete';
        			$dineromail_args['item_quantity_'.$item_loop] 	= '1';
        			$dineromail_args['item_ammount_'.$item_loop] 	= number_format( $order->get_shipping(), 2, '.', '' );//number_format( $order->get_shipping() + $order->get_shipping_tax() , 2, '.', '' );
                    $dineromail_args['item_currency_'.$item_loop] = get_woocommerce_currency();
        		endif;
    
                if ( $order->get_total_tax() > 0 ) :
                    $item_loop++;
                    $dineromail_args['item_name_'.$item_loop] ='WPW - Tasa de Impuesto';
                    $dineromail_args['item_quantity_'.$item_loop]  = '1';
                    $dineromail_args['item_ammount_'.$item_loop]    = number_format( $order->get_total_tax() , 2, '.', '' );
                    $dineromail_args['item_currency_'.$item_loop] = get_woocommerce_currency();
                endif;
    
        		$dineromail_args = apply_filters( 'woocommerce_dineromail_args', $dineromail_args );
    
        		return $dineromail_args;
        	}
    
            function generate_dineromail_form( $order_id ) {
        		global $woocommerce;
    
        		$order = new WC_Order( $order_id );
    
                $dineromail_adr = $this->liveurl;
    
        		$dineromail_args = $this->get_dineromail_args( $order );
    
        		$dineromail_args_array = array();
    
        		foreach ($dineromail_args as $key => $value) {
        			$dineromail_args_array[] = '<input type="hidden" name="'.esc_attr( $key ).'" value="'.esc_attr( $value ).'" />';
        		}
    
        		$woocommerce->add_inline_js('
        			jQuery("body").block({
        					message: "<img src=\"' . esc_url( apply_filters( 'woocommerce_ajax_loader_url', $woocommerce->plugin_url() . '/assets/images/ajax-loader.gif' ) ) . '\" alt=\"Redirecting&hellip;\" style=\"float:left; margin-right: 10px;\" />'.__('Gracias por su pedido. Ahora estamos te redirigiremos a DineroMail para hacer el pago.', 'woocommerce').'",
        					overlayCSS:
        					{
        						background: "#fff",
        						opacity: 0.6
        					},
        					css: {
        				        padding:        28,
        				        textAlign:      "center",
        				        color:          "#555",
        				        border:         "3px solid #aaa",
        				        backgroundColor:"#fff",
        				        cursor:         "wait",
        				        lineHeight:		"32px"
        				    }
        				});
        			jQuery("#submit_dineromail_payment_form").click();
        		');
    
        		return '<form action="'.esc_url( $dineromail_adr ).'" method="post" id="dineromail_payment_form" target="_top">
        				' . implode('', $dineromail_args_array) . '
        				<input type="submit" class="button-alt" id="submit_dineromail_payment_form" value="'.__('Pay via DineroMail', 'woocommerce').'" /> <a class="button cancel" href="'.esc_url( $order->get_cancel_order_url() ).'">'.__('Cancel order & restore cart', 'woocommerce').'</a>
        			</form>';
    
        	}
    
        	function process_payment( $order_id ) {
    
        		$order = new WC_Order( $order_id );
    
        		if ( $this->form_submission_method ) {
    
        			$dineromail_args = $this->get_dineromail_args( $order );
    
        			$dineromail_args = http_build_query( $dineromail_args, '', '&' );
    
        			$dineromail_adr = $this->liveurl . '?';
    
        			return array(
        				'result' 	=> 'success',
        				'redirect'	=> $dineromail_adr . $dineromail_args
        			);
    
        		} else {
    
        			return array(
        				'result' 	=> 'success',
        				'redirect'	=> add_query_arg('order', $order->id, add_query_arg('key', $order->order_key, get_permalink(woocommerce_get_page_id('pay'))))
        			);
    
        		}
    
        	}
    
        	function receipt_page( $order ) {
    
        		echo '<p>'.__('Thank you for your order, please click the button below to pay with DineroMail.', 'woocommerce').'</p>';
    
        		echo $this->generate_dineromail_form( $order );
    
        	}
    
        	/**
        	 * Check DineroMail IPN validity
        	 **/
        	function check_ipn_request_is_valid() {
        		global $woocommerce;
    
        		if ($this->debug=='yes') $this->log->add( 'dineromail', 'Checking IPN response is valid...' );
    
            	// Get recieved values from post data
        		$received_values = (array) stripslashes_deep( $_POST );
    
        		 // Add cmd to the post array
        		$received_values['cmd'] = '_notify-validate';
    
                // Send back post vars to dineromail
                $params = array(
                	'body' 			=> $received_values,
                	'sslverify' 	=> false,
                	'timeout' 		=> 30,
                	'user-agent'	=> 'WooCommerce/' . $woocommerce->version
                );
    
                // Get url
               	if ( $this->testmode == 'yes' ):
        			$dineromail_adr = $this->testurl;
        		else :
        			$dineromail_adr = $this->liveurl;
        		endif;
    
        		// Post back to get a response
                $response = wp_remote_post( $dineromail_adr, $params );
    
                if ($this->debug=='yes') $this->log->add( 'dineromail', 'IPN Response: ' . print_r($response, true) );
    
                // check to see if the request was valid
                if ( !is_wp_error($response) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 && (strcmp( $response['body'], "VERIFIED") == 0)) {
                    if ($this->debug=='yes') $this->log->add( 'dineromail', 'Received valid response from DineroMail' );
                    return true;
                }
    
                if ($this->debug=='yes') :
                	$this->log->add( 'dineromail', 'Received invalid response from DineroMail' );
                	if (is_wp_error($response)) :
                		$this->log->add( 'dineromail', 'Error response: ' . $result->get_error_message() );
                	endif;
                endif;
    
                return false;
            }
    
        	/**
        	 * Check for DineroMail IPN Response
        	 *
        	 * @access public
        	 * @return void
        	 */
        	function check_ipn_response() {
    
        		if (isset($_GET['dineromailListener']) && $_GET['dineromailListener'] == 'dineromail_standard_IPN'):
    
                	$_POST = stripslashes_deep($_POST);
                    if($_REQUEST['Notificacion']){
    
                        ini_set("allow_url_fopen", 1);
                        ini_set("allow_url_include", 1);
    
                        $notificacion = htmlspecialchars_decode($_REQUEST['Notificacion']);
                        $notificacion = str_replace("<?xml version='1.0'encoding='ISO-8859-1'?>", "", $notificacion);
                        $notificacion = str_replace("<?xml version=\'1.0\'encoding=\'ISO-8859-1\'?>", "", $notificacion);
                        $notificacion = str_replace("<?xmlversion=\'1.0\'encoding=\'ISO-8859-1\'?>", "", $notificacion);
                        $notificacion = str_replace("<?xmlversion='1.0'encoding='ISO-8859-1'?>", "", $notificacion);
                        $notificacion = str_replace("<?xml version='1.0' encoding='ISO-8859-1'?>", "", $notificacion);
                        $notificacion = str_replace("<?xml version=\'1.0\' encoding=\'ISO-8859-1\'?>", "", $notificacion);
    
                        $doc = new SimpleXMLElement($notificacion);
                        $tipo_notificacion = $doc ->tiponotificacion;
                        foreach ($doc ->operaciones ->operacion  as  $OPERACION){
                            $id_operacion = $OPERACION->id;
                            $this->successful_request($id_operacion);
                        }
                    }
    
               	endif;
        	}
    
        	/**
        	 * Successful Payment!
        	 *
        	 * @access public
        	 * @param array $posted
        	 * @return void
        	 */
        	function successful_request( $id_operacion ) {
    
                global $woocommerce;
    
                $order = new WC_Order( (int)$id_operacion );
    
                $nrocta = $this->cuenta;
                $senhaipn = $this->ipnpass;
                //var_dump($order);
                if($this->country == "Argentina") {
                     $url="https://argentina.dineromail.com/Vender/Consulta_IPN.asp";
                }
                elseif($this->country == "Brasil") {
                    $url="https://brasil.dineromail.com/Vender/Consulta_IPN.asp";
                }
                elseif($this->country == "Chile") {
                    $url="https://chile.dineromail.com/Vender/Consulta_IPN.asp";
                }
                elseif($this->country == "México") {
                    $url="https://mexico.dineromail.com/Vender/Consulta_IPN.asp";
                }
    
                $data = 'DATA=<REPORTE><NROCTA>'.$nrocta.'</NROCTA><DETALLE><CONSULTA><CLAVE>'.$senhaipn.'</CLAVE><TIPO>1</TIPO><OPERACIONES><ID>'.$id_operacion.'</ID></OPERACIONES></CONSULTA></DETALLE></REPORTE>';
    
                $url = parse_url($url);
                $host = $url['host'];
                $path = $url['path'];
                $fp = fsockopen($host, 80);
                fputs($fp, "POST $path HTTP/1.1\r\n");
                fputs($fp, "Host: $host\r\n");
                //fputs($fp, "Referer: $referer\r\n");
                fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");
                fputs($fp, "Content-length: ". strlen($data) ."\r\n");
                fputs($fp, "Connection: close\r\n\r\n");
                fputs($fp, $data);
                $result = '';
    
                while(!feof($fp)) {
                    // resultado del request
                    $result .= fgets($fp, 128);
                }
                // cierra conexion
                fclose($fp);
                // separa el header del content
                $result = explode("\r\n\r\n", $result, 2);
                //$header = isset($result[0]) ? $result[0] : '';
                $content = isset($result[1]) ? $result[1] : '';
    
                $xml = new SimpleXMLElement($content);
                $estadoxml = $xml ->ESTADOREPORTE;
    
                if($estadoxml==1){
    
                    foreach ($xml ->DETALLE->OPERACIONES->OPERACION  as  $OPERACION){
    
                        $trx_id= $OPERACION->ID;
                        $estadotrans= $OPERACION->ESTADO;
    
                        if($estadotrans==1){
                           $order->update_status( 'pending' );
                        }
                        elseif($estadotrans==2){
                           $order->update_status( 'completed' );
                        }
                        elseif($estadotrans==3){
                           $order->update_status( 'cancelled' );
                        }
                    }
                }
            }
    
        }
    
    }
  9. FranciscoAMK
    Member
    Posted 1 year ago #

    ¿En qué línea o dentro de qué función haces la llamada en woocommerce.php?

    include( 'classes/gateways/dineromail/class-wc-dineromail.php' );

  10. esmi
    Forum Moderator
    Posted 1 year ago #

    These are English language forums, so please use English. Alternatively, use a WP support forum in your language.

  11. FranciscoAMK
    Member
    Posted 1 year ago #

    Oh sorry. So, the question is: Where do I have to put this line into woocommerce.php?

    include( 'classes/gateways/dineromail/class-wc-dineromail.php' );

  12. lilireed
    Member
    Posted 1 year ago #

    You don't have to, this plugin includes the gateway without having to modify the woocommerce code. You have to make a plugin folder called wc-dineromail, with a file inside called wc-dineromail.php that has the code I pasted in it, and a folder called images with the dineromail.jpg file i mentioned before, 48x48px.

  13. FranciscoAMK
    Member
    Posted 1 year ago #

    Thanks a lot. It worked fine for me.

  14. juampolo
    Member
    Posted 1 year ago #

    Hi lilireed! Thanks for sharing this!

    Its seems to be working perfect!!!

    But i have one question. I would like to give users the possibility to pay with dineromail or with paypal.... but i would like to show the prices in my woocommerce site always in ARS....

    How can I achieve this?

    Because i have added the Woocommerce Ars currency plugin from Claudio Sanchez... but it seems that paypal dont accept "pesos".... Any hint?

    Thanks!!!

  15. lilireed
    Member
    Posted 1 year ago #

    Hi juampolo,
    I think that this is a problem with Paypal. As far as I understand Paypal doesn't operate in Argentine Pesos. Before, they would convert pesos to dollars for you and this conversion allowed you to pay in "pesos" (or their equivalent, converted to dollars). Unfortunately, since some time in 1012 this conversion from pesos to dollars has been suspended, so payments in pesos are no longer available. Check it out, I may be wrong.
    Cheers

  16. cristianryu
    Member
    Posted 1 year ago #

    Hey Juampolo, I'm going to save you, a lot of time, with this answer... there is no way to pay with ARS with Paypal.

    There is a option, but implies that, you have to hire a programmer to make a specific plugin for you. A plugin that allows the convertion of the amount in Ars to Usd, but it is dificult.
    Otherwise, you can create a mirror webpage to put all the products in USD with links in to there in your ARS page, to redirect the clients who wants to pay in Paypal. It is the easiest solution I find, until today.

  17. juampolo
    Member
    Posted 1 year ago #

    Thanks Lillired and cristianryu for your replies!

    I think I should do what cristianryu have said but in a different way...

    As Dineromail accept dollars (converting it to ARS in the gateway based on the BNA price) I could make a tweak so the price of the product appears in USD and beside the USD price.... it can show the ARS price... this could be good for me.

    Thanks for the hints!

  18. V.tine
    Member
    Posted 1 year ago #

    Hi!
    I did everything you guys said but is not working at all.
    Can't understand why. :(
    I've created a new folder called wc-dineromail.
    Inside the folder: a php file named wc-dineromail.php with pasted code and another folder called images with a jpg file of the logo named dineromail.jpg

    Then I insert the folder in gateways - Didn't work.
    Tried to put it into classes folder - Didn't work.
    renamed the folder just dineromail - Didn't work.
    renamed the php file "class-wc-dineromail.php" and put it in classes - Didn't work.

    I'm using woocommerce v 2.0.9

    Do you have any suggestions?

  19. FranciscoAMK
    Member
    Posted 1 year ago #

    Just put the "wc-dineromail" folder into the plugin's root folder, then activate the plugin from the wordpress admin.

    That may work.

  20. V.tine
    Member
    Posted 1 year ago #

    Nope :( It doesn't even appear

  21. mircop
    Member
    Posted 1 year ago #

    hey everyone
    i think i have the same problem but i don´t know.
    if i want to buy someting in my shop and fillup everything shipping information and then i want to choose my payment paypal or something else i can´t tick a payment and i can´t press the buybutton nothing will happen, but if if i press enter in the shipping form and i have only advance payment then everyting is perfect..
    i´m very glad if somebody, will help me!!

  22. lilireed
    Member
    Posted 1 year ago #

    V.tine,
    I am using the last versions of wordpress and woocommerce and it works fine.
    Please check that you inserted the wc-dineromail folder in
    http://www.yoursite.com/wp-content/plugins (not into the woocommerce folder! This is where you may have gone wrong) and that in the php file you have copied the second piece of code that I posted, not the first. Check to see that it is complete. It seems that everything else you have done fine, so once you have copied everything into the plugins folder, it should appear in the list.
    Cheers

    Mircop I think you should start a new thread your issue is different, sorry.

  23. cristianryu
    Member
    Posted 1 year ago #

    Hey folks, for days, I try to solve the problem of DineroMail (they not updated dineromail-WooCommerce program for a long, long time), keeping the story short, they listened to my requests, and finally took the dineromail plugin for WooCommerce users , updated to the latest version.

    But you can only download from the DineroMail website in their forum. There's also a tutorial on how to install the new plugin step by step.

    You will not have to change the code in WooCommerce anymore, just have to install the plugin, write your account details and you are ready to sell.

    Sorry for not posting this earlier, but I forgot to comment to all of you completely.

    regards

    Cristian

  24. lilireed
    Member
    Posted 1 year ago #

    Thanks for that!
    The link so you can download the plugin is
    http://foro.dineromail.com/viewtopic.php?f=48&t=74

  25. leandrohrusso@gmail.com
    Member
    Posted 1 year ago #

    El problema con el plugin nuevo de dineromail es que, si bien permite realizar el pago, no actualizado el estado del pedido. Siempre se mantiene como pendiente... Tiene alguien alguna solucion para eso? Gracias!!!

  26. gadriv
    Member
    Posted 7 months ago #

    Buen dia lilireed
    Necesito ayuda, tengo que integrar la pasarela de pagos V-POST o V-Payment, estoy utilizando el cms de WordPress y el plugin para la tienda es WooCommerce

    Realmente se me dificulta esta serie de cosas porque soy un poco nuevo trabajando con WordPress, y pues no se realmente como hacer estoy, no se que variables llamar o de donde llamarlas, donde colocar el código que voy a hacer.
    Realmente necesito ayuda.

    Nota: El banco que nos dara el servicio es el BNC "Banco Nacional de Costa Rica" y este trabaja con V-POST, ayudenme por favor.

  27. esmi
    Forum Moderator
    Posted 7 months ago #

    @gadriv: If you require assistance then, as per the Forum Welcome, please post your own topic. As these are English language forums, please use English or provide an English translation. Alternatively, use a WP support forum in your language.

  28. gadriv
    Member
    Posted 7 months ago #

    I'm sorry

    Good day lilireed
    I need help, I have to integrate the payment gateway V-POST or V-Payment, I'm using the WordPress cms and plugin for the store is WooCommerce

    It really is difficult for me this series of things because I'm a bit new to work with WordPress, and therefore do not really like I am, do not know what to call variables or where to call, where to place the code that I do.
    I really need help.

    Note: The bank that will give us the service is the BNC "Banco Nacional de Costa Rica" and this works with V-POST, help please.

  29. lilireed
    Member
    Posted 7 months ago #

    Hi Gadriv,

    Sorry, I'm not that good at coding myself, I was able to solve the original issue at the time but finally ended up using MercadoPago as DineroMail was having issues, beyond that, maybe Claudio from http://claudiosmweb.com/ can help you with your issue, as he is the coding expert here(read the whole thread)!

    Cheers

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic