苹果支付-非订阅

Posted 不思量 自难忘

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了苹果支付-非订阅相关的知识,希望对你有一定的参考价值。

一、记录一下

没有订阅(自动续期)型产品的支付凭证,解析时可以不用password参数,结果如下:


    "receipt": 
        "receipt_type": "ProductionSandbox",
        "adam_id": 0,
        "app_item_id": 0,
        "bundle_id": "com.xiangha.pro",
        "application_version": "0",
        "download_id": 0,
        "version_external_identifier": 0,
        "receipt_creation_date": "2023-05-09 09:39:15 Etc/GMT",
        "receipt_creation_date_ms": "1683625155000",
        "receipt_creation_date_pst": "2023-05-09 02:39:15 America/Los_Angeles",
        "request_date": "2023-05-09 09:49:33 Etc/GMT",
        "request_date_ms": "1683625773910",
        "request_date_pst": "2023-05-09 02:49:33 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": "com.xiangha.pro.gpt.1001",
                "transaction_id": "2000000327362467",
                "original_transaction_id": "2000000327362467",
                "purchase_date": "2023-05-09 09:39:15 Etc/GMT",
                "purchase_date_ms": "1683625155000",
                "purchase_date_pst": "2023-05-09 02:39:15 America/Los_Angeles",
                "original_purchase_date": "2023-05-09 09:39:15 Etc/GMT",
                "original_purchase_date_ms": "1683625155000",
                "original_purchase_date_pst": "2023-05-09 02:39:15 America/Los_Angeles",
                "is_trial_period": "false",
                "in_app_ownership_type": "PURCHASED"
            
        ]
    ,
    "environment": "Sandbox",
    "status": 0

没有订阅(自动续期)型产品的支付凭证,解析时带上password参数,结果如下:


    "receipt": 
        "receipt_type": "ProductionSandbox",
        "adam_id": 0,
        "app_item_id": 0,
        "bundle_id": "com.xiangha.pro",
        "application_version": "0",
        "download_id": 0,
        "version_external_identifier": 0,
        "receipt_creation_date": "2023-05-09 09:39:15 Etc/GMT",
        "receipt_creation_date_ms": "1683625155000",
        "receipt_creation_date_pst": "2023-05-09 02:39:15 America/Los_Angeles",
        "request_date": "2023-05-09 09:40:30 Etc/GMT",
        "request_date_ms": "1683625230312",
        "request_date_pst": "2023-05-09 02:40:30 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": "com.pro.gpt.1001 ...",
                "transaction_id": "2000000327362467",
                "original_transaction_id": "2000000327362467",
                "purchase_date": "2023-05-09 09:39:15 Etc/GMT",
                "purchase_date_ms": "1683625155000",
                "purchase_date_pst": "2023-05-09 02:39:15 America/Los_Angeles",
                "original_purchase_date": "2023-05-09 09:39:15 Etc/GMT",
                "original_purchase_date_ms": "1683625155000",
                "original_purchase_date_pst": "2023-05-09 02:39:15 America/Los_Angeles",
                "is_trial_period": "false",
                "in_app_ownership_type": "PURCHASED"
            
        ]
    ,
    "environment": "Sandbox",
    "latest_receipt_info": [
        
            "quantity": "1",
            "product_id": "com.xiangha.pro.gpt.1001",
            "transaction_id": "2000000327362467",
            "original_transaction_id": "2000000327362467",
            "purchase_date": "2023-05-09 09:39:15 Etc/GMT",
            "purchase_date_ms": "1683625155000",
            "purchase_date_pst": "2023-05-09 02:39:15 America/Los_Angeles",
            "original_purchase_date": "2023-05-09 09:39:15 Etc/GMT",
            "original_purchase_date_ms": "1683625155000",
            "original_purchase_date_pst": "2023-05-09 02:39:15 America/Los_Angeles",
            "is_trial_period": "false",
            "in_app_ownership_type": "PURCHASED"
        
    ],
    "latest_receipt": "MIIUMQYJKc . . . QexkQ==",
    "status": 0

二、带不带password参数进行解析的结果差异:

多出了两个关键字段:latest_receipt和latest_receipt_info

三、PS

支付凭证包含订阅型产品的,解析时一定要带上 password 参数

苹果会强迫您通过Apple Pay进行应用内购买和订阅吗?

我正在运行一个cordova应用程序。并计划为每月付费订阅的用户添加一些高级功能。我正在研究条纹支付,它们允许您每月向用户收费。

但我的问题是 - 苹果是否允许通过条纹进行订阅或其他应用内付款,或苹果是否会强制您通过ApplePay。 - 如果苹果强迫您只与ApplePay打交道,而不是其他支付处理器,那么任何人都可以了解它在cordova app中的工作原理吗?

提前致谢。

答案

是的Apple强迫您支付15%到30%之间的费用,以便在应用程序内完成任何付款。不幸的是,您必须在线设置一个单独的支付网关(网页上的静态页面,您可以在任何地方免费托管并投入一些条纹形式来处理您的付款)Netflix等大型应用程序具有相同的问题,他们只需处理他们的网站付款。

以上是关于苹果支付-非订阅的主要内容,如果未能解决你的问题,请参考以下文章

PHP苹果支付以及事件通知-周期订阅实现

Flutter上线项目实战——苹果内购

Flutter上线项目实战——苹果内购

苹果会强迫您通过Apple Pay进行应用内购买和订阅吗?

uniapp使用苹果支付

uniapp使用苹果支付