/**
  * @group integration
  */
 public function testCallMerchantAliasCreation()
 {
     return true;
     /* Creating the WebService main object */
     $test = new CreateMerchantAlias();
     /* Creating the WebService message object */
     $testArgument = new CreateMerchantAliasRequest();
     /* Setting the parameters */
     $testAlias = new Alias();
     $testAlias->setAliasName("351#911521624");
     $testAlias->setAliasTypeCde(Alias::CELLPHONE);
     $testArgument->setAlias($testAlias);
     $testMerchant = new Merchant();
     $testMerchant->setIPAddress($this->getConfig()->getMerchantIP())->setPosId($this->getConfig()->getMerchantPosId());
     $testArgument->setMerchant($testMerchant);
     $testMsgProps = new MessageProperties();
     $testMsgProps->setChannel("01");
     $testMsgProps->setChannelTypeCode("VPOS");
     $testMsgProps->setNetworkCode("MULTIB");
     $merchantTimestamp = date_create("2014-09-28");
     $testMsgProps->setTimestamp($merchantTimestamp);
     $testMsgProps->setServiceType("01");
     $testMsgProps->setApiVersion("1");
     $testArgument->setMessageProperties($testMsgProps);
     $testNewAlias = new Alias();
     $testNewAlias->setAliasName("mykubo-mbway-1234567891234");
     $testNewAlias->setAliasTypeCde(Alias::GENERIC);
     $testArgument->setNewAlias($testNewAlias);
     $test->setArg0($testArgument);
     $service = new MBWayClient($this->getConfig());
     $service->setSandbox(true);
     $response = $service->createMerchantAlias($test);
     $return = $response->getReturn();
     //Return 124 because merchant didn't make any purchase before
     $this->assertSame("124", $return->getStatusCode());
 }
Пример #2
0
 /**
  * @depends testConstructor
  *
  * @param MessageProperties $messageProperties
  */
 public function testGettersSetters(MessageProperties $messageProperties)
 {
     $messageProperties->setChannel('channel2');
     $messageProperties->setApiVersion('apiversion2');
     $messageProperties->setChannelTypeCode('channeltypecode2');
     $messageProperties->setNetworkCode('networkcode2');
     $messageProperties->setServiceType('servicetype2');
     $datetime = date_create("2014-03-15");
     $messageProperties->setTimestamp($datetime);
     $this->assertSame($messageProperties->getChannel(), 'channel2');
     $this->assertSame($messageProperties->getApiVersion(), 'apiversion2');
     $this->assertSame($messageProperties->getChannelTypeCode(), 'channeltypecode2');
     $this->assertSame($messageProperties->getNetworkCode(), 'networkcode2');
     $this->assertSame($messageProperties->getServiceType(), 'servicetype2');
     $this->assertEquals($messageProperties->getTimestamp(), $datetime);
 }