zoukankan      html  css  js  c++  java
  • iOS-内购及订阅

     

    关于校验:

    //沙箱static final String testUrl = "https://sandbox.itunes.apple.com/verifyReceipt";
    //正式 static final String product =  "https://buy.itunes.apple.com/verifyReceipt";

    请求苹果地址 返回的 内容为

    conten-type = application/json

    请求的苹果的内容为String param = "{"receipt-data":""+客户端返回的base64+""}";

    {
        "receipt": {
            "receipt_type": "ProductionSandbox",
            "adam_id": 0,
            "app_item_id": 0,
            "bundle_id": "com.rtjk.xshl",//当前的产品的包名,一定要验证返回的包名和此包名要一致
            "application_version": "2018101001",
            "download_id": 0,
            "version_external_identifier": 0,
            "receipt_creation_date": "2018-10-19 10:50:48 Etc/GMT",
            "receipt_creation_date_ms": "1539946248000",
            "receipt_creation_date_pst": "2018-10-19 03:50:48 America/Los_Angeles",
            "request_date": "2018-10-31 01:58:21 Etc/GMT",
            "request_date_ms": "1540951101844",
            "request_date_pst": "2018-10-30 18:58:21 America/Los_Angeles",
            "original_purchase_date": "2013-08-01 07:00:00 Etc/GMT",
            "original_purchase_date_ms": "1375340400000",
            "original_purchase_date_pst": "2013-08-01 00:00:00 America/Los_Angeles",
            "original_application_version": "1.0",
            "in_app": [
                {
                    "quantity": "1",
                    "product_id": "6hongliao",//对应产品id,自己做一个金额的映射就行,对应到具体的金额,建议命名要规则
                    "transaction_id": "1000000460004095",//一定要进行去重验证,一个订单号只能加一次款
                    "original_transaction_id": "1000000460004095",
                    "purchase_date": "2018-10-19 10:50:48 Etc/GMT",
                    "purchase_date_ms": "1539946248000",
                    "purchase_date_pst": "2018-10-19 03:50:48 America/Los_Angeles",
                    "original_purchase_date": "2018-10-19 10:50:48 Etc/GMT",
                    "original_purchase_date_ms": "1539946248000",
                    "original_purchase_date_pst": "2018-10-19 03:50:48 America/Los_Angeles",
                    "is_trial_period": "false"
                }
            ]
        },
        "status": 0, //表示当前请求返回正常
        "environment": "Sandbox"
    }

    引用:

    https://www.cnblogs.com/qiyer/

    https://www.cnblogs.com/qiyer/p/7442680.html

    https://blog.csdn.net/woyixinyiyi/article/details/83574563

  • 相关阅读:
    linux下通过命令行把文件拷贝到U盘上
    Fuzzy finder(fzf+vim) 使用入门指南
    利器: Mac自带的图片工具Sips
    C/C++性能测试工具GNU gprof
    ubuntu 16.04安装perf
    带你了解SDL
    Android USB Headset: Device Specification
    程序猿的看迪士尼
    音频处理贤内助--libsndfile
    蓝牙协议中的SBC编解码原理和仿真
  • 原文地址:https://www.cnblogs.com/wangkejia/p/13208329.html
Copyright © 2011-2022 走看看