You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JollyMaxClientclient=DefaultJollyMaxClient.getInstance();
client.setEnv(Env.UAT);
// or set the other base url// client.setBaseUrl("https://the-other-url.jollymax.com/aggregate-pay/api/gateway");
If you have only one merchant
StringmerchantPrivateKey="get your private key from testGenKeyPair()";
StringjollyMaxPublicKey="get jollymax public key from dashboard";
StringmerchantNo="get merchantNo from dashboard";
StringappId="get appId from dashboard";
MerchantConfigmerchantConfig=MerchantConfig.Builder.builder()
.merchantPrivateKey(merchantPrivateKey)
.jollyMaxPublicKey(jollyMaxPublicKey)
.merchantNo(merchantNo)
.appId(appId)
.build();
GlobalMerchantConfig.setDefaultConfig(merchantConfig);
If you have multi merchants
Map<String, String> keyPair=RsaUtils.createKeyPair();
StringmerchantPrivateKey=keyPair.get(RsaUtils.PRIVATE_KEY_FILE);
StringjollyMaxPublicKey="get jollymax public key from dashboard";
StringmerchantNo="the other merchant no";
StringappId="get appId from dashboard";
//In ISV mode, spMerchantNo and merchantAuthToken is requiredStringspMerchantNo="get spMerchantNo from dashboard";
StringmerchantAuthToken="get merchantAuthToken from dashboard";
MerchantConfigmerchantConfig=MerchantConfig.Builder.builder()
.merchantPrivateKey(merchantPrivateKey)
.jollyMaxPublicKey(jollyMaxPublicKey)
.merchantNo(merchantNo)
.appId(appId)
.build();
GlobalMerchantConfig.addConfig(merchantConfig);
// MerchantConfig merchantConfig2 = ....// GlobalMerchantConfig.addConfig(merchantConfig2);// MerchantConfig merchantConfig3 = ....// GlobalMerchantConfig.addConfig(merchantConfig3);