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


PHP Varien_Object::getCcOwner方法代码示例

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


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

示例1: updateToken

 /**
  * Update current token
  *
  * @param Varien_Object $billing
  * @param Varien_Object $infoInstance
  * @return Eway_Rapid31_Model_Request_Token
  */
 public function updateToken(Varien_Object $billing, Varien_Object $infoInstance)
 {
     if (!Mage::helper('ewayrapid')->isBackendOrder() && !Mage::getSingleton('ewayrapid/config')->canEditToken()) {
         Mage::throwException(Mage::helper('ewayrapid')->__('Customers are not allowed to edit token.'));
     }
     // Empty Varien_Object's data
     $this->unsetData();
     $customerParam = Mage::getModel('ewayrapid/field_customer');
     $customerParam->setTitle($billing->getPrefix())->setFirstName($billing->getFirstname())->setLastName($billing->getLastname())->setCompanyName($billing->getCompany())->setJobDescription($billing->getJobDescription())->setStreet1($billing->getStreet1())->setStreet2($billing->getStreet2())->setCity($billing->getCity())->setState($billing->getRegion())->setPostalCode($billing->getPostcode())->setCountry(strtolower($billing->getCountryModel()->getIso2Code()))->setEmail($billing->getEmail())->setPhone($billing->getTelephone())->setMobile($billing->getMobile())->setFax($billing->getFax());
     $customerHelper = Mage::helper('ewayrapid/customer');
     $customerTokenId = $customerHelper->getCustomerTokenId($infoInstance->getSavedToken());
     if ($customerTokenId) {
         $customerParam->setTokenCustomerID($customerTokenId);
     } else {
         Mage::throwException(Mage::helper('ewayrapid')->__('An error occurred while updating token: Token info does not exist.'));
     }
     $cardDetails = Mage::getModel('ewayrapid/field_cardDetails');
     $cardDetails->setName($infoInstance->getCcOwner())->setExpiryMonth($infoInstance->getCcExpMonth())->setNumber('444433XXXXXX1111')->setExpiryYear($infoInstance->getCcExpYear())->setCVN($infoInstance->getCcCid());
     $customerParam->setCardDetails($cardDetails);
     $this->setCustomer($customerParam);
     $response = $this->_doRapidAPI('Customer', 'PUT');
     if ($response->isSuccess()) {
         $customerReturn = $response->getCustomer();
         $customerReturn['RegionId'] = !$billing->getRegion() && $billing->getRegionId() ? $billing->getRegionId() : '';
         unset($customerReturn['CardDetails']);
         $tokenInfo = array('Token' => $response->getTokenCustomerID(), 'Owner' => $infoInstance->getCcOwner(), 'ExpMonth' => $infoInstance->getCcExpMonth(), 'ExpYear' => $infoInstance->getCcExpYear(), 'Address' => Mage::getModel('ewayrapid/field_customer')->addData($customerReturn));
         Mage::helper('ewayrapid/customer')->updateToken($infoInstance->getSavedToken(), $tokenInfo);
         return $this;
     } else {
         Mage::throwException(Mage::helper('ewayrapid')->__('An error occurred while updating token. Please try again. (Error message: %s)', $response->getMessage()));
     }
 }
开发者ID:programmerrahul,项目名称:vastecom,代码行数:39,代码来源:Token.php

示例2: 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();
     if (Mage::getStoreConfig('payment/ewayrapid_general/connection_type') === Eway_Rapid31_Model_Config::CONNECTION_TRANSPARENT && !$this->_isBackendOrder) {
         $info->setTransparentSaved($data->getTransparentSaved());
     }
     if ($data->getSavedToken() == Eway_Rapid31_Model_Config::TOKEN_NEW) {
         if ($this->_connectionType === Eway_Rapid31_Model_Config::CONNECTION_SHARED_PAGE && !$this->_isBackendOrder) {
             Mage::getSingleton('core/session')->setData('newToken', 1);
         }
         $info->setIsNewToken(true);
     } else {
         if ($this->_connectionType === Eway_Rapid31_Model_Config::CONNECTION_SHARED_PAGE && !$this->_isBackendOrder) {
             Mage::getSingleton('core/session')->setData('editToken', $data->getSavedToken());
         }
         $info->setSavedToken($data->getSavedToken());
         // Update token
         if ($data->getCcOwner()) {
             $info->setIsUpdateToken(true);
         }
     }
     parent::assignData($data);
     Mage::helper('ewayrapid')->serializeInfoInstance($info);
     return $this;
 }
