paymentGateway.setPaymentGatewayName(form.getPaymentGatewayName());
String provider = form.getPaymentGatewayProvider();
paymentGateway.setPaymentGatewayProvider(provider);
String paymentGatewayData = paymentGateway.getPaymentGatewayData();
if (provider.equals(AuthorizeNetEngine.class.getSimpleName())) {
AuthorizeNet authorizeNet = new AuthorizeNet();
if (!insertMode) {
authorizeNet = (AuthorizeNet) Utility.joxUnMarshall(AuthorizeNet.class, paymentGatewayData);
}
authorizeNet.setLoginId(form.getAuthorizeNetLoginId());
if (!Format.isNullOrEmpty(form.getAuthorizeNetTranKey())) {
authorizeNet.setTranKey(form.getAuthorizeNetTranKey());
}
authorizeNet.setEnvironment(form.getAuthorizeNetEnvironment());
paymentGatewayData = Utility.joxMarshall("AuthorizeNet", authorizeNet);
}
if (provider.equals(PsiGateEngine.class.getSimpleName())) {
PSIGate psiGate = new PSIGate();
if (!insertMode) {