コード例 #1
0
ファイル: CustomerLinkTest.php プロジェクト: Greg-Boggs/PHP
 /**
  * Test createACHEFTCustomerCode.
  */
 public function testCustomerLinkcreateACHEFTCustomerCode()
 {
     $iats = new CustomerLink(self::$agentCode, self::$password, 'NA');
     $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' => '', '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');
     $response = $iats->createACHEFTCustomerCode($request);
     $this->assertEquals('OK', $response['AUTHORIZATIONRESULT']);
     self::$ACHEFTCustomerCode = $response['CUSTOMERCODE'];
 }
コード例 #2
0
ファイル: CustomerLinkTest.php プロジェクト: iatspayments/php
 /**
  * Test createInvalidACHEFTCustomerCode.
  */
 public function testCustomerLinkcreateInvalidACHEFTCustomerCode()
 {
     $iats = new CustomerLink(self::$agentCode, self::$password, 'NA');
     $beginTime = strtotime('+1 day');
     $endTime = mktime(0, 0, 0, date('n'), date('j'), date('Y') + 10);
     // Create and populate the request object.
     $request = array('customerIPAddress' => '', 'customerCode' => '', 'firstName' => '', 'lastName' => '', 'companyName' => '', 'address' => '', 'city' => '', 'state' => '', 'zipCode' => '', 'phone' => '', 'fax' => '', 'alternatePhone' => '', 'email' => '', 'comment' => '', 'recurring' => FALSE, 'amount' => '', 'beginDate' => $iats->getFormattedDate($beginTime), 'endDate' => $iats->getFormattedDate($endTime), 'scheduleType' => '', 'scheduleDate' => '', 'accountCustomerName' => '', 'accountNum' => '', 'accountType' => '');
     $response = $iats->createACHEFTCustomerCode($request);
     // This request should probably fail, but it doesn't so...
     $this->assertEquals('OK', $response['AUTHORIZATIONRESULT']);
 }