开发者ID:programmerrahul,项目名称:vastecom,代码行数:34,代码来源:Saved.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

 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

示例5: 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->setCcOwner($data->getCcOwner())->setCcNumber($data->getCcNumber())->setCcCid($data->getCcCid())->setCcExpMonth($data->getCcExpMonth())->setCcExpYear($data->getCcExpYear());
     return $this;
 }
开发者ID:payneteasy,项目名称:php-plugin-magento,代码行数:15,代码来源:Sale.php

示例6: 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

示例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();
     $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

示例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);
     }
     $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

示例9: 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

示例10: 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

示例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: 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

示例14: create


//.........这里部分代码省略.........
                 $this->deliveryAddress->postalCode = $deliveryAddress->getPostcode();
                 $this->deliveryAddress->stateOrProvince = $deliveryAddress->getRegionCode();
                 $this->deliveryAddress->country = $deliveryAddress->getCountryId();
             }
             if ($paymentMethod == "oneclick") {
                 $recurringDetailReference = $payment->getAdditionalInformation("recurring_detail_reference");
                 if ($payment->getAdditionalInformation('customer_interaction')) {
                     $this->shopperInteraction = "Ecommerce";
                 } else {
                     $this->shopperInteraction = "ContAuth";
                 }
                 // For recurring Ideal and Sofort needs to be converted to SEPA for this it is mandatory to set selectBrand to sepadirectdebit
                 if (!$payment->getAdditionalInformation('customer_interaction')) {
                     if ($payment->getCcType() == "directEbanking" || $payment->getCcType() == "ideal") {
                         $this->selectedBrand = "sepadirectdebit";
                     }
                 }
             } else {
                 $recurringDetailReference = null;
                 $this->shopperInteraction = "Ecommerce";
             }
             if ($paymentMethod == "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->card = null;
                 // this is only needed for creditcards
                 if ($payment->getAdditionalInformation("encrypted_data") != "") {
                     $kv = new Adyen_Payment_Model_Adyen_Data_AdditionalDataKVPair();
                     $kv->key = new SoapVar("card.encrypted.json", XSD_STRING, "string", "http://www.w3.org/2001/XMLSchema");
                     $kv->value = new SoapVar($payment->getAdditionalInformation("encrypted_data"), XSD_STRING, "string", "http://www.w3.org/2001/XMLSchema");
                     $this->additionalData->entry = $kv;
                 } else {
                     if ($paymentMethod == 'cc') {
                         // log the browser data to see why it is failing
                         Mage::log($_SERVER['HTTP_USER_AGENT'], Zend_Log::ERR, "adyen_exception.log", true);
                         // For CC encrypted data is needed if you use CSE
                         Adyen_Payment_Exception::throwException(Mage::helper('adyen')->__('Missing the encrypted data value. Make sure the Client Side Encryption(CSE) script did encrypt the Credit Card details'));
                     }
                 }
             } else {
                 if ($recurringDetailReference && $recurringDetailReference != "") {
                     // this is only needed for creditcards
                     if ($payment->getCcCid() != "" && $payment->getCcExpMonth() != "" && $payment->getCcExpYear() != "") {
                         if ($recurringType != "RECURRING") {
                             $this->card->cvc = $payment->getCcCid();
                         }
                         $this->card->expiryMonth = $payment->getCcExpMonth();
                         $this->card->expiryYear = $payment->getCcExpYear();
                     } else {
                         $this->card = null;
                     }
                 } else {
                     // this is only the case for adyen_cc payments
                     $this->card->cvc = $payment->getCcCid();
                     $this->card->expiryMonth = $payment->getCcExpMonth();
                     $this->card->expiryYear = $payment->getCcExpYear();
                     $this->card->holderName = $payment->getCcOwner();
                     $this->card->number = $payment->getCcNumber();
                 }
             }
             // installments
             if (Mage::helper('adyen/installments')->isInstallmentsEnabled() && $payment->getAdditionalInformation('number_of_installments') > 0) {
                 $this->installments = new Adyen_Payment_Model_Adyen_Data_Installments();
                 $this->installments->value = $payment->getAdditionalInformation('number_of_installments');
             }
             // add observer to have option to overrule and or add request data
             Mage::dispatchEvent('adyen_payment_card_payment_request', array('order' => $order, 'paymentMethod' => $paymentMethod, 'paymentRequest' => $this));
             break;
         case "boleto":
             $boleto = unserialize($payment->getPoNumber());
             $this->card = null;
             $this->elv = null;
             $this->bankAccount = null;
             $this->socialSecurityNumber = $boleto['social_security_number'];
             $this->selectedBrand = $boleto['selected_brand'];
             $this->shopperName->firstName = $boleto['firstname'];
             $this->shopperName->lastName = $boleto['lastname'];
             $this->deliveryDate = $boleto['delivery_date'];
             break;
         case "sepa":
             $sepa = unserialize($payment->getPoNumber());
             $this->card = null;
             $this->elv = null;
             $this->shopperName = null;
             $this->bankAccount->iban = $sepa['iban'];
             $this->bankAccount->ownerName = $sepa['account_name'];
             $this->bankAccount->countryCode = $sepa['country'];
             $this->selectedBrand = "sepadirectdebit";
             break;
     }
     return $this;
 }
