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


PHP Varien_Object::getCcType方法代码示例

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


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

示例1: importLegacyData

 /**
  * Try to create a card record from legacy data.
  */
 public function importLegacyData(Varien_Object $payment)
 {
     // Customer ID -- pull from customer if possible, otherwise go to Authorize.Net.
     if ($this->getCustomer()->getAuthnetcimProfileId() != '') {
         $this->setProfileId($this->getCustomer()->getAuthnetcimProfileId());
     } else {
         $this->_createCustomerProfile();
     }
     // Payment ID -- pull from order if possible.
     $this->setPaymentId($payment->getOrder()->getExtCustomerId());
     if ($this->getProfileId() == '' || $this->getPaymentId() == '') {
         Mage::helper('tokenbase')->log($this->getMethod(), 'Authorize.Net CIM: Unable to covert legacy data for processing. Please seek support.');
         Mage::throwException(Mage::helper('tokenbase')->__('Authorize.Net CIM: Unable to covert legacy data for processing. Please seek support.'));
     }
     if ($payment->getCcType() != '') {
         $this->setAdditional('cc_type', $payment->getCcType());
     }
     if ($payment->getCcLast4() != '') {
         $this->setAdditional('cc_last4', $payment->getCcLast4());
     }
     if ($payment->getCcExpYear() > date('Y') || $payment->getCcExpYear() == date('Y') && $payment->getCcExpMonth() >= date('n')) {
         $this->setAdditional('cc_exp_year', $payment->getCcExpYear())->setAdditional('cc_exp_month', $payment->getCcExpMonth())->setExpires(sprintf("%s-%s-%s 23:59:59", $payment->getCcExpYear(), $payment->getCcExpMonth(), date('t', strtotime($payment->getCcExpYear() . '-' . $payment->getCcExpMonth()))));
     }
     return $this;
 }
开发者ID:billadams,项目名称:forever-frame,代码行数:28,代码来源:Card.php

示例2: order

 public function order(Varien_Object $payment, $amount)
 {
     $order = $payment->getOrder();
     $order_id = $order->getId();
     $order_increment_id = $order->getIncrementId();
     $store_id = $order->getStoreId();
     $ccType = $payment->getCcType();
     // reorder
     $reorder_increment_id = explode('-', $order_increment_id);
     // reorder
     $order_increment_id = $reorder_increment_id[0];
     $order_suffix_id = @$reorder_increment_id[1];
     $expiration = strtotime('+' . $this->_getStoreConfig($ccType, 'expiration') . 'days');
     $transaction_expiration = date('Y-m-d', $expiration);
     $increment = $this->_getStoreConfig('slips', 'order_id_increment');
     $order_increment_prefix = $this->_getOrderIncrementPrefix($store_id);
     $number = $order_increment_id - $order_increment_prefix;
     if (!empty($order_suffix_id)) {
         $number *= pow(10, strlen($order_suffix_id));
         $number += $order_suffix_id;
     }
     $number += $increment;
     $data = array('order_id' => $order_id, 'amount' => $amount, 'expiration' => $transaction_expiration, 'number' => $number);
     $result = Mage::getModel('utils/sql')->insert('gamuza_slips_transactions', $data);
     if (!$result) {
         Mage::throwException(Mage::helper('slips')->__('Unable to save the Slip and Deposit informations. Please verify your database.'));
     }
     $this->setStore($payment->getOrder()->getStoreId());
     $payment->setAmount($amount);
     $payment->setLastTransId($order_id);
     $payment->setStatus(self::STATUS_APPROVED);
     return $this;
 }
开发者ID:Hospeed,项目名称:gamuza_slips-magento,代码行数:33,代码来源:Standard.php

