}
psiGate.setEnvironment(form.getPsiGateEnvironment());
paymentGatewayData = Utility.joxMarshall("PSIGate", psiGate);
}
if (provider.equals(PayPalEngine.class.getSimpleName())) {
PayPalExpressCheckOut payPalExpressCheckOut = new PayPalExpressCheckOut();
if (!insertMode) {
payPalExpressCheckOut = (PayPalExpressCheckOut) Utility.joxUnMarshall(PayPalExpressCheckOut.class, paymentGatewayData);
}
payPalExpressCheckOut.setPaymentPaypalCustClassId(Format.getLong(form.getPaymentPaypalCustClassId()));
payPalExpressCheckOut.setPaymentPaypalApiUsername(form.getPaymentPaypalApiUsername());
payPalExpressCheckOut.setPaymentPaypalEnvironment(form.getPaymentPaypalEnvironment());
if (!Format.isNullOrEmpty(form.getPaymentPaypalExtraAmount())) {
payPalExpressCheckOut.setPaymentPaypalExtraAmount(Format.getDouble(form.getPaymentPaypalExtraAmount()));
}
if (!Format.isNullOrEmpty(form.getPaymentPaypalExtraPercentage())) {
payPalExpressCheckOut.setPaymentPaypalExtraPercentage(Format.getDouble(form.getPaymentPaypalExtraPercentage()));
}
if (!Format.isNullOrEmpty(form.getPaymentPaypalApiPassword())) {
payPalExpressCheckOut.setPaymentPaypalApiPassword(AESEncoder.getInstance().encode(form.getPaymentPaypalApiPassword()));
}
if (!Format.isNullOrEmpty(form.getPaymentPaypalSignature())) {
payPalExpressCheckOut.setPaymentPaypalSignature(AESEncoder.getInstance().encode(form.getPaymentPaypalSignature()));
}
paymentGatewayData = Utility.joxMarshall("PayPalExpressCheckOut", payPalExpressCheckOut);
}
if (provider.equals(PayPalWebsitePaymentProEngine.class.getSimpleName())) {
PayPalWebsitePaymentPro payPalWebsitePaymentPro = new PayPalWebsitePaymentPro();