...
- Define the custom payment gateway in payment gateways metadata file.
- Create a custom enum to define authentication setting parameters. (optional)
- Create a custom business object class extending com.crm.businessobject.paymentgateway.CRMBOPaymentGatewaySettingBean.
- Create a user interface class extending com.crm.process.paymentgateway.CRMUIPaymentGatewaySettingBean
- Create a custom process class extending com.crm.process.paymentgateway.CRMProcessPaymentGatewayBean
- Create a custom search page.
- Create a custom summary page for payment gateway requests.
- Create a custom data entry page for payment the payment gateway.
- Define the new menu options in menu options metadata file.
- Define a custom module in modules metadata file.
...
For this example we assume that <custom_project> = mycompany and the provisioning provider is Alpha Networks Tucanopayeezy
1.
...
Payment Gateways Metadata File
The new custom provider payment gateway must be defined in provisioningproviderspaymentgateways.xml file which is located under <custom_project>/websrc/main/WebContentresources/metadata/ directory.
Ui expand | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
Provider Protocol options in Reset Single Subscription Utility and Reset Subscriptions Run Definition pages are built based on the provisioning providers defined in the above file.
|
2. Provisioning Parameters Data Object Class
The new custom data object class must extend com.crm.dataobject.provisioning.ProvisioningParameters.
...
|
2. Provisioning Parameters Enum
This enum will be used to define the authentication setting parameters. Note that 'order' property will be used to define the parameter's order on the screen.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
public class MYCOMPANYTucanoParameters extends ProvisioningParameters { private String url; private String identityKey; private String username; private String password; private String languageID; private String jwtKey; private Integer jwtExpirationTimeInSeconds; private String providerID; private String tveAdapter; private Integer defaultProductID; private Integer stbMaterialID; private String addressCountry; public String getTveAdapter() { return tveAdapter; } public void setTveAdapter(String tveAdapter) { this.tveAdapter = tveAdapter; } public String getProviderID() { return providerID; } public void setProviderID(String providerID) { this.providerID = providerID; } public Integer getDefaultProductID() { return defaultProductID; } public void setDefaultProductID(Integer defaultProductID) { this.defaultProductID = defaultProductID; } public Integer getStbMaterialID() { return stbMaterialID; } public void setStbMaterialID(Integer stbMaterialID) { this.stbMaterialID = stbMaterialID; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getIdentityKey() { return identityKey; } public void setIdentityKey(String identityKey) { this.identityKey = identityKey; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getLanguageID() { return languageID; } public void setLanguageID(String languageIDpackage payeezy.dataobject.paymentgateway.payeezy; import com.crm.dataobject.ICRMLookupEnum; public enum PayeezyParameter implements ICRMLookupEnum{ MODE("key_mode", "String",1), TEST_URL("key_url", "String",2), TEST_MERCHANT_TOKEN("key_merchant_token", "String",3), TEST_TA_TOKEN("key_transarmor_token", "String",4), TEST_API_KEY("key_api_key", "String",5), TEST_API_SECRET("key_api_secret", "String",6), TEST_JS_SECURITY_KEY("key_js_security_key", "String",7), LIVE_URL("key_url", "String",2), LIVE_MERCHANT_TOKEN("key_merchant_token", "String",3), LIVE_TA_TOKEN("key_transarmor_token", "String",4), LIVE_API_KEY("key_api_key", "String",5), LIVE_API_SECRET("key_api_secret", "String",6), LIVE_JS_SECURITY_KEY("key_js_security_key", "String",7); private String label; private String type; private Integer order; private PayeezyParameter(String label, String type, Integer order) { this.languageIDlabel = languageIDlabel; } publicthis.type String getJwtKey() { return jwtKey= type; } public void setJwtKey(String jwtKey) { this.jwtKeyorder = jwtKeyorder; } public Integer getJwtExpirationTimeInSeconds() { return jwtExpirationTimeInSeconds;@Override } public voidString setJwtExpirationTimeInSecondsgetLabel(Integer jwtExpirationTimeInSeconds) { this.jwtExpirationTimeInSeconds = jwtExpirationTimeInSecondsreturn label; } public String getAddressCountrygetType() { return addressCountrytype; } public voidInteger setAddressCountrygetOrder(String addressCountry) { this.addressCountry = addressCountryreturn order; } } |
To achieve that, when you create a new provisioning provider object (CRMDOProvProvider) you have to create new object of your provisioning parameters data object class and set it to the 'parameters' property of the CRMDOProvProvider object:
...