private function completeCF()
 {
     $payDataOperacion = array();
     $payDataOperacion['AMOUNT'] = $this->order->order_total;
     $payDataOperacion['EMAILCLIENTE'] = $this->order->billing_email;
     $payDataOperacion['CSBTCITY'] = $this->getField($this->order->billing_city);
     $payDataOperacion['CSBTCOUNTRY'] = $this->order->billing_country;
     $payDataOperacion['CSBTCUSTOMERID'] = $this->order->customer_user;
     $payDataOperacion['CSBTIPADDRESS'] = $this->order->customer_ip_address;
     $payDataOperacion['CSBTEMAIL'] = $this->order->billing_email;
     $payDataOperacion['CSBTFIRSTNAME'] = $this->order->billing_first_name;
     $payDataOperacion['CSBTLASTNAME'] = $this->order->billing_last_name;
     $payDataOperacion['CSBTPOSTALCODE'] = $this->order->billing_postcode;
     $payDataOperacion['CSBTPHONENUMBER'] = phone::clean($this->order->billing_phone);
     $payDataOperacion['CSBTSTATE'] = $this->_getStateCode($this->order->billing_state);
     $payDataOperacion['CSBTSTREET1'] = $this->order->billing_address_1;
     //$payDataOperacion['CSBTSTREET2'] = $this->order->billing_address_2;
     $payDataOperacion['CSPTCURRENCY'] = "ARS";
     $payDataOperacion['CSPTGRANDTOTALAMOUNT'] = number_format($payDataOperacion['AMOUNT'], 2, ".", "");
     //$payDataOperacion['CSMDD6'] = $this->config->get('canaldeingresodelpedido');
     if (!empty($this->customer)) {
         //CSMDD7 - Fecha Registro Comprador (num Dias) - ver que pasa si es guest
         $payDataOperacion['CSMDD7'] = $this->_getDateTimeDiff($this->customer->data->user_registered);
         //CSMDD8 - Usuario Guest? (S/N). En caso de ser Y, el campo CSMDD9 no deber´ enviarse
         $payDataOperacion['CSMDD8'] = "S";
         //CSMDD9 - Customer password Hash: criptograma asociado al password del comprador final
         $payDataOperacion['CSMDD9'] = $this->customer->data->user_pass;
     } else {
         $payDataOperacion['CSMDD8'] = "N";
     }
     return $payDataOperacion;
 }
 protected function completeCFVertical()
 {
     $payDataOperacion = array();
     $this->logger->debug("CSSTCITY - Ciudad de envío de la orden");
     $payDataOperacion['CSSTCITY'] = $this->getField(empty($this->order['shipping_city']) ? $this->order['payment_city'] : $this->order['shipping_city']);
     $this->logger->debug("CSSTCOUNTRY País de envío de la orden");
     $payDataOperacion['CSSTCOUNTRY'] = $this->getField(empty($this->order['shipping_iso_code_2']) ? $this->order['payment_iso_code_2'] : $this->order['shipping_iso_code_2']);
     $this->logger->debug("CSSTEMAIL Mail del destinatario");
     $payDataOperacion['CSSTEMAIL'] = $this->getField($this->order['email']);
     $this->logger->debug("CSSTFIRSTNAME Nombre del destinatario");
     $payDataOperacion['CSSTFIRSTNAME'] = $this->getField(empty($this->order['shipping_firstname']) ? $this->order['payment_firstname'] : $this->order['shipping_firstname']);
     $this->logger->debug("CSSTLASTNAME Apellido del destinatario");
     $payDataOperacion['CSSTLASTNAME'] = $this->getField(empty($this->order['shipping_lastname']) ? $this->order['payment_lastname'] : $this->order['shipping_lastname']);
     $this->logger->debug("CSSTPHONENUMBER Número de teléfono del destinatario");
     $payDataOperacion['CSSTPHONENUMBER'] = phone::clean($this->getField($this->order['telephone']));
     $this->logger->debug("CSSTPOSTALCODE Código postal del domicilio de envío");
     $payDataOperacion['CSSTPOSTALCODE'] = $this->getField(empty($this->order['shipping_postcode']) ? $this->order['payment_postcode'] : $this->order['shipping_postcode']);
     $this->logger->debug("CSSTSTATE Provincia de envacute;o");
     $payDataOperacion['CSSTSTATE'] = $this->getField(empty($this->order['shipping_zone_cs_code']) ? $this->order['payment_zone_cs_code'] : $this->order['shipping_zone_cs_code']);
     $this->logger->debug("CSSTSTREET1 Domicilio de envío");
     $payDataOperacion['CSSTSTREET1'] = $this->getField(empty($this->order['shipping_address_1']) ? $this->order['payment_address_1'] : $this->order['shipping_address_1']);
     //$paydata_operation['CSSSTREET2'] = $this->getField($this->order['shipping_city']);
     $this->logger->debug("CSMDD12 Shipping DeadLine (Num Dias)");
     $paydata_operation['CSMDD12'] = $this->model->getDeadLine();
     $this->logger->debug("CSMDD13 Método de Despacho");
     $payDataOperacion['CSMDD13'] = $this->getField($this->order['shipping_method']);
     $this->logger->debug("CSMDD14 Customer requires Tax Bill ? (S/N) No");
     //$payData ['CSMDD14'] = "";
     $this->logger->debug("CSMDD15 Customer Loyality Number No");
     //$payData ['CSMDD15'] = "";
     $this->logger->debug("CSMDD16 Promotional / Coupon Code");
     $payDataOperacion['CSMDD16'] = $this->getField($this->order['coupon_code']);
     $payDataOperacion = array_merge($this->getMultipleProductsInfo(), $payDataOperacion);
     return $payDataOperacion;
 }
