• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java PaymentActivity类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.pingplusplus.android.PaymentActivity的典型用法代码示例。如果您正苦于以下问题:Java PaymentActivity类的具体用法?Java PaymentActivity怎么用?Java PaymentActivity使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PaymentActivity类属于com.pingplusplus.android包,在下文中一共展示了PaymentActivity类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: handlePayResult

import com.pingplusplus.android.PaymentActivity; //导入依赖的package包/类
private void handlePayResult(JSONObject object) {
    if (object == null) {
        Helper.showToast((CharSequence) "支付失败");
        return;
    }
    String urlString = object.optString("url");
    Helper.showLog("charge", object.toString());
    Intent intent = new Intent(this.mActivity, PaymentActivity.class);
    intent.putExtra(PaymentActivity.EXTRA_CHARGE, urlString);
    this.mActivity.startActivityForResult(intent, 168);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:12,代码来源:PayService.java


示例2: openPaymentActivity

import com.pingplusplus.android.PaymentActivity; //导入依赖的package包/类
private void openPaymentActivity(String charge){

        Intent intent = new Intent();
        String packageName = getPackageName();
        ComponentName componentName = new ComponentName(packageName, packageName + ".wxapi.WXPayEntryActivity");
        intent.setComponent(componentName);
        intent.putExtra(PaymentActivity.EXTRA_CHARGE, charge);
        startActivityForResult(intent, Contants.REQUEST_CODE_PAYMENT);
    }
 
开发者ID:zzlnewair,项目名称:Myshop,代码行数:10,代码来源:CreateOrderActivity.java


示例3: pay

import com.pingplusplus.android.PaymentActivity; //导入依赖的package包/类
@ReactMethod
public void pay(String charge) {
    Intent intent = new Intent(getCurrentActivity(), PaymentActivity.class);
    intent.putExtra(PaymentActivity.EXTRA_CHARGE, charge);
    getCurrentActivity().startActivityForResult(intent, REQUEST_CODE_PAYMENT);

}
 
开发者ID:dmgapp,项目名称:react-native-dmg-pingpp,代码行数:8,代码来源:RnDmgPingppModule.java


示例4: startPaymentActivity

import com.pingplusplus.android.PaymentActivity; //导入依赖的package包/类
private void startPaymentActivity(String charge) {

        Intent intent = new Intent();
        String packageName = getPackageName();
        ComponentName componentName = new ComponentName(packageName, packageName + ".wxapi.WXPayEntryActivity");
        intent.setComponent(componentName);
        intent.putExtra(PaymentActivity.EXTRA_CHARGE, charge);
        startActivityForResult(intent, REQUEST_CODE_PAYMENT);
    }
 
开发者ID:joy-inc,项目名称:joy-app,代码行数:10,代码来源:OrderPayActivity.java


示例5: onPostExecute

import com.pingplusplus.android.PaymentActivity; //导入依赖的package包/类
@Override
        protected void onPostExecute(String data) {
            //AbLogUtil.d(mContext, data);
            Log.i(tag,"onPostExecute :data is "+data);

            Intent intent = new Intent(mContext, PaymentActivity.class);//??????
            intent.putExtra(PaymentActivity.EXTRA_CHARGE, data);
            startActivityForResult(intent, 1);
//            Intent intent = new Intent();
//            String packageName = getPackageName();
//            ComponentName componentName = new ComponentName(packageName, packageName + ".wxapi.WXPayEntryActivity");
//            intent.setComponent(componentName);
//            intent.putExtra(com.pingplusplus.android.PaymentActivity.EXTRA_CHARGE, data);
//            startActivityForResult(intent, 1);
        }
 
开发者ID:bangqu,项目名称:eshow-android,代码行数:16,代码来源:PayWebViewActivity.java


示例6: pay

import com.pingplusplus.android.PaymentActivity; //导入依赖的package包/类
public void pay(String data){
    Intent intent = new Intent();
    String packageName = getPackageName();
    ComponentName componentName = new ComponentName(packageName, packageName + ".wxapi.WXPayEntryActivity");
    intent.setComponent(componentName);
    intent.putExtra(PaymentActivity.EXTRA_CHARGE, data);
    startActivityForResult(intent, REQUEST_CODE_PAYMENT);
}
 
开发者ID:MoonRune,项目名称:CuiTrip,代码行数:9,代码来源:BaseActivity.java


示例7: requestPay

import com.pingplusplus.android.PaymentActivity; //导入依赖的package包/类
@Override
public void requestPay(String payParams) {
    Intent intent = new Intent();
    String packageName = getPackageName();
    ComponentName componentName = new ComponentName(packageName, packageName + ".wxapi.WXPayEntryActivity");
    intent.setComponent(componentName);
    intent.putExtra(PaymentActivity.EXTRA_CHARGE, payParams);
    startActivityForResult(intent, REQUEST_CODE_PAYMENT);
}
 
开发者ID:MoonRune,项目名称:CuiTrip,代码行数:10,代码来源:PayOrderAcivity.java


示例8: onPostExecute

import com.pingplusplus.android.PaymentActivity; //导入依赖的package包/类
@Override
protected void onPostExecute(String data) {
    if (channel.equalsIgnoreCase(CHANNEL_POINTS)) {//points pay
        if (resultYes(data)) {//pay yes
            SharedPreferences.Editor editor = preferences.edit();
            float donations = preferences.getFloat(AppUtil.DONATIONS_KEY, AppUtil.DEFAULT_DONATIONS);
            donations += amount / 100;
            int level = AppUtil.getLevel(donations);
            editor.putInt(AppUtil.LEVEL_KEY, level);
            editor.putFloat(AppUtil.DONATIONS_KEY, donations);
            if (channel.equalsIgnoreCase(CHANNEL_POINTS)) {//points pay
                points -= amount / 10;
                editor.putInt(AppUtil.POINTS_KEY, points);
            }
            editor.commit();
            updateUIData();
            ToastUtil.showShortToast(getApplicationContext(), getString(R.string.text_donate_success));
            //finish();//when pay success!TODO: can not do finish
            startActivity(new Intent(DonateActivity.this, MainActivity.class));
        } else {//pay no
            ToastUtil.showShortToast(getApplicationContext(), getString(R.string.text_donate_fail));
        }
    } else {//other pay
        Intent intent = new Intent();
        String packageName = getPackageName();
        ComponentName componentName = new ComponentName(packageName, packageName + ".wxapi.WXPayEntryActivity");
        intent.setComponent(componentName);
        intent.putExtra(PaymentActivity.EXTRA_CHARGE, data);
        startActivityForResult(intent, REQUEST_CODE_PAYMENT);
    }

}
 
开发者ID:hujiaweibujidao,项目名称:XingShan,代码行数:33,代码来源:DonateActivity.java


示例9: onActivityResult

import com.pingplusplus.android.PaymentActivity; //导入依赖的package包/类
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    btn_donate_pay.setOnClickListener(this);
    btn_donate_pay.setEnabled(true);

    /* 支付页面返回处理 处理返回值
     * "success" - payment succeed
     * "fail"    - payment failed
     * "cancel"  - user canceld
     * "invalid" - payment plugin not installed
     */
    if (requestCode == REQUEST_CODE_PAYMENT) {
        if (resultCode == Activity.RESULT_OK) {
            String result = data.getExtras().getString("pay_result");
            Log.e(TAG, "result=" + result);
            //Toast.makeText(this, result, Toast.LENGTH_SHORT).show();
            if (result.equalsIgnoreCase("success")) {//success
                SharedPreferences.Editor editor = preferences.edit();
                float donations = preferences.getFloat(AppUtil.DONATIONS_KEY, AppUtil.DEFAULT_DONATIONS);
                donations += amount / 100;
                Log.e(TAG, "donations=" + donations);//donations=10.0
                int level = AppUtil.getLevel(donations);
                Log.e(TAG, "level=" + level);//level=3
                editor.putInt(AppUtil.LEVEL_KEY, level);
                editor.putFloat(AppUtil.DONATIONS_KEY, donations);
                editor.commit();
                //TODO: whether update server data? yes
                //pcount, mcount
                new UpdateTask().execute();
                ToastUtil.showShortToast(getApplicationContext(), getString(R.string.text_donate_success));
                //finish();//when pay success!TODO: can not do finish
                startActivity(new Intent(DonateActivity.this, MainActivity.class));
            } else {//fail
                ToastUtil.showShortToast(getApplicationContext(), getString(R.string.text_donate_fail));
            }
        } else if (resultCode == Activity.RESULT_CANCELED) {
            //Toast.makeText(this, "User canceled", Toast.LENGTH_SHORT).show();
            ToastUtil.showShortToast(getApplicationContext(), getString(R.string.text_donate_cancel));
        } else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {
            //Toast.makeText(this, "An invalid Credential was submitted.", Toast.LENGTH_SHORT).show();
            ToastUtil.showShortToast(getApplicationContext(), getString(R.string.text_donate_invalid));
        }
    }
}
 
开发者ID:hujiaweibujidao,项目名称:XingShan,代码行数:44,代码来源:DonateActivity.java



注:本文中的com.pingplusplus.android.PaymentActivity类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java BigdataSail类代码示例发布时间:2022-05-23
下一篇:
Java TemplateKindCombo类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap