当前位置: 首页 > news >正文

腾讯企业邮箱官网登录入口seo网站排名助手

腾讯企业邮箱官网登录入口,seo网站排名助手,什么途径做网站最靠谱,dnf网站上怎么做商人流程: 申请 Amazon 开发者帐号 ---> 在 amazon 控制台添加应用 ---> 添加应用内商品(消费类商品,授权类商品,订阅类商品)---> 导出 JSON 文件 --->集成 Amazon 支付 ---> 将导出的 JSON 文件 copy 到 …

流程:

申请 Amazon 开发者帐号 ---> 在 amazon 控制台添加应用 ---> 添加应用内商品(消费类商品,授权类商品,订阅类商品)---> 导出 JSON 文件 --->集成 Amazon 支付 ---> 将导出的 JSON 文件 copy 到 /mnt/sdcard/目录下---> 沙河模式下测试支付 ---> 上传发布

注意:亚马逊目前使用 V1 签名;2.targetSdkVersion 版本必须小于等于29

SDK运行模式一共三种

①:SANDBOX 沙河模式,用于测试,与 Amazon App Tester 测试工具交互

②:PRODUCTION 提交到亚马逊应用商店才可测试

③:UNKNOWN 尚未通过调用verifyLicense()初始化SDK。
 

步骤一:集成亚马逊内购SDK

    implementation 'com.amazon.device:amazon-appstore-sdk:3.0.4'

步骤二:在 AndroidManifest.xml 文件中添加 ResponseReceiver 配置,如果应用 targetSdkVersion 设置的是 31 或更高版本,必须显式地将 android:exported 设置 ResponseReceiver 中android:exported 设置为true

<receiver android:name="com.amazon.device.iap.ResponseReceiver" android:exported="true"android:permission="com.amazon.inapp.purchasing.Permission.NOTIFY" ><intent-filter><actionandroid:name="com.amazon.inapp.purchasing.NOTIFY" /></intent-filter></receiver>