Beispiel #3
0
 protected function completeCFVertical()
 {
     $payDataOperacion = array();
     $payDataOperacion['CSSTCITY'] = $this->getField($this->order->shipping_city);
     $payDataOperacion['CSSTCOUNTRY'] = $this->getField($this->order->shipping_country);
     $payDataOperacion['CSSTEMAIL'] = $this->getField($this->order->billing_email);
     //Woo con contempla mail de envío
     $payDataOperacion['CSSTFIRSTNAME'] = $this->getField($this->order->shipping_first_name);
     if (empty($payDataOperacion['CSSTFIRSTNAME'])) {
         $payDataOperacion['CSSTFIRSTNAME'] = $this->getField($this->order->billing_first_name);
     }
     $payDataOperacion['CSSTLASTNAME'] = $this->getField($this->order->shipping_last_name);
     if (empty($payDataOperacion['CSSTLASTNAME'])) {
         $payDataOperacion['CSSTLASTNAME'] = $this->getField($this->order->billing_last_name);
     }
     $payDataOperacion['CSSTPHONENUMBER'] = $this->getField(phone::clean($this->order->shipping_phone));
     $payDataOperacion['CSSTPOSTALCODE'] = $this->getField($this->order->shipping_postcode);
     $payDataOperacion['CSSTSTATE'] = $this->_getStateCode($this->order->shipping_state);
     $payDataOperacion['CSSTSTREET1'] = $this->getField($this->order->billing_address_1);
     //$payDataOperacion['CSMDD12'] = Mage::getStoreConfig('payment/modulodepago2/cs_deadline');
     //$payDataOperacion['CSMDD13'] = $this->getField($this->order->getShippingDescription());
     //$payData ['CSMDD14'] = "";
     //$payData ['CSMDD15'] = "";
     //$payDataOperacion ['CSMDD16'] = $this->getField($this->order->getCuponCode());
     $payDataOperacion = array_merge($this->getMultipleProductsInfo(), $payDataOperacion);
     return $payDataOperacion;
 }
 private function completeCF()
 {
     $payDataOperacion = array();
     $billingAdress = $this->order['payment_city'];
     $this->logger->debug("CSBTCITY - Ciudad de facturación");
     $payDataOperacion['CSBTCITY'] = $this->getField($this->order['payment_city']);
     $this->logger->debug(" CSBTCOUNTRY - país de facturación (ver si magento utiliza Código ISO)");
     $payDataOperacion['CSBTCOUNTRY'] = $this->order['payment_iso_code_2'];
     $this->logger->debug(" CSBTCUSTOMERID - identificador del usuario (no correo electronico)");
     $payDataOperacion['CSBTCUSTOMERID'] = $this->order['customer_id'];
     if ($payDataOperacion['CSBTCUSTOMERID'] == "" or $payDataOperacion['CSBTCUSTOMERID'] == null) {
         $payDataOperacion['CSBTCUSTOMERID'] = "guest" . date("ymdhs");
     }
     $this->logger->debug(" CSBTIPADDRESS - ip de la pc del comprador");
     $payDataOperacion['CSBTIPADDRESS'] = $this->order['ip'] == '::1' ? '127.0.0.1' : $this->order['ip'];
     $this->logger->debug(" CSBTEMAIL - email del usuario al que se le emite la factura");
     $payDataOperacion['CSBTEMAIL'] = $this->getField($this->order['email']);
     $this->logger->debug(" CSBTFIRSTNAME - nombre de usuario el que se le emite la factura");
     $payDataOperacion['CSBTFIRSTNAME'] = $this->getField($this->order['payment_firstname']);
     $this->logger->debug(" CSBTLASTNAME - Apellido del usuario al que se le emite la factura");
     $payDataOperacion['CSBTLASTNAME'] = $this->getField($this->order['payment_lastname']);
     $this->logger->debug(" CSBTPOSTALCODE - Código Postal de la dirección de facturación");
     $payDataOperacion['CSBTPOSTALCODE'] = $this->getField($this->order['payment_postcode']);
     $this->logger->debug(" CSBTPHONENUMBER - Teléfono del usuario al que se le emite la factura. No utilizar guiones, puntos o espacios. Incluir código de país");
     $payDataOperacion['CSBTPHONENUMBER'] = phone::clean($this->getField($this->order['telephone']));
     $this->logger->debug(" CSBTSTATE - Provincia de la dirección de facturación");
     $payDataOperacion['CSBTSTATE'] = $this->order['payment_zone_cs_code'];
     $this->logger->debug(" CSBTSTREET1 - Domicilio de facturación (calle y nro)");
     $payDataOperacion['CSBTSTREET1'] = $this->getField($this->order['payment_address_1']);
     //$this->logger->debug(" CSBTSTREET2 - Complemento del domicilio. (piso, departamento)_ No Mandatorio");
     //$payDataOperacion ['CSBTSTREET2'] = $this->getField($this->order['payment_address_2']);
     $this->logger->debug(" CSPTCURRENCY- moneda");
     $payDataOperacion['CSPTCURRENCY'] = "ARS";
     $this->logger->debug(" CSPTGRANDTOTALAMOUNT - 999999[.CC] Con decimales opcional usando el puntos como separador de decimales. No se permiten comas, ni como separador de miles ni como separador de decimales.");
     $payDataOperacion['CSPTGRANDTOTALAMOUNT'] = number_format($this->order['total'], 2, ".", "");
     //$this->logger->debug(" CSMDD6 - Canal de venta");
     //$payDataOperacion ['CSMDD6'] = $this->config->get('canaldeingresodelpedido');
     if (!empty($this->customer)) {
         $this->logger->debug(" CSMDD7 - Fecha Registro Comprador (num Dias) - ver que pasa si es guest");
         $payDataOperacion['CSMDD7'] = $this->getDaysQty($this->customer['date_added']);
         $this->logger->debug(" CSMDD8 - Usuario Guest? (S/N). En caso de ser Y, el campo CSMDD9 no deber´ enviarse");
         $payDataOperacion['CSMDD8'] = "S";
         $this->logger->debug(" CSMDD9 - Customer password Hash: criptograma asociado al password del comprador final");
         $payDataOperacion['CSMDD9'] = $this->getField($this->customer['password']);
         $payDataOperacion['CSMDD10'] = $this->model->getQtyOrders($this->customer['customer_id']);
     } else {
         $payDataOperacion['CSMDD8'] = "N";
     }
     $this->logger->debug(" CSMDD11 Customer Cell Phone");
     $payDataOperacion['CSMDD11'] = phone::clean($this->getField($this->order['telephone']));
     return $payDataOperacion;
 }
 private function completeCF()
 {
     $payDataOperacion = array();
     $billingAdress = $this->order->billing;
     $this->logger->info("Completando parámetros de cotrol de fraude");
     $this->logger->debug("CSBTCITY - Ciudad de facturación");
     $payDataOperacion['CSBTCITY'] = $this->getField($billingAdress['state']);
     $this->logger->debug(" CSBTCOUNTRY - país de facturación");
     $payDataOperacion['CSBTCOUNTRY'] = $billingAdress['country']['iso_code_2'];
     $this->logger->debug(" CSBTCUSTOMERID - identificador del usuario (no correo electronico)");
     $payDataOperacion['CSBTCUSTOMERID'] = $this->order->customer_aditional_info['customer_id'];
     //		if($payDataOperacion ['CSBTCUSTOMERID']=="" or $payDataOperacion ['CSBTCUSTOMERID']==null)
     //		{
     //			$payDataOperacion ['CSBTCUSTOMERID']= "guest".date("ymdhs");
     //		}
     $this->logger->debug(" CSBTIPADDRESS - ip de la pc del comprador");
     $payDataOperacion['CSBTIPADDRESS'] = $this->_get_todo_pago_client_ip();
     $this->logger->debug(" CSBTEMAIL - email del usuario al que se le emite la factura");
     $payDataOperacion['CSBTEMAIL'] = $this->getField($this->order->customer['email_address']);
     $this->logger->debug(" CSBTFIRSTNAME - nombre de usuario el que se le emite la factura");
     $payDataOperacion['CSBTFIRSTNAME'] = $this->getField($this->order->customer['firstname']);
     $this->logger->debug(" CSBTLASTNAME - Apellido del usuario al que se le emite la factura");
     $payDataOperacion['CSBTLASTNAME'] = $this->getField($this->order->customer['lastname']);
     $this->logger->debug(" CSBTPOSTALCODE - Código Postal de la dirección de facturación");
     $payDataOperacion['CSBTPOSTALCODE'] = $this->getField($this->order->customer['postcode']);
     $this->logger->debug(" CSBTPHONENUMBER - Teléfono del usuario al que se le emite la factura. No utilizar guiones, puntos o espacios. Incluir código de país");
     $payDataOperacion['CSBTPHONENUMBER'] = phone::clean($this->getField($this->order->customer['telephone']), $this->logger);
     $this->logger->debug(" CSBTSTATE - Provincia de la dirección de facturación (hay que cambiar esto!!! por datos hacepatdos por el gateway)");
     $payDataOperacion['CSBTSTATE'] = $billingAdress['tp_state'];
     $this->logger->debug(" CSBTSTREET1 - Domicilio de facturación (calle y nro)");
     $payDataOperacion['CSBTSTREET1'] = $this->getField($this->order->customer['street_address']);
     //$this->logger->debug(" CSBTSTREET2 - Complemento del domicilio. (piso, departamento)_ No Mandatorio");
     //$payDataOperacion ['CSBTSTREET2'] = $this->getField($billingAdress->getStreet2());
     $this->logger->debug(" CSPTCURRENCY- moneda");
     $payDataOperacion['CSPTCURRENCY'] = $this->getField($this->order->info['currency']);
     $this->logger->debug(" CSPTGRANDTOTALAMOUNT - 999999[.CC] Con decimales opcional usando el puntos como separador de decimales. No se permiten comas, ni como separador de miles ni como separador de decimales.");
     $payDataOperacion['CSPTGRANDTOTALAMOUNT'] = number_format($this->order->info['total'], '2', '.', '');
     //$this->logger->debug(" CSMDD6 - Canal de venta");
     //$payDataOperacion ['CSMDD6'] = Mage::getStoreConfig('payment/modulodepago2/cs_canaldeventa');
     $this->logger->debug(" CSMDD7 - Fecha Registro Comprador (num Dias) - ver que pasa si es guest");
     $payDataOperacion['CSMDD7'] = $this->_getDaysQty($this->order->aditional_info['date_creation']);
     $this->logger->debug(" CSMDD8 - Usuario Guest? (Y/N). En caso de ser Y, el campo CSMDD9 no deberá enviarse");
     $payDataOperacion['CSMDD8'] = "N";
     $this->logger->debug(" CSMDD9 - Customer password Hash: criptograma asociado al password del comprador final");
     $payDataOperacion['CSMDD9'] = $this->order->customer_aditional_info['password'];
     $payDataOperacion['CSMDD10'] = $this->order->customer_aditional_info['orders_qty'];
     $this->logger->debug(" CSMDD11 Customer Cell Phone");
     $payDataOperacion['CSMDD11'] = phone::clean($this->order->customer['telephone'], $this->logger);
     return $payDataOperacion;
 }
