예제 #1
0
 /** 初始化店铺本地存储插件数据 */
 private void initStoragePlugin(Store store) {
   PluginConfig pluginConfig = new PluginConfig();
   pluginConfig.setPluginId(filePlugin.getId());
   pluginConfig.setIsEnabled(true);
   pluginConfig.setStore(store);
   pluginConfigService.save(pluginConfig);
 }
예제 #2
0
 /** 安装 */
 @RequestMapping(value = "/install", method = RequestMethod.POST)
 public @ResponseBody Message install() {
   if (!qqLoginPlugin.getIsInstalled()) {
     PluginConfig pluginConfig = new PluginConfig();
     pluginConfig.setPluginId(qqLoginPlugin.getId());
     pluginConfig.setIsEnabled(false);
     pluginConfig.setAttributes(null);
     pluginConfigService.save(pluginConfig);
   }
   return SUCCESS_MESSAGE;
 }
예제 #3
0
 /**
  * 初始化支付宝信息 - 公司的支付宝
  *
  * @param store
  */
 private void initAlipayDirect(Store store) {
   PluginConfig pluginConfig = new PluginConfig();
   pluginConfig.setPluginId(alipayDirectPlugin.getId());
   pluginConfig.setAttribute(PaymentPlugin.PAYMENT_NAME_ATTRIBUTE_NAME, "支付宝");
   pluginConfig.setAttribute("partner", "2088211535838965");
   pluginConfig.setAttribute("key", "14hqtaakskwm11j8bc7rniui8wf7hpcd");
   pluginConfig.setAttribute(PaymentPlugin.FEE_TYPE_ATTRIBUTE_NAME, FeeType.fixed.toString());
   pluginConfig.setAttribute(PaymentPlugin.FEE_ATTRIBUTE_NAME, "0");
   pluginConfig.setAttribute(
       PaymentPlugin.LOGO_ATTRIBUTE_NAME,
       "http://storage.shopxx.net/demo-image/3.0/payment_plugin/alipay.gif");
   pluginConfig.setAttribute(PaymentPlugin.DESCRIPTION_ATTRIBUTE_NAME, "");
   pluginConfig.setIsEnabled(true);
   pluginConfig.setOrder(1);
   pluginConfig.setStore(store);
   pluginConfigService.save(pluginConfig);
 }