Merchant Applications Documentation
Regardless of which programming language you are using, the architecture of the SDK is the same.
Each request to the [Base Commerce Merchant / Reseller Application] begins by initializing the BaseCommerceClient object, then creating a MerchantApplication object.
Once you have created your client, you will then create the objects that represent your Merchant Application. These objects, which will be discussed more in detail on the following pages. Below is a diagram displaying the relationship between all of the objects.
After creating and setting up your objects, it takes just one function call to the client to submit your application.
Now, to check if our example merchant application was accepted or not, we would take a look at the response code on each returned MerchantApplication object. The submitApplication method will return a List of MerchantApplications, one for each Location object sent in with the request.
This completes the process of submitting a Merchant Application and checking the response. In the event you are processing multiple applications, the same client object can be reused multiple times; however, a new MerchantApplicaiton object should be created with each request. When you are done with the client, there is no clean up to do, as all resources are closed and variables reset after each application is processed.
In the event that the server is unable to process your request due to a communication issue, a MerchantApplicationClientException will be thrown.