com.canking.minipay.Config Java Examples

The following examples show how to use com.canking.minipay.Config. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MainActivity.java    From AideHelper with MIT License 5 votes vote down vote up
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
  switch (preference.getKey()) {
    case "donation":
      Config config = new Config.Builder("FKX03835LYVF3XNJFBLVB0", R.drawable.alipay,
          R.drawable.wechat)
          .build();
      MiniPayUtils.setupPay(this, config);
      break;
    case "update_log":
      updateLogDialog(true);
      break;
  }
  return super.onPreferenceTreeClick(preferenceScreen, preference);
}
 
Example #2
Source File: MainActivity.java    From MiniPay with Apache License 2.0 4 votes vote down vote up
public void onClick(View v) {
    if (v.getId() == R.id.go_pay) {
        MiniPayUtils.setupPay(this, new Config.Builder("apafm3kp91df7yo517", R.mipmap.ic_zhifubao, R.mipmap.ic_weixin).build());
    }
}