addMerchantApplication
Reseller only method
Description
This method adds a new merchant application to the system. If successful, the application ID will be returned. The application ID can be used to check on the status of the merchant application.
Please note that this function does not create a merchant account. The application will be reviewed and activated by the gateway staff. Once activated, a merchant ID will be assigned and all supported merchant related methods may be used.
See also getMerchantApplicationStatus
Syntax
integer addMerchantApplication ( ueSecurityToken Token, MerchantApplication Application )
Arguments
Type | Name | Description |
---|---|---|
ueSecurityToken | Token | Reseller security token: used to identify reseller and validate request. |
MerchantApplication | Application | MerchantApplication object containing merchant information. |
Return Value
integer | Returns merchant application ID if successful, if request fails, an exception will be thrown. |
Exceptions
The following exceptions (errors) are applicable to this method.
Code | Message | Advice |
---|---|---|
19000 | Unable to save application. | A temporary error occurred while saving the application. Try again or contact support |
19001 | The field 'fieldname' is required. | A required field was not populated. See the error message for the name of the missing field. |
19014 | Email address 'fieldname' not valid | The email address fields was not a valid email address. It did not pass the formatting check. Check formatting. |
19015 | Email address 'fieldname' not valid | One of the email addresses entered was invalid. It did not pass the DNS or mail server delivery checks. Double check the address. |
19016 | Requested credit card platform not supported | The CreditCardPlatform was not found in the list of supported platforms |
19017 | Requested credit card industry not supported | The CreditCardIndustry was not a supported industry. |
19019 | Requested check platform not supported | The eCheckPlatform was not found in the list of supported platforms. |
19020 | Billing package not found. | Specified billing package was not found. Double check the list of valid billing package names. |
Examples
PHP
For directions on how to set up the WSDL link, create "$token" and "$client", go to PHP Soap How-to.
<?php
try {
$App=new stdClass();
$App->ResellerEmail='applications@reseller.com';
$App->ContactInfo = new stdClass();
$App->MerchantName = "Acme Bagel Company";
$App->ContactInfo->Contact = "John Doe";
$App->ContactInfo->Street ='4929 Wilshire Blvd';
$App->ContactInfo->Street2 ='Suite 800';
$App->ContactInfo->City ='Los Angeles';
$App->ContactInfo->State ='CA';
$App->ContactInfo->Zip ='90010';
$App->ContactInfo->Country ='US';
$App->ContactInfo->Email = 'john@acme';
$App->ContactInfo->Fax ='012134567890';
$App->ContactInfo->Phone ='687668678677';
$App->ContactInfo->MobilePhone='798787978788';
$App->ContactInfo->AltEmail='mary@acmebagels.com';
$App->ContactInfo->URL = 'http://acme bagels.com';
$App->BillingInfo = new stdClass();
$App->BillingInfo->BankName = 'Bank of America';
$App->BillingInfo->RoutingNumber = '12342313312';
$App->BillingInfo->AccountNumber = '57655765754';
$App->BillingInfo->GatewayPackage = 'Platinum Package';
$App->CreditCardPlatform = 'FDMS';
$App->CreditCardIndustry = 'Retail';
$App->CreditCardPlatformSetup = array();
$App->CreditCardPlatformSetup[] = array('Field'=>'MerchantNum', 'Value'=>'4454900399430020');
$App->CreditCardPlatformSetup[] = array('Field'=>'MerchantID', 'Value'=>'382772891');
$App->CreditCardPlatformSetup[] = array('Field'=>'TerminalID', 'Value'=>'112198000');
$App->eCheckPlatform = 'Vericheck';
$App->eCheckPlatformSetup = array();
$App->eCheckPlatformSetup[] = array('Field'=>'DefaultSEC', 'Value'=>'TEL');
$App->eCheckPlatformSetup[] = array('Field'=>'TaxID', 'Value'=>'123456789');
$App->eCheckPlatformSetup[] = array('Field'=>'PIN', 'Value'=>'231');
$App->eCheckPlatformSetup[] = array('Field'=>'MID', 'Value'=>'11231');
$App->eCheckPlatformSetup[] = array('Field'=>'AcceptedSecCodes', 'Value'=>'TEL,PPD,CCD');
$App->SourceKeyName = 'My Shopping Cart';
$App->SourceKeyPin = '1351';
$App->EmailSourceKeyTo = 'demo@acmebagels.com';
$App->UserName = 'acmebagels';
$App->EmailInstructionsTo = 'demo@acmebagels.com';
$App->ApplicationNotes = 'An example note for merchant application';
$ApplicationID=$client->addMerchantApplication($restoken, $App);
}
catch (SoapFault $e) {
echo $client->__getLastRequest();
echo $client->__getLastResponse();
die("addMerchantApplication failed: " .$e->getMessage());
}
?>
.NET C
reseller.MerchantApplication merchant = new reseller.MerchantApplication();
merchant.ResellerEmail = "irina@newtekgateway.com";
merchant.MerchantName = "Acme Bagel Company";
merchant.ContactInfo = new reseller.ContactInfo();
merchant.ContactInfo.Contact = "Tester Jones";
merchant.ContactInfo.Street = "123 main st.";
merchant.ContactInfo.Street2 = "suit 100";
merchant.ContactInfo.City = "Los Angeles";
merchant.ContactInfo.State = "CA";
merchant.ContactInfo.Zip = "90038";
merchant.ContactInfo.Country = "USA";
merchant.ContactInfo.Email = "irina@newtekgateway.com";
merchant.ContactInfo.Fax = "800-888-9999";
merchant.ContactInfo.Phone = "800-888-9999";
merchant.ContactInfo.MobilePhone = "800-999-8888";
merchant.ContactInfo.AltEmail = "irina@newtekgateway.com";
merchant.ContactInfo.URL = "http://test.com";
merchant.BillingInfo = new reseller.BillingInfo();
merchant.BillingInfo.BankName = "Bank of America";
merchant.BillingInfo.RoutingNumber = "123456789";
merchant.BillingInfo.AccountNumber = "123456789";
merchant.BillingInfo.GatewayPackage = "Platinum Package";
merchant.CreditCardPlatform = "FDMS";
merchant.CreditCardIndustry = "Retail (Swipe)";
reseller.FieldValue[] platform = new reseller.FieldValue[3];
for (int i = 0; i < 3; i++){
platform[i] = new reseller.FieldValue();
}
platform[0].Field = "MerchantNum"; platform[0].Value = "4454900399430020";
platform[1].Field = "MerchantID"; platform[1].Value = "382772891";
platform[2].Field = "TerminalID"; platform[2].Value = "382772891";
merchant.CreditCardPlatformSetup = platform;
merchant.eCheckPlatform = "Vericheck";
reseller.FieldValue[] checkplatform = new reseller.FieldValue[5];
for (int i = 0; i< 5; i++){
checkplatform[i] = new reseller.FieldValue();
}
checkplatform[0].Field = "DefaultSEC"; checkplatform[0].Value = "TEL";
checkplatform[1].Field = "TaxID"; checkplatform[1].Value = "123456789";
checkplatform[2].Field = "PIN"; checkplatform[2].Value = "231";
checkplatform[3].Field = "MID"; checkplatform[3].Value = "11231";
checkplatform[4].Field = "AcceptedSecCodes"; checkplatform[4].Value = "TEL,PPD,CCD";
merchant.eCheckPlatformSetup = checkplatform;
merchant.SourceKeyName = "My Shopping Cart";
merchant.SourceKeyPin = "1351";
merchant.EmailInstructionsTo = "test@test.com";
merchant.UserName = "testmerchant";
merchant.EmailSourceKeyTo = "test@test.com";
merchant.ApplicationNotes = "an example";
string refNum;
try
{
refNum = reclient.addMerchantApplication(retoken,merchant);
MessageBox.Show(string.Concat(refNum));
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}
Java
MerchantApplication merchantapp = new MerchantApplication();
merchantapp.setApplicationNotes("Application notes");
BillingInfo billing = new BillingInfo();
billing.setBankName("Example Bank");
billing.setRoutingNumber("123456789");
billing.setAccountNumber("910293112");
billing.setGatewayPackage("Silver Package");
merchantapp.setBillingInfo(billing);
merchantapp.setCallInPassword("1234");
ContactInfo contactinfo = new ContactInfo();
contactinfo.setContact("John Doe");
contactinfo.setStreet("4929 Wilshire Blvd");
contactinfo.setStreet2("Suite 899");
contactinfo.setCity("Los Angeles");
contactinfo.setState("CA");
contactinfo.setZip("90010");
contactinfo.setCountry("US");
contactinfo.setEmail("merchant@tmcode.com");
contactinfo.setAltEmail("merchant@tmcode.com");
contactinfo.setPhone("222-333-4446");
contactinfo.setMobilePhone("222-333-4445");
contactinfo.setFax("222-333-4444");
contactinfo.setURL("http://www.acme.org");
merchantapp.setContactInfo(http://help.newtekgateway.com/developer/soap-api/boarding/objects/contactinfo/);
merchantapp.setCreditCardIndustry("eCommerce");
merchantapp.setCreditCardPlatform("FDMS");
FieldValueArray platformdata = new FieldValueArray();
platformdata.add(new FieldValue("MerchantNum","2334566356345"));
platformdata.add(new FieldValue("MerchantID","1231230"));
platformdata.add(new FieldValue("TerminalID","1231239"));
merchantapp.setCreditCardPlatformSetup(platformdata);
merchantapp.setECheckPlatform("Vericheck");
FieldValueArray checkplatform = new FieldValueArray();
checkplatform.add(new FieldValue("DefaultSEC","TEL"));
checkplatform.add(new FieldValue("TaxID","123456789"));
checkplatform.add(new FieldValue("PIN","231"));
checkplatform.add(new FieldValue("MID","11231"));
checkplatform.add(new FieldValue("AcceptedSecCodes","TEL,PPD,CCD"));
merchantapp.setECheckPlatformSetup(checkplatform);
merchantapp.setEmailInstructionsTo("merchant@tmcode.com");
merchantapp.setEmailSourceKeyTo("merchant@tmcode.com");
merchantapp.setMerchantName("Example Company");
merchantapp.setResellerEmail("reselller@tmcode.com");
merchantapp.setSourceKeyName("ShoppingCart");
merchantapp.setSourceKeyPin("1234");
merchantapp.setUserName("jdoe23");
BigInteger apprefnum;
apprefnum = client.addMerchantApplication(restoken, merchantapp);
Change History
Version | Change |
---|---|
1.1 | Method added prior to soap-1.1 |