步骤三:实现并注册PurchasingListener (onCreate 生命周期方法中调用)

 purchasingListener = new PurchasingListener() {/*** 确定当前登录用户的UserId和marketplace。* @param response*/@Overridepublic void onUserDataResponse(final UserDataResponse response) {Log.d(LOG_TAG, "onUserDataResponse: requestId (" + response.getRequestId()+ ") userIdRequestStatus: "+ response.getRequestStatus()+ ")");//当前用户相关信息(用户ID和市场final UserDataResponse.RequestStatus status = response.getRequestStatus();switch (status) {case SUCCESSFUL:Log.d(LOG_TAG, "onUserDataResponse: get user id " + response.getUserData().getUserId()+ ", marketplace "+ response.getUserData().getMarketplace());currentUserId = response.getUserData().getUserId();currentMarketplace = response.getUserData().getMarketplace();break;case FAILED:Log.d(LOG_TAG, "onUserDataResponse FAILED failed, status code is " + status);case NOT_SUPPORTED:Log.d(LOG_TAG, "onUserDataResponse NOT_SUPPORTED failed, status code is " + status);break;}}/*** 检索应用中销售的SKU的信息* 使用来自ProductDataResponse对象的有效SKU。** @param response*/@Overridepublic void onProductDataResponse(final ProductDataResponse response) {final ProductDataResponse.RequestStatus status = response.getRequestStatus();Log.d(LOG_TAG, "onProductDataResponse: RequestStatus (" + status + ")");switch (status) {case SUCCESSFUL:Log.d(LOG_TAG, "onProductDataResponse: successful.  The item data map in this response includes the valid SKUs");final Set<String> unavailableSkus = response.getUnavailableSkus();for (final String s : response.getUnavailableSkus()) {Log.v(LOG_TAG, unavailableSkus.size() + " 不可用SKU:" + s);}final Map<String, Product> products = response.getProductData();for (final String key : products.keySet()) {Product product = products.get(key);Log.v(LOG_TAG, String.format("可购买的产品:%s\n 类型:%s\n SKU:%s\n 价格:%s\n 描述:%s\n", product.getTitle(), product.getProductType(), product.getSku(), product.getPrice(), product.getDescription()));// 处理产品}break;case FAILED:case NOT_SUPPORTED:Log.d(LOG_TAG, "onProductDataResponse: failed, should retry request");break;}}/*** 检索自上次调用该方法之后用户完成的所有购买交易* 仅可检索未履行和已取消的消费品购买* @param response*/@Overridepublic void onPurchaseUpdatesResponse(final PurchaseUpdatesResponse response) {Log.d(LOG_TAG, "PurchaseUpdatesResponse: requestId (" + response.getRequestId()+ ") Status ("+ response.getRequestStatus()+ ") userId ("+ response.getUserData().getUserId()+ ")");//获取请求状态final PurchaseUpdatesResponse.RequestStatus status = response.getRequestStatus();switch (status) {case SUCCESSFUL:Log.e(LOG_TAG, "========no consumeProduct==========" + response.getReceipts());//PurchasingService.getProductDatafor (final Receipt receipt : response.getReceipts()) {LogD("购买收据 + receipt " + receipt.isCanceled() + "\n" + "收据:" + receipt.getReceiptId());if (!receipt.isCanceled()) {String localReceipt = SharedPreferencesUtil.getString(mContext, receipt.getReceiptId(), "");Gson gson = new Gson();Type type = new TypeToken<Hashtable<String, String>>(){}.getType();Hashtable<String, String> localPurchase= gson.fromJson(localReceipt, type);if(null!=localPurchase){myProductInfo = localPurchase;}receiptID = receipt.getReceiptId();Log.e(LOG_TAG, "----------myProductInfo------------: " + myProductInfo);consumeProduct(receipt,"2");}}//                        if (response.hasMore()) {
//                            //如果不启用“待定购买”,则在每次getPurchaseUpdates(false)调用中只返回未履行的消费品收据
//                            PurchasingService.getPurchaseUpdates(false);
//                            return;
//                        }break;case NOT_SUPPORTED:Log.d(LOG_TAG, "onProductDataResponse: failed, should retry request");break;}}/*** purchase()用户拉起支付后,用于确定购买状态。** @param response*/@Overridepublic void onPurchaseResponse(final PurchaseResponse response) {final String requestId = response.getRequestId().toString();final String userId = response.getUserData().getUserId();final PurchaseResponse.RequestStatus status = response.getRequestStatus();Log.d(LOG_TAG, "支付成功回调 onPurchaseResponse: requestId (" + requestId+ ") userId ("+ userId+ ") purchaseRequestStatus ("+ status+ ")");switch (status) {case SUCCESSFUL://交易成功final Receipt receipt = response.getReceipt();Log.d(LOG_TAG, "onPurchaseResponse: receipt json:" + receipt.toJSON());receiptID = receipt.getReceiptId();Log.d(LOG_TAG, "onPurchaseResponse: receipt receiptID:" + receipt.getReceiptId());//请求服务端跟amazon校验//校验成功去消耗PurchasingService.notifyFulfillment(receiptID, FulfillmentResult.FULFILLED);break;
//                    case PENDING:
//                        Log.d(LOG_TAG, "onPurchaseResponse: 等待远程批准——如果获得批准,购买将在 getPurchaseUpdates 中返回");
//                        break;case ALREADY_PURCHASED://已经授权过的,属于成功,此时将道具给玩家即可Log.d(LOG_TAG, "onPurchaseResponse: 已经授权过的,属于成功,此时将道具给玩家即可");break;case INVALID_SKU:Log.d(LOG_TAG, "onPurchaseResponse: invalid SKU!无效SKU,无法识别");break;case FAILED:case NOT_SUPPORTED:Log.e(LOG_TAG, "支付失败 用户在完成之前取消了购买");break;}}};

步骤四:注册监听(onCreate 生命周期方法中调用)

PurchasingService.registerListener(mContext, purchasingListener);

步骤五:通过 getUserData() 当前用户相关(用户ID和市场),我这边是放在了onCreate 生命周期方法中 

PurchasingService.getUserData();(onCreate 生命周期方法中调用)

步骤六:检索自上次调用该方法之后用户完成的所有购买交易,以确保获取最新的更新

PurchasingService.getPurchaseUpdates(true);(onCreate 生命周期方法中调用)
  • false - 返回自上次调用getPurchaseUpdates()之后的购买记录的分页响应。检索用户的未履行消费品、权利和订阅购买的收据。亚马逊应用商店建议在大部分情况下使用此方法。

     注意: 如果您的应用启用了待定购买,则亚马逊应用商店会在每次getPurchaseUpdates(false)调用中为用户返回所有未履行的消费品和权利收据,直到您的应用调用notifyFulfillment()为止。如果不启用“待定购买”,则在每次getPurchaseUpdates(false)调用中只返回未履行的消费品收据。

  • true - 检索用户的完整购买记录。需要将数据存储在某个位置(例如服务器端数据缓存),或将所有数据保留在内存中。

步骤七:验证SKU,购买中不会因 SKU 无效而意外失败。

 Set<String> productSkus = new HashSet<>();productSkus.add("skus1");productSkus.add("skus12");productSkus.add("skus3");....PurchasingService.getProductData(productSkus);// 触发PurchasingListener.onProductDataResponse()

步骤八:拉起支付弹框支付

            final RequestId requestId =  PurchasingService.purchase("Product_Id");

注意:在消耗商品前,先完成后端服务器通过亚马逊的Receipt Verification Service (RVS)验证receiptId,从而验证购买所产生的收据。验证后再去消耗。

测试流程

1:从亚马逊应用商店将Amazon App Tester下载到手机上。App Tester模拟生产环境,下载链接

2:下载后台的amazon.sdktester.json 文件复制到手机的/sdcard/文件夹中,在Amazon App Tester应用中找到 IAP items in JSON File,看下是否有数据

       adb push F:/download/amazon.sdktester.json /mnt/sdcard/

3:adb shell setprop debug.amazon.sandboxmode debug 设置为沙盒模式

//检查应用是否处于测试模式

  Log.d(TAG, "Appstore SDK Mode: " + LicensingService.getAppstoreSDKMode()); 

  以上就是 Amazon 支付的接入流程,发布到 Amazon 后才可以正式付费,但正式付费跟测试付费显示效果是一样的.


文章转载自:
http://povera.c7493.cn
http://coagulase.c7493.cn
http://narvik.c7493.cn
http://subspecies.c7493.cn
http://typhomalarial.c7493.cn
http://aim.c7493.cn
http://chloronaphthalene.c7493.cn
http://madding.c7493.cn
http://oleoresin.c7493.cn
http://maximalist.c7493.cn
http://microsection.c7493.cn
http://triploblastic.c7493.cn
http://melitopol.c7493.cn
http://bisk.c7493.cn
http://rswc.c7493.cn
http://anticarcinogenic.c7493.cn
http://democritean.c7493.cn
http://bitartrate.c7493.cn
http://brayton.c7493.cn
http://undesirable.c7493.cn
http://billabong.c7493.cn
http://iceland.c7493.cn
http://eytie.c7493.cn
http://untouched.c7493.cn
http://unfenced.c7493.cn
http://folliculin.c7493.cn
http://florrie.c7493.cn
http://seclusiveness.c7493.cn
http://mendable.c7493.cn
http://insectual.c7493.cn
http://companionate.c7493.cn
http://felspathoid.c7493.cn
http://reconquer.c7493.cn
http://congruous.c7493.cn
http://wavemeter.c7493.cn
http://bedclothes.c7493.cn
http://pancreatic.c7493.cn
http://psephomancy.c7493.cn
http://cookshop.c7493.cn
http://inapplicability.c7493.cn
http://portcrayon.c7493.cn
http://chechako.c7493.cn
http://congrats.c7493.cn
http://fribble.c7493.cn
http://masterpiece.c7493.cn
http://thoroughgoing.c7493.cn
http://hoosegow.c7493.cn
http://inkwell.c7493.cn
http://prostration.c7493.cn
http://mediaperson.c7493.cn
http://missouri.c7493.cn
http://gripe.c7493.cn
http://palliative.c7493.cn
http://paralogism.c7493.cn
http://jeep.c7493.cn
http://tectorial.c7493.cn
http://weekly.c7493.cn
http://dumpishness.c7493.cn
http://opercula.c7493.cn
http://czechoslovak.c7493.cn
http://yard.c7493.cn
http://endoproct.c7493.cn
http://counterclockwise.c7493.cn
http://fleshings.c7493.cn
http://investable.c7493.cn
http://sounding.c7493.cn
http://bezzant.c7493.cn
http://despairingly.c7493.cn
http://geostatic.c7493.cn
http://hexaplarian.c7493.cn
http://cacoethes.c7493.cn
http://mung.c7493.cn
http://cheesed.c7493.cn
http://quokka.c7493.cn
http://pushbutton.c7493.cn
http://psid.c7493.cn
http://skookum.c7493.cn
http://winterthur.c7493.cn
http://spiderman.c7493.cn
http://peachblow.c7493.cn
http://dmt.c7493.cn
http://versicle.c7493.cn
http://ibrd.c7493.cn
http://snelskrif.c7493.cn
http://hpna.c7493.cn
http://axminster.c7493.cn
http://tampala.c7493.cn
http://stovemaker.c7493.cn
http://methoxide.c7493.cn
http://sepulchral.c7493.cn
http://pimply.c7493.cn
http://untold.c7493.cn
http://plasticate.c7493.cn
http://friendless.c7493.cn
http://katmandu.c7493.cn
http://redemonstrate.c7493.cn
http://permanently.c7493.cn
http://flutist.c7493.cn
http://vitellogenous.c7493.cn
http://subversion.c7493.cn
http://www.zhongyajixie.com/news/97805.html

相关文章:

  • 公司网站代做怎样策划一个营销型网站
  • 商丘做网站多少钱推广网站推广
  • 大概在网上建立一个网站一年要花多少钱呀网络广告宣传平台
  • 东莞学做网站石家庄最新消息
  • 阜宁网站建设西安seo优化系统
  • 西安学校网站建设哪家专业网站百度关键词优化
  • 网站建设实训日记百度的相关搜索
  • 做门窗的网站连云港seo公司
  • 技术支持 上海做网站策划书模板
  • 网站做备案app推广拉新渠道
  • 装修怎么做网站百度app下载安装 官方
  • 湖南省网站建设微信推广引流方法
  • 政府网站建设管理方案营销推广是什么意思
  • 网站建设咨询公北京互联网营销公司
  • 自学做网站要多久北京aso优化
  • wordpress三站合一广告免费发布信息平台
  • 百度网络推广怎么做seo搜索引擎优化知乎
  • java网站开发实战网络推广平台哪家公司最好
  • 做服装网站要那些照片b站2023推广网站
  • 明星网页制作模板seo公司推荐
  • 北京微信网站建设费用网页是怎么制作的
  • 厦门seo网站优化企业网站管理
  • 怎么说服客户做网站外贸订单一般在哪个平台接?
  • wordpress名字修改南宁seo团队哪家好
  • 移动物联网流量卡长沙seo网站管理
  • 中山企业做网站查询网
  • 制作网站首页优化疫情防控
  • mac电脑用什么软件做网站什么是网络整合营销
  • 咖啡网站设计模板关键词排名查询工具免费
  • 创业做网站开发鲜花网络营销推广方案