示例3: assignData

 /**
  * Assign data to info model instance
  *
  * @param   mixed $data
  * @return  Mage_Payment_Model_Info
  */
 public function assignData($data)
 {
     if (!$data instanceof Varien_Object) {
         $data = new Varien_Object($data);
     }
     // salva a bandeira, o numero de parcelas e o token
     $info = $this->getInfoInstance();
     $additionaldata = array('parcels_number' => $data->getParcelsNumber());
     if ($data->getToken()) {
         $tokenData = $this->_getTokenById($data->getToken());
         $additionaldata['token'] = $tokenData['token'];
         $data->setCcType($tokenData['ccType']);
     }
     $info->setCcType($data->getCcType())->setCcNumber(Mage::helper('core')->encrypt($data->getCcNumber()))->setCcOwner($data->getCcOwner())->setCcExpMonth($data->getCcExpMonth())->setCcExpYear($data->getCcExpYear())->setCcCid(Mage::helper('core')->encrypt($data->getCcCid()))->setAdditionalData(serialize($additionaldata));
     // pega dados de juros
     $withoutInterest = intval($this->getConfigData('installment_without_interest', $this->getStoreId()));
     $interestValue = floatval($this->getConfigData('installment_interest_value', $this->getStoreId()));
     // verifica se há juros
     if ($data->getParcelsNumber() > $withoutInterest) {
         $installmentValue = Mage::helper('Query_Cielo')->calcInstallmentValue($info->getQuote()->getGrandTotal(), $interestValue / 100, $data->getParcelsNumber());
         $installmentValue = round($installmentValue, 2);
         $interest = $installmentValue * $data->getParcelsNumber() - $info->getQuote()->getGrandTotal();
         $info->getQuote()->setInterest($info->getQuote()->getStore()->convertPrice($interest, false));
         $info->getQuote()->setBaseInterest($interest);
         $info->getQuote()->setTotalsCollectedFlag(false)->collectTotals();
         $info->getQuote()->save();
     } else {
         $info->getQuote()->setInterest(0.0);
         $info->getQuote()->setBaseInterest(0.0);
         $info->getQuote()->setTotalsCollectedFlag(false)->collectTotals();
         $info->getQuote()->save();
     }
     return $this;
 }
开发者ID:brunowd,项目名称:magento-cielo,代码行数:40,代码来源:Cc.php

示例4: assignData

 /**
  * Assign data to info model instance
  *
  * @param   mixed $data
  * @return  Mage_Payment_Model_Info
  */
 public function assignData($data)
 {
     if (!$data instanceof Varien_Object) {
         $data = new Varien_Object($data);
     }
     // salva a bandeira
     $info = $this->getInfoInstance();
     // converte nomenclatura da bandeira
     if ($data->getCcType() == "visa-electron") {
         $cardType = "visa";
     } else {
         $cardType = $data->getCcType();
     }
     $info->setCcType($cardType)->setCcNumber(Mage::helper('core')->encrypt($data->getCcNumber()))->setCcOwner($data->getCcOwner())->setCcExpMonth($data->getCcExpMonth())->setCcExpYear($data->getCcExpYear())->setCcCid(Mage::helper('core')->encrypt($data->getCcCid()));
     return $this;
 }
开发者ID:danielwalterrodrigues,项目名称:asus,代码行数:22,代码来源:Dc.php

