break; } else { $this->success = false; $this->error = true; break; } $count++; } } public function createAccount() { $this->xml = "<?xml version='1.0' encoding='utf-8'?>\r\t\t <ARBCreateSubscriptionRequest xmlns='AnetApi/xml/v1/schema/AnetApiSchema.xsd'>\r\t\t <merchantAuthentication>\r\t\t <name>" . $this->params['login'] . "</name>\r\r\t\t <transactionKey>" . $this->params['transkey'] . "</transactionKey>\r\r\t\t </merchantAuthentication>\r\r\t\t <refId>" . $this->params['refID'] . "</refId>\r\r\t\t <subscription>\r\r\t\t <name>" . $this->params['subscrName'] . "</name>\r\r\t\t <paymentSchedule>\r\r\t\t <interval>\r\r\t\t <length>" . $this->params['interval_length'] . "</length>\r\r\t\t <unit>" . $this->params['interval_unit'] . "</unit>\r\r\t\t </interval>\r\r\t\t <startDate>" . $this->params['startDate'] . "</startDate>\r\r\t\t <totalOccurrences>" . $this->params['totalOccurrences'] . "</totalOccurrences>\r\r\t\t <trialOccurrences>" . $this->params['trialOccurrences'] . "</trialOccurrences>\r\r\t\t </paymentSchedule>\r\r\t\t <amount>" . $this->params['amount'] . "</amount>\r\r\t\t <trialAmount>" . $this->params['trialAmount'] . "</trialAmount>\r\r\t\t <payment>\r\r\t\t <creditCard>\r\r\t\t <cardNumber>" . $this->params['cardNumber'] . "</cardNumber>\r\r\t\t <expirationDate>" . $this->params['expirationDate'] . "</expirationDate>\r\r\t\t <cardCode>" . $this->params['cardCode'] . "</cardCode>\r\r\t\t </creditCard>\r\r\t\t </payment>\r\r\t\t <order>\r\r\t\t <invoiceNumber>" . $this->params['orderInvoiceNumber'] . "</invoiceNumber>\r\r\t\t <description>" . $this->params['orderDescription'] . "</description>\r\r\t\t </order>\r\r\t\t <customer>\r\r\t\t <id>" . $this->params['customerId'] . "</id>\r\r\t\t <email>" . $this->params['customerEmail'] . "</email>\r\r\t\t <phoneNumber>" . $this->params['customerPhoneNumber'] . "</phoneNumber>\r\r\t\t <faxNumber>" . $this->params['customerFaxNumber'] . "</faxNumber>\r\r\t\t </customer>\r\r\t\t <billTo>\r\r\t\t <firstName>" . $this->params['firstName'] . "</firstName>\r\r\t\t <lastName>" . $this->params['lastName'] . "</lastName>\r\r\t\t <address>" . $this->params['address'] . "</address>\r\r\t\t <city>" . $this->params['city'] . "</city>\r\r\t\t <state>" . $this->params['state'] . "</state>\r\r\t\t <zip>" . $this->params['zip'] . "</zip>\r\r\t\t </billTo>\r\r\t\t </subscription>\r\r\t\t </ARBCreateSubscriptionRequest>";