コード例 #1
0
 /**
  * verify
  * - payment will be made into a payload using the encrypted card number
  */
 public function testAddPaymentsToPayloadUseEcryptedCardNumber()
 {
     $processedPayments = new SplObjectStorage();
     $this->_paymentStub->expects($this->any())->method('getCcNumberEnc')->will($this->returnValue('enc-cc-num'));
     $this->_paymentStub->expects($this->any())->method('decrypt')->will($this->returnValue('enc-cc-num'));
     $this->_stubPayload(['setAccountUniqueId']);
     $this->_payloadStub->expects($this->once())->method('setAccountUniqueId')->with($this->identicalTo('enc-cc-num'))->will($this->returnSelf());
     $handler = Mage::getModel('ebayenterprise_creditcard/order_create_payment');
     $handler->addPaymentsToPayload($this->_orderStub, $this->_paymentContainer, $processedPayments);
 }