示例5: order

 public function order(Varien_Object $payment, $amount)
 {
     $order = $payment->getOrder();
     $order_id = $order->getId();
     $order_increment_id = $order->getIncrementId();
     $quote = $order->getQuote();
     $store_id = $order->getStoreId();
     $ccType = $payment->getCcType();
     // reorder
     $reorder_increment_id = explode('-', $order_increment_id);
     // reorder
     $order_increment_id = $reorder_increment_id[0];
     $order_suffix_id = @$reorder_increment_id[1];
     $code = $this->_getStoreConfig('settings/code');
     $key = $this->_getStoreConfig('settings/key');
     $obs = $this->_getStoreConfig('settings/obs');
     $obsadd1 = $this->_getStoreConfig('settings/obsadd1');
     $obsadd2 = $this->_getStoreConfig('settings/obsadd2');
     $obsadd3 = $this->_getStoreConfig('settings/obsadd3');
     $tax_vat = $order->getCustomerTaxvat();
     $address = $quote->getBillingAddress();
     $name = $address->getName();
     list($street1, $street2) = $this->_getSplittedStreet($address, $store_id);
     $postcode = $address->getPostcode();
     $city = $address->getCity();
     $region = $address->getRegion();
     $expiration = strtotime('+' . $this->_getStoreConfig('settings/expiration') . 'days');
     $bank_expiration = date('dmY', $expiration);
     $transaction_expiration = date('Y-m-d', $expiration);
     $return_url = $this->_getStoreConfig('settings/return_url');
     $increment = $this->_getStoreConfig('settings/order_id_increment');
     $order_increment_prefix = $this->_getOrderIncrementPrefix($store_id);
     $number = $order_increment_id - $order_increment_prefix;
     if (!empty($order_suffix_id)) {
         $number *= pow(10, strlen($order_suffix_id));
         $number += $order_suffix_id;
     }
     $number += $increment;
     $short_number = substr($number, -8);
     /* Order number max. length for ItauShopLine */
     $submit_dc = Mage::getModel('itaushopline/itaucripto')->geraDados($code, $short_number, str_replace('.', "", number_format($amount, 2, ',', '.')), $obs, $key, $name, '01', $tax_vat, $street1, $street2, $postcode, $city, $region, $bank_expiration, $return_url, $obsadd1, $obsadd2, $obsadd3);
     if (strlen($submit_dc) < self::ITAU_SHOPLINE_SUBMIT_TRANSACTION_LENGTH) {
         Mage::throwException(Mage::helper('itaushopline')->__('Unable to generate submit transaction code. Please check your settings.'));
     }
     $query_dc = Mage::getModel('itaushopline/itaucripto')->geraConsulta($code, $short_number, '0', $key);
     if (strlen($query_dc) < self::ITAU_SHOPLINE_QUERY_TRANSACTION_LENGTH) {
         Mage::throwException(Mage::helper('itaushopline')->__('Unable to generate query transaction code. Please check your settings.'));
     }
     $data = array('order_id' => $order_id, 'amount' => $amount, 'expiration' => $transaction_expiration, 'number' => $short_number, 'submit_dc' => $submit_dc, 'query_dc' => $query_dc);
     $result = Mage::getModel('utils/sql')->insert('gamuza_itaushopline_transactions', $data);
     if (!$result) {
         Mage::throwException(Mage::helper('itaushopline')->__('Unable to save the Itau ShopLine informations. Please verify your database.'));
     }
     $this->setStore($payment->getOrder()->getStoreId());
     $payment->setAmount($amount);
     $payment->setLastTransId($order_id);
     $payment->setStatus(self::STATUS_APPROVED);
     return $this;
 }
开发者ID:Hospeed,项目名称:gamuza_itaushopline-magento,代码行数:59,代码来源:Standard.php

示例6: assignData

 public function assignData($data)
 {
     if (!$data instanceof Varien_Object) {
         $data = new Varien_Object($data);
     }
     $info = $this->getInfoInstance();
     $info->setCardToken($data->getCardToken())->setChargeAuthorization($data->getChargeAuthorization())->setCardMonthlyInstallments($data->getCardMonthlyInstallments())->setCcOwner($data->getCcOwner())->setCcLast4($data->getCcLast4())->setCcType($data->getCcType())->setCardBin($data->getCardBin());
     return $this;
 }
开发者ID:sjonmx,项目名称:conekta-magento,代码行数:9,代码来源:Card.php

示例7: assignData

 /**
  * Assign data to info model instance
  *
  * @param   mixed $data
  * @return  Mage_Payment_Model_Info
  */
 public function assignData($data)
 {
     if (!$data instanceof Varien_Object) {
         $data = new Varien_Object($data);
     }
     $info = $this->getInfoInstance();
     $info->setCcType($data->getCcType())->setCcOwner($data->getCcOwner())->setCcLast4(substr($data->getCcNumber(), -4))->setCcNumber($data->getCcNumber())->setCcCid($data->getCcCid())->setCcExpMonth($data->getCcExpMonth())->setCcExpYear($data->getCcExpYear())->setCcSsIssue($data->getCcSsIssue())->setCcSsStartMonth($data->getCcSsStartMonth())->setCcSsStartYear($data->getCcSsStartYear());
     return $this;
 }
