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


PHP Mage_Payment_Model_Info::setAdditionalInformation方法代码示例

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


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

示例1: testAddPaymentsToPayloadUsePan

 /**
  * verify
  * - payment will be made into a payload using the pan
  */
 public function testAddPaymentsToPayloadUsePan()
 {
     $processedPayments = new SplObjectStorage();
     $this->_paymentStub->setAdditionalInformation('pan', 'pan');
     $this->_stubPayload(['setAccountUniqueId']);
     $this->_payloadStub->expects($this->once())->method('setAccountUniqueId')->with($this->identicalTo('pan'))->will($this->returnSelf());
     $handler = Mage::getModel('ebayenterprise_creditcard/order_create_payment');
     $handler->addPaymentsToPayload($this->_orderStub, $this->_paymentContainer, $processedPayments);
 }
开发者ID:sirishreddyg,项目名称:magento-retail-order-management,代码行数:13,代码来源:PaymentTest.php

示例2: testGetTokenInfo

 public function testGetTokenInfo()
 {
     $payment = new Varien_Object();
     $payment->setCcCid('789');
     $vaultCard = new Varien_Object();
     $vaultCard->setCcType('VI');
     $vaultCard->setLast4('1234');
     $vaultCard->setType('VI');
     $vaultCard->setExpirationMonth('12');
     $vaultCard->setExpirationYear('2050');
     $vaultCard->setToken('1111222233331234');
     $litle = new Litle_CreditCard_Model_PaymentLogic();
     $modelPalorusVault = $this->getMock('Litle_Palorus_Model_Vault');
     $modelPalorusVault->expects($this->any())->method('load')->with($this->equalTo(50))->will($this->returnValue($vaultCard));
     $litle->setModelPalorusVault($modelPalorusVault);
     $info = new Mage_Payment_Model_Info();
     $info->setAdditionalInformation('cc_vaulted', 50);
     $arr = array('info_instance' => $info);
     $litle->addData($arr);
     $tokenInfo = $litle->getTokenInfo($payment);
     $this->assertEquals('1234', $payment->getCcLast4());
     $this->assertEquals('VI', $payment->getCcType());
     $this->assertEquals('789', $tokenInfo['cardValidationNum']);
     $this->assertEquals('VI', $tokenInfo['type']);
     $this->assertEquals('1111222233331234', $tokenInfo['litleToken']);
     $this->assertEquals('1250', $tokenInfo['expDate']);
 }
开发者ID:nengineer,项目名称:litle-integration-magento,代码行数:27,代码来源:PaymentLogicTest.php

示例3: cancelPartialAuthorization

 /**
  * Cancel partial authorizations and flush current split_tender_id record
  *
  * @param Mage_Payment_Model_Info $payment
  */
 public function cancelPartialAuthorization(Mage_Payment_Model_Info $payment)
 {
     if (!$payment->getAdditionalInformation($this->_splitTenderIdKey)) {
         Mage::throwException(Mage::helper('paygate')->__('Invalid split tenderId ID.'));
     }
     $request = $this->_getRequest();
     $request->setXSplitTenderId($payment->getAdditionalInformation($this->_splitTenderIdKey));
     $request->setXType(self::REQUEST_TYPE_VOID)->setXMethod(self::REQUEST_METHOD_CC);
     $result = $this->_postRequest($request);
     switch ($result->getResponseCode()) {
         case self::RESPONSE_CODE_APPROVED:
             $payment->setAdditionalInformation($this->_splitTenderIdKey, null);
             $this->_getSession()->setData($this->_partialAuthorizationChecksumSessionKey, null);
             $this->getCardsStorage($payment)->flushCards();
             $this->setPartialAuthorizationLastActionState(self::PARTIAL_AUTH_ALL_CANCELED);
             return;
         default:
             Mage::throwException(Mage::helper('paygate')->__('Payment canceling error.'));
     }
 }
开发者ID:par-orillonsoft,项目名称:magento_work,代码行数:25,代码来源:Authorizenet.php

