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


PHP Mage_Sales_Model_Order_Payment::getLastTransId方法代码示例

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


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

示例1: processInvoice

 /**
  * Set capture transaction ID to invoice for informational purposes
  * @param Mage_Sales_Model_Order_Invoice $invoice
  * @param Mage_Sales_Model_Order_Payment $payment
  * @return Mage_Payment_Model_Method_Abstract
  */
 public function processInvoice($invoice, $payment)
 {
     $invoice->setTransactionId($payment->getLastTransId());
     return $this;
 }
开发者ID:beejhuff,项目名称:magento-1.13.0.2,代码行数:11,代码来源:Gate.php

示例2: doCancel

 /**
  * Call Cancel API, the transaction must be Authorized beforehand
  *
  * @param Mage_Sales_Model_Order_Payment $payment
  * @return Eway_Rapid31_Model_Request_Direct
  */
 public function doCancel(Mage_Sales_Model_Order_Payment $payment)
 {
     // Empty Varien_Object's data
     $this->unsetData();
     $transactionId = $payment->getLastTransId();
     $this->setTransactionId($transactionId);
     $response = $this->_doRapidAPI('CancelAuthorisation');
     if ($response->isSuccess()) {
         $payment->setTransactionId($response->getTransactionID());
         $payment->setIsTransactionClosed(1);
         return $this;
     } else {
         Mage::throwException(Mage::helper('ewayrapid')->__('An error occurred while doing the cancel. Please try again. (Error message: %s)', $response->getMessage()));
     }
 }
开发者ID:programmerrahul,项目名称:vastecom,代码行数:21,代码来源:Direct.php

示例3: processCreditmemo

 /**
  * Set transaction ID into creditmemo for informational purposes
  * @param Mage_Sales_Model_Order_Creditmemo $creditmemo
  * @param Mage_Sales_Model_Order_Payment $payment
  * @return Mage_Payment_Model_Method_Abstract
  */
 public function processCreditmemo($creditmemo, $payment)
 {
     $creditmemo->setTransactionId($payment->getLastTransId());
     return $this;
 }
开发者ID:technomagegithub,项目名称:colb2b,代码行数:11,代码来源:Abstract.php

示例4: processInvoice

 /**
  * Set capture transaction ID and enable Void to invoice for informational purposes
  * @param Mage_Sales_Model_Order_Invoice $invoice
  * @param Mage_Sales_Model_Order_Payment $payment
  * @return Mage_Payment_Model_Method_Abstract
  */
 public function processInvoice($invoice, $payment)
 {
     if ($payment->getLastTransId()) {
         $invoice->setTransactionId($payment->getLastTransId());
         $invoice->setCanVoidFlag(true);
         if (Mage::helper('sales')->canSendNewInvoiceEmail($payment->getOrder()->getStoreId())) {
             $invoice->setEmailSent(true);
             $invoice->sendEmail();
         }
         return $this;
     }
     return false;
 }
开发者ID:rorteg,项目名称:rafaelmage,代码行数:19,代码来源:Standard.php

示例5: _isPreauthCapture

 protected function _isPreauthCapture(Mage_Sales_Model_Order_Payment $payment)
 {
     return (bool) $payment->getLastTransId();
 }
开发者ID:programmerrahul,项目名称:vastecom,代码行数:4,代码来源:Notsaved.php

示例6: _preauthorizeCapture

 /**
  *
  * @param Mage_Sales_Model_Order_Payment $payment
  * @param float $amount
  */
 protected function _preauthorizeCapture($payment, $amount)
 {
     $transactionId = $payment->getLastTransId();
     $gatewayParams = array('operation' => 'capture', 'amount' => $amount);
     $this->_debug($gatewayParams);
     /* @var $request Allopass_Hipay_Model_Api_Request */
     $request = Mage::getModel('hipay/api_request', array($this));
     $uri = Allopass_Hipay_Model_Api_Request::GATEWAY_ACTION_MAINTENANCE . $transactionId;
     $gatewayResponse = $request->gatewayRequest($uri, $gatewayParams, $payment->getOrder()->getStoreId());
     $this->_debug($gatewayResponse->debug());
     switch ($gatewayResponse->getStatus()) {
         case "116":
             $this->addTransaction($payment, $gatewayResponse->getTransactionReference(), Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH, array('is_transaction_closed' => 0), array(), Mage::helper('hipay')->getTransactionMessage($payment, self::OPERATION_MAINTENANCE_ACCEPT_CHALLENGE, $gatewayResponse->getTransactionReference(), $amount));
             $payment->setIsTransactionPending(true);
             break;
         case "117":
             //Capture requested
         //Capture requested
         case "118":
             //Capture
         //Capture
         case "119":
             //Partially Capture
             $this->addTransaction($payment, $gatewayResponse->getTransactionReference(), Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE, array('is_transaction_closed' => 0), array(), Mage::helper('hipay')->getTransactionMessage($payment, self::OPERATION_MAINTENANCE_CAPTURE, $gatewayResponse->getTransactionReference(), $amount));
             $payment->setIsTransactionPending(true);
             break;
         default:
             Mage::throwException($gatewayResponse->getStatus() . " ==> " . $gatewayResponse->getMessage() . " is not processed!");
             break;
     }
     return $this;
 }
开发者ID:hipay,项目名称:hipay-fullservice-sdk-magento1,代码行数:37,代码来源:Abstract.php

示例7: loadByPayment

 /**
  * @param Mage_Sales_Model_Order_Payment $payment
  * @return Payone_Core_Model_Domain_Transaction
  */
 public function loadByPayment(Mage_Sales_Model_Order_Payment $payment)
 {
     $this->load($payment->getLastTransId(), 'txid');
     return $this;
 }
开发者ID:kirchbergerknorr,项目名称:payone-magento,代码行数:9,代码来源:Transaction.php

示例8: callDoRefund

 /**
  * @param Mage_Sales_Model_Order_Payment $payment
  * @param float $amount
  * @return array|false
  */
 protected function callDoRefund($payment, $amount)
 {
     // Build the XML request
     $xml = new SimpleXMLElement('<ewaygateway></ewaygateway>');
     $xml->addChild('ewayCustomerID', $this->getCustomerId());
     $xml->addChild('ewayTotalAmount', $this->getFormattedAmount($amount));
     $xml->addChild('ewayCardExpiryMonth', $payment->getCcExpMonth());
     $xml->addChild('ewayCardExpiryYear', substr($payment->getCcExpYear(), 2, 2));
     $xml->addChild('ewayOriginalTrxnNumber', $this->getOriginalTransactionId($payment->getLastTransId()));
     $xml->addChild('ewayRefundPassword', $this->getRefundPassword());
     $xml->addChild('ewayOption1', '');
     $xml->addChild('ewayOption2', '');
     $url = $this->getApiRefundUrl();
     // Convert to string before sending to the gateway
     return $this->call($xml->asXML(), $url);
 }
开发者ID:netzkollektiv,项目名称:fontis_ewayau,代码行数:21,代码来源:Direct.php


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