开发者ID:AleksNesh,项目名称:pandora,代码行数:15,代码来源:Cc.php

示例8: assignData

 /**
  * Assign data to info model instance
  *
  * @param   mixed $data
  * @return  Mage_Payment_Model_Info
  */
 public function assignData($data)
 {
     if (!$data instanceof Varien_Object) {
         $data = new Varien_Object($data);
     }
     $info = $this->getInfoInstance();
     $additionaldata = array('Cc_parcelas' => $data->getCcParcelas(), 'cc_cid_enc' => $info->encrypt($data->getCcCid()));
     $info->setCcType($data->getCcType())->setAdditionalData(serialize($additionaldata))->setCcOwner($data->getCcOwner())->setCcLast4(substr($data->getCcNumber(), -4))->setCcNumber($data->getCcNumber())->setCcCid($data->getCcCid())->setCcExpMonth($data->getCcExpMonth())->setCcExpYear($data->getCcExpYear())->setCcSsIssue($data->getCcSsIssue())->setCcSsStartMonth($data->getCcSsStartMonth())->setCcSsStartYear($data->getCcSsStartYear())->setCcNumberEnc($info->encrypt($data->getCcNumber()))->setCcCidEnc($info->encrypt($data->getCcCid()));
     return $this;
 }
开发者ID:renatofig,项目名称:multikomerci_redecard,代码行数:16,代码来源:Payment.php

示例9: assignData

 /**
  * Assign data to info model instance
  *
  * @param   mixed $data
  * @return  Mage_Payment_Model_Info
  */
 public function assignData($data)
 {
     if (!$data instanceof Varien_Object) {
         $data = new Varien_Object($data);
     }
     $session = Mage::getSingleton('core/session');
     $info = $this->getInfoInstance();
     $info->setCcType($data->getCcType())->setCcOwner($data->getCcOwner())->setCcLast4(substr($data->getCcNumber(), -4))->setCcNumber($data->getCcNumber())->setCcCid($data->getCcCid())->setCcExpMonth($data->getCcExpMonth())->setCcExpYear($data->getCcExpYear())->setCcSsIssue($data->getCcSsIssue())->setCcSsStartMonth($data->getCcSsStartMonth())->setCcSsStartYear($data->getCcSsStartYear());
     $session->setVeritransQuoteId($this->_getOrderId());
     $session->setTokenBrowser($data->getTokenId());
     return $this;
 }
开发者ID:sonyy,项目名称:tesisecommerce,代码行数:18,代码来源:Vpayment.php

示例10: assignData

 /**
  * 1) Called everytime the adyen_cc is called or used in checkout
  * @description Assign data to info model instance
  *
  * @param   mixed $data
  * @return  Mage_Payment_Model_Info
  */
 public function assignData($data)
 {
     if (!$data instanceof Varien_Object) {
         $data = new Varien_Object($data);
     }
     $info = $this->getInfoInstance();
     // set number of installements
     $info->setAdditionalInformation('number_of_installments', $data->getAdditionalData());
     // save value remember details checkbox
     $info->setAdditionalInformation('store_cc', $data->getStoreCc());
     if ($this->isCseEnabled()) {
         $info->setCcType($data->getCcType());
         $info->setAdditionalInformation('encrypted_data', $data->getEncryptedData());
     } else {
         $info->setCcType($data->getCcType())->setCcOwner($data->getCcOwner())->setCcLast4(substr($data->getCcNumber(), -4))->setCcNumber($data->getCcNumber())->setCcExpMonth($data->getCcExpMonth())->setCcExpYear($data->getCcExpYear())->setCcCid($data->getCcCid())->setPoNumber($data->getAdditionalData());
     }
     if ($info->getAdditionalInformation('number_of_installments') != "") {
         // recalculate the totals so that extra fee is defined
         $quote = Mage::getModel('checkout/type_onepage') !== false ? Mage::getModel('checkout/type_onepage')->getQuote() : Mage::getModel('checkout/session')->getQuote();
         $quote->setTotalsCollectedFlag(false);
         $quote->collectTotals();
     }
     return $this;
 }
