示例#1
0
 /**
  * Copy masked card number from one transaction to another
  *
  * @param \XLite\Model\Payment\Transaction $parentTransaction Parent transaction
  * @param \XLite\Model\Payment\Transaction $transaction New transaction 
  *
  * @return void 
  */
 protected function copyMaskedCard($parentTransaction, $transaction)
 {
     $creditCardData = $parentTransaction->getCard();
     $transaction->saveCard(substr($creditCardData['card_number'], 0, 6), substr($creditCardData['card_number'], -4), $creditCardData['card_type'], substr($creditCardData['expire'], 0, 2), substr($creditCardData['expire'], -4));
 }
 /**
  * {@inheritDoc}
  */
 public function getCard($forRechargesOnly = false)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCard', array($forRechargesOnly));
     return parent::getCard($forRechargesOnly);
 }