/** * Test createCustomerCodeAndProcessCreditCard. * * @depends testCredentials */ public function testProcessLinkcreateCustomerCodeAndProcessCreditCard() { // Create and populate the request object. $request = array('customerIPAddress' => '', 'invoiceNum' => '00000001', 'ccNum' => '4222222222222220', 'ccExp' => '12/17', 'mop' => 'VISA', 'firstName' => 'Test', 'lastName' => 'Account', 'address' => '1234 Any Street', 'city' => 'Schenectady', 'state' => 'NY', 'zipCode' => '12345', 'cvv2' => '000', 'total' => '5', 'currency' => 'USD'); $iats = new ProcessLink(self::$agentCode, self::$password); $response = $iats->createCustomerCodeAndProcessCreditCard($request); $this->assertStringStartsWith('OK', trim($response['AUTHORIZATIONRESULT'])); self::$creditCardCustomerCode = trim($response['CUSTOMERCODE']); self::$creditCardTransactionId = trim($response['TRANSACTIONID']); }