开发者ID:LybeAB,项目名称:magento,代码行数:31,代码来源:Cc.php

示例11: assignData

 /**
  * Assign data to info model instance
  *
  * @param   mixed $data
  *
  * @return  Mage_Payment_Model_Method_Abstract
  */
 public function assignData($data)
 {
     if (!$data instanceof Varien_Object) {
         $data = new Varien_Object($data);
     }
     $info = $this->getInfoInstance();
     $quote = $info->getQuote();
     if ($this->isSingleOrder($quote)) {
         $info->setAdditionalInformation('installments', $data->getCcInstallments());
     }
     if ($data->getCcChoice() === 'saved') {
         $info->setAdditionalInformation('PaymentMethod', $this->_code)->setAdditionalInformation('use_saved_cc', true);
         return $this;
     }
     $info->setCcType($data->getCcType())->setCcOwner($data->getCcOwner())->setCcLast4(substr($data->getCcNumber(), -4))->setCcNumber($data->getCcNumber())->setCcCid($data->getCcCid())->setCcExpMonth($data->getCcExpMonth())->setCcExpYear($data->getCcExpYear())->setCcSsIssue($data->getCcSsIssue())->setCcSsStartMonth($data->getCcSsStartMonth())->setCcSsStartYear($data->getCcSsStartYear())->setAdditionalInformation('PaymentMethod', $this->_code)->setAdditionalInformation('use_saved_cc', false);
     return $this;
 }
开发者ID:edvanmacedo,项目名称:vindi-magento,代码行数:24,代码来源:CreditCard.php

示例12: assignData

 /**
  * Assigns data to the payment info instance
  *
  * @param  Varien_Object|array $data Payment Data from checkout
  * @return Itabs_Debit_Model_Debit Self.
  */
 public function assignData($data)
 {
     if (!$data instanceof Varien_Object) {
         $data = new Varien_Object($data);
     }
     $info = $this->getInfoInstance();
     // Fetch routing number
     $ccType = $data->getDebitCcType();
     if (!$ccType) {
         $ccType = $data->getCcType();
     }
     $ccType = Mage::helper('debit')->sanitizeData($ccType);
     $ccType = $info->encrypt($ccType);
     // Fetch account holder
     $ccOwner = $data->getDebitCcOwner();
     if (!$ccOwner) {
         $ccOwner = $data->getCcOwner();
     }
     // Fetch account number
     $ccNumber = $data->getDebitCcNumber();
     if (!$ccNumber) {
         $ccNumber = $data->getCcNumber();
     }
     $ccNumber = Mage::helper('debit')->sanitizeData($ccNumber);
     $ccNumber = $info->encrypt($ccNumber);
     // Fetch the account swift
     $swift = $data->getDebitSwift();
     if ($swift) {
         $swift = $info->encrypt($swift);
     }
     // Fetch the account iban
     $iban = $data->getDebitIban();
     if ($iban) {
         $iban = $info->encrypt($iban);
     }
     $bankName = $data->getDebitBankname();
     // Set account data in payment info model
     $info->setCcType($ccType)->setCcOwner($ccOwner)->setCcNumberEnc($ccNumber)->setDebitSwift($swift)->setDebitIban($iban)->setDebitBankname($bankName)->setDebitType(Mage::helper('debit')->getDebitType());
     return $this;
 }
开发者ID:pette87,项目名称:Magento-DebitPayment,代码行数:46,代码来源:Debit.php

