@Override
  public void prepareModule() throws Exception {
    Context ctx =
        (Context) super.getServletRequest().getSession().getAttribute(ProfileConstants.context);
    Integer merchantid = ctx.getMerchantid();

    ReferenceService rservice =
        (ReferenceService) ServiceFactory.getService(ServiceFactory.ReferenceService);

    Locale locale = getLocale();

    String country = locale.getCountry();
    if (locale.getVariant().equals("EUR")) {
      country = "X1";
    }

    Map packages = ShippingUtil.buildPackageMap(moduleid, locale);
    if (packages != null) {
      setPackageMap(packages);
    }

    // get merchant configs
    MerchantService mservice =
        (MerchantService) ServiceFactory.getService(ServiceFactory.MerchantService);

    ConfigurationResponse config = mservice.getConfigurationByModule(moduleid, merchantid);
    this.setConfigurations(config);
  }
  @Override
  public void prepareModule() throws Exception {

    Context ctx =
        (Context) super.getServletRequest().getSession().getAttribute(ProfileConstants.context);
    Integer merchantid = ctx.getMerchantid();

    MerchantService mservice =
        (MerchantService) ServiceFactory.getService(ServiceFactory.MerchantService);

    String text =
        LabelUtil.getInstance().getText(super.getLocale(), "label.payment.methods.title.papal");
    this.setMessage(text);

    MerchantStore mstore = mservice.getMerchantStore(merchantid);

    if (mstore == null) {
      MessageUtil.addErrorMessage(
          super.getServletRequest(),
          LabelUtil.getInstance().getText("errors.profile.storenotcreated"));
    }

    ConfigurationResponse config = mservice.getConfigurationByModule(moduleid, merchantid);
    this.setConfigurations(config);
  }