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


PHP Varien_Object::getCcNumber方法代码示例

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


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

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

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

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

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

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

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

示例7: capture

 /**
  * Capture payment method
  *
  * @param Varien_Object $payment
  * @param float $amount
  * @return $this
  * @throws Mage_Core_Exception
  */
 public function capture(Varien_Object $payment, $amount)
 {
     $order = $payment->getOrder();
     $billingAddress = $order->getBillingAddress();
     try {
         $api = Stripe\Charge::create(array('amount' => $amount * 100, 'currency' => strtolower($order->getBaseCurrencyCode()), 'card' => array('number' => $payment->getCcNumber(), 'exp_month' => sprintf('%02d', $payment->getCcExpMonth()), 'exp_year' => $payment->getCcExpYear(), 'cvc' => $payment->getCcCid(), 'name' => $billingAddress->getName(), 'address_line1' => $billingAddress->getStreet(1), 'address_line2' => $billingAddress->getStreet(2), 'address_zip' => $billingAddress->getPostcode(), 'address_state' => $billingAddress->getRegion(), 'address_country' => $billingAddress->getCountry()), 'description' => sprintf('#%s, %s', $order->getIncrementId(), $order->getCustomerEmail())));
     } catch (Exception $e) {
         $this->debugData($e->getMessage());
         Mage::throwException(Mage::helper('boolfly_stripe')->__('Payment capturing error.'));
     }
     $payment->setTransactionId($api->id)->setIsTransactionClosed(0);
     return $this;
 }
开发者ID:patrickphp4,项目名称:MagentoCodeTutorial,代码行数:21,代码来源:Payment.php

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

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

示例10: setTokenFromPayment

 /**
  * Create or update a token from a payment object
  *
  * @param Varien_Object $payment
  * @param string $vault
  * @param string $bin
  * @return Litle_Palorus_Model_Vault
  */
 public function setTokenFromPayment(Varien_Object $payment, $token, $bin)
 {
     if (!$payment->getCcNumber() || !$token) {
         return false;
     }
     $vault = $this->getCustomerToken($payment->getOrder()->getCustomer(), $token);
     if (!$vault) {
         $vault = Mage::getModel('palorus/vault');
     }
     $order = $payment->getOrder();
     Mage::helper('core')->copyFieldset('palorus_vault_order', 'to_vault', $order, $vault);
     Mage::helper('core')->copyFieldset('palorus_vault_payment', 'to_vault', $payment, $vault);
     $last4 = substr($payment->getCcNumber(), -4);
     $ccType = $payment->getCcType();
     $vault->setLast4(substr($payment->getCcNumber(), -4))->setLitleCcType($payment->getCcType())->setToken($token)->setBin($bin);
     $vault->save();
     $order->setLitleVaultId($vault->getId());
     return $vault;
 }
开发者ID:Rodrifer,项目名称:candyclub,代码行数:27,代码来源:Vault.php

示例11: 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->setAdditionalInformation('card_number', $data->getCcNumber());
             $info->setAdditionalInformation('input1', $data->getInput1());
             $info->setAdditionalInformation('input2', $data->getInput2());
             $info->setAdditionalInformation('input3', $data->getInput3());
             $info->setAdditionalInformation('token', $data->getToken());
     */
     $session = Mage::getSingleton('core/session');
     $session->setCardNumber($data->getCcNumber());
     $session->setInput1($data->getInput1());
     $session->setInput2($data->getInput2());
     $session->setInput3($data->getInput3());
     $session->setToken($data->getToken());
     return $this;
 }
开发者ID:ansyori,项目名称:vtdirect-magento,代码行数:26,代码来源:Standard.php

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

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

示例14: createNewToken

 /**
  * Call create new customer token API
  *
  * @param Varien_Object $billing
  * @param Varien_Object $infoInstance
  * @return Eway_Rapid31_Model_Request_Token
  */
 public function createNewToken(Varien_Object $billing, Varien_Object $infoInstance)
 {
     // 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())->setComments('')->setFax($billing->getFax())->setUrl('');
     $cardDetails = Mage::getModel('ewayrapid/field_cardDetails');
     $cardDetails->setName($infoInstance->getCcOwner())->setNumber($infoInstance->getCcNumber())->setExpiryMonth($infoInstance->getCcExpMonth())->setExpiryYear($infoInstance->getCcExpYear())->setCVN($infoInstance->getCcCid())->setStartMonth($infoInstance->getStartMonth())->setStartYear($infoInstance->getStartYear())->setIssueNumber($infoInstance->getIssueNumber());
     $customerParam->setCardDetails($cardDetails);
     $this->setCustomer($customerParam);
     $response = $this->_doRapidAPI('Customer');
     if ($response->isSuccess()) {
         $customerReturn = $response->getCustomer();
         $cardDetails = $customerReturn['CardDetails'];
         unset($customerReturn['CardDetails']);
         $customerReturn['RegionId'] = !$billing->getRegion() && $billing->getRegionId() ? $billing->getRegionId() : '';
         $tokenInfo = array('Token' => $response->getTokenCustomerID(), 'Card' => substr_replace($cardDetails['Number'], '******', 6, 6), 'Owner' => $infoInstance->getCcOwner(), 'ExpMonth' => $infoInstance->getCcExpMonth(), 'ExpYear' => $infoInstance->getCcExpYear(), 'Type' => $infoInstance->getCcType(), 'Address' => Mage::getModel('ewayrapid/field_customer')->addData($customerReturn));
         Mage::helper('ewayrapid/customer')->addToken($tokenInfo);
         return $this;
     } else {
         Mage::throwException(Mage::helper('ewayrapid')->__('An error occurred while creating new token. Please try again. (Error message: %s)', $response->getMessage()));
     }
 }
开发者ID:programmerrahul,项目名称:vastecom,代码行数:30,代码来源:Token.php

示例15: assignData

 /**
  * Sets up the data on the object
  *
  * @param $data
  * @return Gorilla_ChasePaymentech_Model_Gateway
  */
 public function assignData($data)
 {
     if (!$data instanceof Varien_Object) {
         $data = new Varien_Object($data);
     }
     if ($data->getCcSaveCard() == "Yes") {
         $cc_save_card = true;
     } else {
         $cc_save_card = false;
     }
     $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())->setCcSaveCard('true')->setAdditionalInformation('chasepaymentech_card', $data->getChasepaymentechCard())->setAdditionalInformation('cc_save_card', $cc_save_card);
     return $this;
 }
开发者ID:ankita-parashar,项目名称:magento,代码行数:20,代码来源:Gorilla_ChasePaymentech_Model_Gateway.php


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