当前位置: 首页>>代码示例>>PHP>>正文


PHP PagSeguroLibrary::setModuleVersion方法代码示例

本文整理汇总了PHP中PagSeguroLibrary::setModuleVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP PagSeguroLibrary::setModuleVersion方法的具体用法?PHP PagSeguroLibrary::setModuleVersion怎么用?PHP PagSeguroLibrary::setModuleVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PagSeguroLibrary的用法示例。


在下文中一共展示了PagSeguroLibrary::setModuleVersion方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setPagSeguroConfig

 /**
  * Set Config's to PagSeguro API
  */
 private function setPagSeguroConfig()
 {
     $activeLog = $this->getConfigData('log');
     $charset = $this->getConfigData('charset');
     //Module version
     PagSeguroLibrary::setModuleVersion('magento' . ':' . Mage::helper('pagseguro')->getVersion());
     //CMS version
     PagSeguroLibrary::setCMSVersion('magento' . ':' . Mage::getVersion());
     //Setup Charset
     if ($charset != null and !empty($charset)) {
         PagSeguroConfig::setApplicationCharset($charset);
     }
     //Setup Log
     if ($activeLog == 1) {
         $logFile = $this->getConfigData('log_file');
         if (self::checkFile(Mage::getBaseDir() . '/' . $logFile)) {
             PagSeguroConfig::activeLog(Mage::getBaseDir() . '/' . $logFile);
         } else {
             PagSeguroConfig::activeLog();
             //Default Log
         }
     }
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:26,代码来源:PaymentMethod.php

示例2: _retrievePagSeguroModuleVersion

 /**
  * Retrieve PagSeguro osCommerce module version
  */
 private function _retrievePagSeguroModuleVersion()
 {
     PagSeguroLibrary::setModuleVersion('opencart' . ':' . $this->api_version);
 }
开发者ID:vidaecor,项目名称:opencart,代码行数:7,代码来源:pagseguro.php

示例3: payment

 /**
  * Use PagSeguroLibrary
  * 
  * @param type $order_id
  * @return type
  */
 public function payment($order)
 {
     global $woocommerce;
     // Instantiate a new payment request
     $paymentRequest = new PagSeguroPaymentRequest();
     // Set cms version
     PagSeguroLibrary::setCMSVersion('woocommerce-v.' . $woocommerce->version);
     // Set plugin version
     PagSeguroLibrary::setModuleVersion('woocommerce-v.' . $this->plugin_version);
     // Set charset
     PagSeguroConfig::setApplicationCharset($this->charset);
     // Sets the currency
     $paymentRequest->setCurrency(PagSeguroCurrencies::getIsoCodeByName("REAL"));
     // Set a reference
     $paymentRequest->setReference($this->invoice_prefix . $order->id);
     //Sets shipping data
     $paymentRequest->setShippingAddress($order->billing_postcode, $order->billing_address_1, '', $order->billing_address_2, '', $order->billing_city, $order->billing_state, $order->billing_country);
     $paymentRequest->setShippingCost($order->order_shipping);
     $paymentRequest->setShippingType(PagSeguroShippingType::getCodeByType('NOT_SPECIFIED'));
     // Sets your customer information.
     $paymentRequest->setSender($order->billing_first_name . ' ' . $order->billing_last_name, $order->billing_email, substr($order->billing_phone, 0, 2), substr($order->billing_phone, 2));
     // Sets the url used by PagSeguro for redirect user after ends checkout process
     if (!empty($this->url_redirect)) {
         $paymentRequest->setRedirectUrl($this->url_redirect);
     } else {
         $paymentRequest->setRedirectUrl($this->get_return_url($order));
     }
     // Sets the url used by PagSeguro for redirect user after ends checkout process
     if (!empty($this->url_notification)) {
         $paymentRequest->setNotificationURL($this->url_notification);
     } else {
         $paymentRequest->setNotificationURL(home_url() . '/index.php?notificationurl=true');
     }
     //Sets Items
     if (sizeof($order->get_items()) > 0) {
         $paymentRequest->setItems($this->setItems($order));
     }
     // Sets the sum of discounts
     $paymentRequest->setExtraAmount(($order->order_discount + $order->cart_discount) * -1 + ($order->order_tax + $order->order_shipping_tax + $order->prices_include_tax));
     try {
         $credentials = new PagSeguroAccountCredentials($this->email, $this->token);
         return $paymentRequest->register($credentials);
     } catch (PagSeguroServiceException $e) {
         $woocommerce->add_error(__('Sorry, unfortunately there was an error during checkout. Please contact the store administrator if the problem persists.', 'wpwcpagseguro'));
         $woocommerce->show_messages();
         wp_die();
     }
 }
开发者ID:moterra,项目名称:woocommerce,代码行数:54,代码来源:wpwcpagseguro.php

示例4: _setPagSeguroModuleVersion

 /**
  * Set PagSeguro PrestaShop module version
  */
 private function _setPagSeguroModuleVersion()
 {
     PagSeguroLibrary::setModuleVersion('prestashop-v.' . $this->module->version);
 }
开发者ID:ventsiwad,项目名称:presta_addons,代码行数:7,代码来源:validation.php

示例5: _setPagSeguroModuleVersion

 /**
  * Sets PagSeguro plugin version
  */
 private function _setPagSeguroModuleVersion()
 {
     PagSeguroLibrary::setModuleVersion('hikashop' . ':1.0');
 }
开发者ID:HikaShop,项目名称:hikashoppayment-pagseguro,代码行数:7,代码来源:pagseguro.php

示例6: _setPagSeguroModuleVersion

 /**
  * Sets PagSeguro plugin version
  */
 private function _setPagSeguroModuleVersion()
 {
     PagSeguroLibrary::setModuleVersion('virtuemart' . ':' . self::$_pluginVersion);
 }
开发者ID:saper,项目名称:organic-extensions,代码行数:7,代码来源:pagseguro.patch.php

示例7: setPagSeguroConfig

 /**
  * Set Config's to PagSeguro API
  *
  */
 private function setPagSeguroConfig()
 {
     $_activeLog = $this->getConfigData('log');
     $_charset = $this->getConfigData('charset');
     Mage::getSingleton('PagSeguro_PagSeguro_Helper_Data')->saveAllStatusPagSeguro();
     //Module version
     PagSeguroLibrary::setModuleVersion('magento' . ':' . $this->Module_Version);
     //CMS version
     PagSeguroLibrary::setCMSVersion('magento' . ':' . Mage::getVersion());
     //Setup Charset
     if ($_charset != null and !empty($_charset)) {
         PagSeguroConfig::setApplicationCharset($_charset);
     }
     //Setup Log
     if ($_activeLog == 1) {
         $_log_file = $this->getConfigData('log_file');
         if (self::checkFile(Mage::getBaseDir() . '/' . $_log_file)) {
             PagSeguroConfig::activeLog(Mage::getBaseDir() . '/' . $_log_file);
         } else {
             PagSeguroConfig::activeLog();
             //Default Log
         }
     }
 }
开发者ID:danielwalterrodrigues,项目名称:asus,代码行数:28,代码来源:PaymentMethod.php


注:本文中的PagSeguroLibrary::setModuleVersion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。