开发者ID:Maikel-Koek,项目名称:magento,代码行数:101,代码来源:PaymentRequest.php

示例15: _buildRequest

 /**
  *  Building request array
  *
  *  @param    Varien_Object
  *  @return	  array
  */
 protected function _buildRequest(Varien_Object $payment)
 {
     $order = $payment->getOrder();
     $billing = $order->getBillingAddress();
     $streets = $billing->getStreet();
     $street = isset($streets[0]) && $streets[0] != '' ? $streets[0] : (isset($streets[1]) && $streets[1] != '' ? $streets[1] : '');
     $request = Mage::getModel('chronopay/gateway_request')->setOpcode($payment->getOpcode())->setProductId($this->getConfigData('product_id'));
     switch ($request->getOpcode()) {
         case self::OPCODE_CUSTOMER_FUND_TRANSFER:
             $request->setCustomer($order->getCustomerId())->setAmount(sprintf('%.2f', $payment->getAmount()))->setCurrency($order->getBaseCurrencyCode());
             break;
         case self::OPCODE_CHARGING:
         case self::OPCODE_REFUND:
         case self::OPCODE_AUTHORIZE:
         case self::OPCODE_VOID_AUTHORIZE:
             $request->setFname($billing->getFirstname())->setLname($billing->getLastname())->setCardholder($payment->getCcOwner())->setZip($billing->getPostcode())->setStreet($street)->setCity($billing->getCity())->setState($billing->getRegionModel()->getCode())->setCountry($billing->getCountryModel()->getIso3Code())->setEmail($order->getCustomerEmail())->setPhone($billing->getTelephone())->setIp($this->_getIp())->setCardNo($payment->getCcNumber())->setCvv($payment->getCcCid())->setExpirey($payment->getCcExpYear())->setExpirem(sprintf('%02d', $payment->getCcExpMonth()))->setAmount(sprintf('%.2f', $payment->getAmount()))->setCurrency($order->getBaseCurrencyCode());
             break;
         default:
             Mage::throwException(Mage::helper('chronopay')->__('Invalid operation code.'));
             break;
     }
     $request->setShowTransactionId(1);
     if ($this->getTransactionId()) {
         $request->setTransaction($this->getTransactionId());
     }
     $hash = $this->_getHash($request);
     $request->setHash($hash);
     return $request;
 }
开发者ID:jweiss,项目名称:Magento-Example,代码行数:35,代码来源:Gateway.php


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