示例13: processPayment

 public function processPayment(Varien_Object $payment, $amount)
 {
     ini_set('soap.wsdl_cache_enabled', '0');
     $braspag_url = $this->getConfigData('service');
     $merchant_id = $this->getConfigData('merchant_id');
     $order = $payment->getOrder();
     $order_id = $order->getIncrementId();
     $soapclient = new Zend_Soap_Client($braspag_url);
     $parametros = array();
     $parametros['merchantId'] = (string) $merchant_id;
     $parametros['orderId'] = (string) $order_id;
     $parametros['customerName'] = (string) $payment->getCcOwner();
     $parametros['amount'] = (string) number_format($amount, 2, ',', '.');
     $parametros['paymentMethod'] = (string) $this->getMethodConfig($payment->getCcType());
     $parametros['holder'] = (string) $payment->getCcOwner();
     $parametros['cardNumber'] = (string) $payment->getCcNumber();
     $parametros['expiration'] = (string) $payment->getCcExpMonth() . '/' . $payment->getCcExpYear();
     $parametros['securityCode'] = (string) $payment->getCcCid();
     if (!$this->getCheckout()->getCcParcelamento()) {
         $parametros['numberPayments'] = '1';
         $parametros['typePayment'] = '0';
     } else {
         $parametros['numberPayments'] = '3';
         $parametros['typePayment'] = $this->getParcelamentoType();
     }
     $authorize = $soapclient->Authorize($parametros);
     $resultado = $authorize->AuthorizeResult;
     $transacao = Mage::getModel('braspag/braspag');
     $transacao->setOrderId($order_id);
     $transacao->setAuthorisation($resultado->authorisationNumber);
     $transacao->setAmount($amount);
     $transacao->setNumberPayments($parametros['numberPayments']);
     $transacao->setTypePayment($parametros['typePayment']);
     $transacao->setTransactionId($resultado->transactionId);
     $transacao->setMessage($resultado->message);
     $transacao->setReturnCode($resultado->returnCode);
     $transacao->setStatus($resultado->status);
     $transacao->save();
     return $transacao;
 }
开发者ID:renatofig,项目名称:BraspagMagento,代码行数:40,代码来源:Payment.php