Beispiel #6
0
 protected function completeCFVertical()
 {
     $payDataOperacion = array();
     $payDataOperacion['CSSTCITY'] = $this->getField($this->order->delivery['city']);
     $payDataOperacion['CSSTCOUNTRY'] = $this->getField($this->order->delivery['country']['iso_code_2']);
     $payDataOperacion['CSSTEMAIL'] = $this->order->customer['email_address'];
     $payDataOperacion['CSSTFIRSTNAME'] = $this->getField($this->order->delivery['firstname']);
     $payDataOperacion['CSSTLASTNAME'] = $this->getField($this->order->delivery['lastname']);
     $payDataOperacion['CSSTPHONENUMBER'] = phone::clean($this->order->customer['telephone']);
     $payDataOperacion['CSSTPOSTALCODE'] = $this->getField($this->order->delivery['postcode']);
     $payDataOperacion['CSSTSTATE'] = $this->getField($this->order->delivery['country']['iso_code_2']);
     $payDataOperacion['CSSTSTREET1'] = $this->getField($this->order->delivery['street_address']);
     //$payDataOperacion['CSMDD12'] = Mage::getStoreConfig('payment/modulodepago2/cs_deadline');
     //$payDataOperacion['CSMDD13'] = $this->getField($this->order->getShippingDescription());
     //$payData['CSMDD14'] = "";
     //$payData['CSMDD15'] = "";
     //$payDataOperacion['CSMDD16'] = $this->getField($this->order->getCuponCode());
     $payDataOperacion = array_merge($this->getMultipleProductsInfo(), $payDataOperacion);
     return $payDataOperacion;
 }
 protected function completeCFVertical()
 {
     $payDataOperacion = array();
     $shippingAdress = $this->order->delivery;
     $this->config = $this->_get_tp_configuracion();
     $this->logger->info("Parámetros para retail");
     $this->logger->debug("CSSTCITY - Ciudad de envío de la orden");
     $payDataOperacion['CSSTCITY'] = $this->getField($shippingAdress['city']);
     $this->logger->debug("CSSTCOUNTRY País de envío de la orden");
     $payDataOperacion['CSSTCOUNTRY'] = $this->getField($shippingAdress['country']['iso_code_2']);
     $this->logger->debug("CSSTEMAIL Mail del destinatario");
     $payDataOperacion['CSSTEMAIL'] = $this->getField($this->customer['email_address']);
     $this->logger->debug("CSSTFIRSTNAME Nombre del destinatario");
     $payDataOperacion['CSSTFIRSTNAME'] = $this->getField($shippingAdress['firstname']);
     $this->logger->debug("CSSTLASTNAME Apellido del destinatario");
     $payDataOperacion['CSSTLASTNAME'] = $this->getField($shippingAdress['lastname']);
     $this->logger->debug("CSSTPHONENUMBER Número de teléfono del destinatario");
     $payDataOperacion['CSSTPHONENUMBER'] = phone::clean($this->getField($this->customer['telephone']), $this->logger);
     $this->logger->debug("CSSTPOSTALCODE Código postal del domicilio de envío");
     $payDataOperacion['CSSTPOSTALCODE'] = $this->getField($shippingAdress['postcode']);
     $this->logger->debug("CSSTSTATE Provincia de envacute;o");
     $payDataOperacion['CSSTSTATE'] = $shippingAdress['tp_state'];
     $this->logger->debug("CSSTSTREET1 Domicilio de envío");
     $payDataOperacion['CSSTSTREET1'] = $this->getField($shippingAdress['street_address']);
     $this->logger->debug("CSMDD12 Shipping DeadLine (Num Dias)");
     $payDataOperacion['CSMDD12'] = $this->config['deadline'];
     $this->logger->debug("CSMDD13 Método de Despacho");
     $payDataOperacion['CSMDD13'] = $this->getField($this->order->info['shipping_method']);
     // $this->logger->debug("CSMDD14 Customer requires Tax Bill ? (Y/N) No");
     //$payData ['CSMDD14'] = "";
     //$this->logger->debug("CSMDD15 Customer Loyality Number No");
     //$payData ['CSMDD15'] = "";
     //$this->logger->debug("CSMDD16 Promotional / Coupon Code");
     // $payDataOperacion ['CSMDD16'] = $this->getField($this->order->getCuponCode());
     //OsCommerce no trae la posibilidad de usar cupones nativamente, solo se puede hacer adicionando  plugins
     $payDataOperacion = array_merge($this->getMultipleProductsInfo(), $payDataOperacion);
     return $payDataOperacion;
 }
 private function completeCF()
 {
     $payDataOperacion = array();
     $payDataOperacion['AMOUNT'] = strval($this->order->info['total']);
     //Revisar
     $payDataOperacion['EMAILCLIENTE'] = $this->order->customer['email_address'];
     $payDataOperacion['CSBTCITY'] = $this->getField($this->order->billing['city']);
     $payDataOperacion['CSBTCOUNTRY'] = $this->order->billing['country']['iso_code_2'];
     $payDataOperacion['CSBTCUSTOMERID'] = $this->customer_id;
     $payDataOperacion['CSBTIPADDRESS'] = $this->get_todo_pago_client_ip();
     $payDataOperacion['CSBTEMAIL'] = $this->order->customer['email_address'];
     $payDataOperacion['CSBTFIRSTNAME'] = $this->order->billing['firstname'];
     $payDataOperacion['CSBTLASTNAME'] = $this->order->billing['lastname'];
     $payDataOperacion['CSBTPOSTALCODE'] = $this->order->billing['postcode'];
     $payDataOperacion['CSBTPHONENUMBER'] = phone::clean($this->order->customer['telephone']);
     $payDataOperacion['CSBTSTATE'] = $this->getStateCode($this->order->billing['state']);
     $payDataOperacion['CSBTSTREET1'] = $this->order->billing['street_address'];
     //$payDataOperacion ['CSBTSTREET2'] = $this->order->billing_address_2;
     $payDataOperacion['CSPTCURRENCY'] = "ARS";
     $payDataOperacion['CSPTGRANDTOTALAMOUNT'] = number_format($payDataOperacion['AMOUNT'], 2, ".", "");
     if (!empty($this->customer)) {
         //CSMDD7 - Fecha Registro Comprador (num Dias) - ver que pasa si es guest");
         $payDataOperacion['CSMDD7'] = $this->getDaysQty($this->customer['date_added']);
         //CSMDD8 - Usuario Guest? (S/N). En caso de ser Y, el campo CSMDD9 no deber´ enviarse");
         $payDataOperacion['CSMDD8'] = "S";
         //Customer password Hash: criptograma asociado al password del comprador final");
         $payDataOperacion['CSMDD9'] = $this->customer['password'];
         //Histórica de compras del comprador (Num transacciones).
         $payDataOperacion['CSMDD10'] = $this->getQtyOrders($this->customer['customer_id']);
     } else {
         $payDataOperacion['CSMDD8'] = "N";
     }
     //$this->log->writeTP(" CSMDD11 Customer Cell Phone");
     //$payDataOperacion['CSMDD11'] = phone::clean($this->order['telephone']);
     return $payDataOperacion;
 }