示例4: setAliasToPayment

 /**
  * saves the alias and if given the cvc to the payment information
  *
  * @param Mage_Payment_Model_Info $payment - the payment which should be updated
  * @param array                   $aliasData - the data we will update
  * @param boolean                 $userIsRegistering - is registering method in checkout
  * @param boolean                 $paymentSave - is it necessary to save the payment afterwards
  */
 public function setAliasToPayment(Mage_Payment_Model_Info $payment, array $aliasData, $userIsRegistering = false, $paymentSave = false)
 {
     if (array_key_exists('alias', $aliasData) && 0 < strlen(trim($aliasData['alias']))) {
         $payment->setAdditionalInformation('alias', trim($aliasData['alias']));
         $payment->setAdditionalInformation('userIsRegistering', $userIsRegistering);
         if (array_key_exists('CVC', $aliasData)) {
             $payment->setAdditionalInformation('cvc', $aliasData['CVC']);
             $this->setCardHolderToAlias($payment->getQuote(), $aliasData);
         }
         $payment->setDataChanges(true);
         if ($paymentSave === true) {
             $payment->save();
         }
     } else {
         Mage::helper('ops/data')->log('did not save alias due to empty alias');
         Mage::helper('ops/data')->log($aliasData);
     }
 }
开发者ID:roshu1980,项目名称:add-computers,代码行数:26,代码来源:Alias.php

示例5: flushCards

 /**
  * Remove all cards from payment instance
  *
  * @return Mage_Paygate_Model_Authorizenet_Cart
  */
 public function flushCards()
 {
     $this->_cards = array();
     $this->_payment->setAdditionalInformation(self::CARDS_NAMESPACE, null);
     return $this;
 }
开发者ID:evinw,项目名称:project_bloom_magento,代码行数:11,代码来源:Cards.php

示例6: fetchTransactionInfo

 /**
  * Fetch transaction details info
  *
  * @param Mage_Payment_Model_Info $payment
  * @param string $transactionId
  * @return array
  */
 public function fetchTransactionInfo(Mage_Payment_Model_Info $payment, $transactionId)
 {
     /** @var Mage_Sales_Model_Order_Payment_Transaction $transaction */
     $transaction = Mage::getModel('sales/order_payment_transaction')->load($transactionId, 'txn_id');
     $checkout_transaction = $transaction->getOrder()->getPayment()->lookupTransaction(null, Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER);
     $reconcile = $this->reconcile($checkout_transaction->getTxnId());
     // Get the current details
     $transaction_details = $payment->getAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS);
     // Try to extract transaction details from the Gateway response
     if ($reconcile->unique_id == $transactionId) {
         $transaction_details = $reconcile;
     } else {
         if ($reconcile->payment_transaction instanceof stdClass) {
             if ($reconcile->payment_transaction->unique_id == $transactionId) {
                 $transaction_details = $reconcile->payment_transaction;
             }
         }
         if ($reconcile->payment_transaction instanceof ArrayObject) {
             foreach ($reconcile->payment_transaction as $payment_transaction) {
                 if ($payment_transaction->unique_id == $transactionId) {
                     $transaction_details = $payment_transaction;
                 }
             }
         }
     }
     // Remove the current details
     $payment->unsAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS);
     // Set the default/updated transaction details
     $payment->setAdditionalInformation(array(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS => $this->getHelper()->getArrayFromGatewayResponse($transaction_details)), null);
     $payment->save();
     return $payment->getAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS);
 }
开发者ID:snehamalvankar,项目名称:magento-ce-emp-plugin,代码行数:39,代码来源:Checkout.php

示例7: fetchTransactionInfo

 /**
  * Fetch transaction details info
  *
  * @param Mage_Payment_Model_Info $payment
  * @param string $transactionId
  *
  * @return array
  */
 public function fetchTransactionInfo(Mage_Payment_Model_Info $payment, $transactionId)
 {
     $reconcile = $this->reconcile($transactionId);
     // Remove the current details
     $payment->unsAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS);
     // Set the default/updated transaction details
     $payment->setAdditionalInformation(array(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS => $this->getHelper()->getArrayFromGatewayResponse($reconcile)), null);
     $payment->save();
     return $payment->getAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS);
 }
开发者ID:snehamalvankar,项目名称:magento-ce-emp-plugin,代码行数:18,代码来源:Direct.php


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