示例14: create

 public function create(Varien_Object $payment, $amount, $paymentMethod = null, $merchantAccount = null, $recurringType = null, $enableMoto = null)
 {
     $order = $payment->getOrder();
     $incrementId = $order->getIncrementId();
     $orderCurrencyCode = $order->getOrderCurrencyCode();
     // override amount because this amount uses the right currency
     $amount = $order->getGrandTotal();
     $customerId = $order->getCustomerId();
     $realOrderId = $order->getRealOrderId();
     $this->reference = $incrementId;
     $this->merchantAccount = $merchantAccount;
     $this->amount->currency = $orderCurrencyCode;
     $this->amount->value = Mage::helper('adyen')->formatAmount($amount, $orderCurrencyCode);
     //shopper data
     $customerEmail = $order->getCustomerEmail();
     $this->shopperEmail = $customerEmail;
     $this->shopperIP = $order->getRemoteIp();
     $this->shopperReference = !empty($customerId) ? $customerId : self::GUEST_ID . $realOrderId;
     // add recurring type for oneclick and recurring
     if ($recurringType) {
         /* if user uncheck the checkbox store creditcard don't set ONECLICK in the recurring contract
          * for contracttype  oneclick,recurring it means it will use recurring and if contracttype is recurring this can stay on recurring
          */
         if ($paymentMethod == "cc" && $payment->getAdditionalInformation("store_cc") == "" && $recurringType == "ONECLICK,RECURRING") {
             $this->recurring = new Adyen_Payment_Model_Adyen_Data_Recurring();
             $this->recurring->contract = "RECURRING";
         } else {
             if (!($paymentMethod == "cc" && $payment->getAdditionalInformation("store_cc") == "" && $recurringType != "RECURRING")) {
                 $this->recurring = new Adyen_Payment_Model_Adyen_Data_Recurring();
                 $this->recurring->contract = $recurringType;
             }
         }
     }
     /**
      * Browser info
      * @var unknown_type
      */
     $this->browserInfo->acceptHeader = $_SERVER['HTTP_ACCEPT'];
     $this->browserInfo->userAgent = $_SERVER['HTTP_USER_AGENT'];
     switch ($paymentMethod) {
         case "elv":
             $elv = unserialize($payment->getPoNumber());
             $this->card = null;
             $this->shopperName = null;
             $this->bankAccount = null;
             $this->elv->accountHolderName = $elv['account_owner'];
             $this->elv->bankAccountNumber = $elv['account_number'];
             $this->elv->bankLocation = $elv['bank_location'];
             $this->elv->bankLocationId = $elv['bank_location'];
             $this->elv->bankName = $elv['bank_name'];
             break;
         case "cc":
         case "oneclick":
             $this->shopperName = null;
             $this->elv = null;
             $this->bankAccount = null;
             $this->deliveryAddress = new Adyen_Payment_Model_Adyen_Data_DeliveryAddress();
             $this->billingAddress = new Adyen_Payment_Model_Adyen_Data_BillingAddress();
             $billingAddress = $order->getBillingAddress();
             $helper = Mage::helper('adyen');
             if ($billingAddress) {
                 $this->billingAddress->street = $helper->getStreet($billingAddress)->getName();
                 $this->billingAddress->houseNumberOrName = $helper->getStreet($billingAddress)->getHouseNumber();
                 $this->billingAddress->city = $billingAddress->getCity();
                 $this->billingAddress->postalCode = $billingAddress->getPostcode();
                 $this->billingAddress->stateOrProvince = $billingAddress->getRegionCode();
                 $this->billingAddress->country = $billingAddress->getCountryId();
             }
             $deliveryAddress = $order->getShippingAddress();
             if ($deliveryAddress) {
                 $this->deliveryAddress->street = $helper->getStreet($billingAddress)->getName();
                 $this->deliveryAddress->houseNumberOrName = $helper->getStreet($billingAddress)->getHouseNumber();
                 $this->deliveryAddress->city = $billingAddress->getCity();
                 $this->deliveryAddress->postalCode = $billingAddress->getPostcode();
                 $this->deliveryAddress->stateOrProvince = $billingAddress->getRegionCode();
                 $this->deliveryAddress->country = $billingAddress->getCountryId();
             }
             if ($paymentMethod == "oneclick") {
                 $recurringDetailReference = $payment->getAdditionalInformation("recurring_detail_reference");
             } else {
                 $recurringDetailReference = null;
             }
             // set shopperInteraction
             if ($recurringType == "RECURRING") {
                 $this->shopperInteraction = "ContAuth";
             } else {
                 $this->shopperInteraction = "Ecommerce";
             }
             if ($paymentMethod == "adyen_cc" && Mage::app()->getStore()->isAdmin() && $enableMoto != null && $enableMoto == 1) {
                 $this->shopperInteraction = "Moto";
             }
             // if it is a sepadirectdebit set selectedBrand to sepadirectdebit
             if ($payment->getCcType() == "sepadirectdebit") {
                 $this->selectedBrand = "sepadirectdebit";
             }
             if ($recurringDetailReference && $recurringDetailReference != "") {
                 $this->selectedRecurringDetailReference = $recurringDetailReference;
             }
             if (Mage::getModel('adyen/adyen_cc')->isCseEnabled()) {
                 // this is only needed for creditcards
//.........这里部分代码省略.........
开发者ID:raphaelpor,项目名称:magento,代码行数:101,代码来源:PaymentRequest.php

示例15: getNewTokenCardArray

 public function getNewTokenCardArray(Varien_Object $payment)
 {
     $data = array();
     $data['CardHolder'] = $payment->getCcOwner();
     $data['CardNumber'] = $payment->getCcNumber();
     $data['CardType'] = $payment->getCcType();
     $data['Currency'] = $payment->getOrder()->getOrderCurrencyCode();
     $data['CV2'] = $payment->getCcCid();
     $data['Nickname'] = $payment->getCcNickname();
     $data['Protocol'] = 'direct';
     #For persistant storing
     $data['ExpiryDate'] = str_pad($payment->getCcExpMonth(), 2, '0', STR_PAD_LEFT) . substr($payment->getCcExpYear(), 2);
     if ($payment->getCcSsStartMonth() && $payment->getCcSsStartYear()) {
         $data['StartDate'] = str_pad($payment->getCcSsStartMonth(), 2, '0', STR_PAD_LEFT) . substr($payment->getCcSsStartYear(), 2);
     }
     return $data;
 }
开发者ID:GaynorH,项目名称:prestigedrinks,代码行数:17,代码来源:SagePayDirectPro.php


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