コード例 #1
0
ファイル: CustomerLinkTest.php プロジェクト: Greg-Boggs/PHP
 /**
  * Test directDebitUpdateACHEFTCustomerCode.
  */
 public function testCustomerLinkdirectDebitUpdateACHEFTCustomerCode()
 {
     // Test only valid for UK clients.
     $iats = new CustomerLink(self::$agentCode, self::$password, 'UK');
     $beginTime = mktime(0, 0, 0, date('n'), date('j'), date('Y'));
     $endTime = mktime(0, 0, 0, date('n'), date('j'), date('Y') + 10);
     // Create and populate the request object.
     $request = array('customerIPAddress' => '', 'customerCode' => self::$directDebitACHEFTCustomerCode, 'ACHEFTReferenceNum' => self::$directDebitACHEFTReferenceNum, 'firstName' => 'Test', 'lastName' => 'Account', 'companyName' => 'Test Co.', 'address' => '1234 Any Street', 'city' => 'Schenectady', 'state' => 'NY', 'zipCode' => '12345', 'phone' => '555-555-1234', 'fax' => '555-555-4321', 'alternatePhone' => '555-555-5555', 'email' => '*****@*****.**', 'comment' => 'Customer code update test.', 'recurring' => FALSE, 'amount' => '5', 'beginDate' => $iats->getFormattedDate($beginTime), 'endDate' => $iats->getFormattedDate($endTime), 'scheduleType' => 'Annually', 'scheduleDate' => '', 'accountCustomerName' => 'Test Account', 'accountNum' => '999999999', 'accountType' => 'CHECKING', 'updateAccountNum' => FALSE);
     $response = $iats->directDebitUpdateACHEFTCustomerCode($request);
     // API responded correctly.
     $this->assertEquals('OK', $response['AUTHORIZATIONRESULT']);
 }
コード例 #2
0
ファイル: CustomerLinkTest.php プロジェクト: iatspayments/php
 /**
  * Test getCustomerCodeDetail with an invalid customer code.
  *
  * @depends testgetCustomerCodeDetail
  */
 public function testgetCustomerCodeDetailInvalidCode()
 {
     // Create and populate the request object.
     $request = array('customerIPAddress' => '', 'customerCode' => self::TEST_INVALID_CUSTOMER_CODE);
     $iats = new CustomerLink(self::$agentCode, self::$password, 'NA');
     $response = $iats->getCustomerCodeDetail($request);
     $this->assertEquals('Error : The customer code doesn\'t exist!', $response['AUTHORIZATIONRESULT']);
 }