定制 sn01615/apple-iap-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sn01615/apple-iap-php

Composer 安装命令:

composer require sn01615/apple-iap-php

包简介

iOS iap verify

README 文档

README

iOS支付验证

install

composer require sn01615/apple-iap-php

use

use sn01615\iap\ios\Verify;

include "../vendor/autoload.php";

$cc = new Verify();
$receipt = ".."; // 凭据
$cc->endpoint(true);// 可选,切换到沙盒环境
$cc->setPassword('123');// 可选,如果是连续订阅需要密码
$cc->setExcludeOldTransactions(true);// 可选,将此值设置为,true以使响应仅包括任何订阅的最新续订交易。
                                     // 仅对包含自动续订的应用收据使用此字段。

$vv = $cc->query($receipt);

// 打印结果
var_dump($vv);


/**
// 返回示例
object(stdClass)#648 (3) {
  ["receipt"]=>
  object(stdClass)#666 (18) {
    ["receipt_type"]=>
    string(10) "Production"
    ["adam_id"]=>
    int(902861234)
    ["app_item_id"]=>
    int(902861234)
    ["bundle_id"]=>
    string(17) "com.xx.xxx"
    ["application_version"]=>
    string(3) "722"
    ["download_id"]=>
    int(75072419401234)
    ["version_external_identifier"]=>
    int(836721234)
    ["receipt_creation_date"]=>
    string(27) "2020-07-22 02:26:01 Etc/GMT"
    ["receipt_creation_date_ms"]=>
    string(13) "1595384761000"
    ["receipt_creation_date_pst"]=>
    string(39) "2020-07-21 19:26:01 America/Los_Angeles"
    ["request_date"]=>
    string(27) "2020-07-22 03:31:59 Etc/GMT"
    ["request_date_ms"]=>
    string(13) "1595388719760"
    ["request_date_pst"]=>
    string(39) "2020-07-21 20:31:59 America/Los_Angeles"
    ["original_purchase_date"]=>
    string(27) "2020-07-21 13:18:24 Etc/GMT"
    ["original_purchase_date_ms"]=>
    string(13) "1595337504000"
    ["original_purchase_date_pst"]=>
    string(39) "2020-07-21 06:18:24 America/Los_Angeles"
    ["original_application_version"]=>
    string(3) "722"
    ["in_app"]=>
    array(1) {
      [0]=>
      object(stdClass)#647 (11) {
        ["quantity"]=>
        string(1) "1"
        ["product_id"]=>
        string(24) "com.xx.xx.xx.xx"
        ["transaction_id"]=>
        string(15) "350000687123456"
        ["original_transaction_id"]=>
        string(15) "350000687123456"
        ["purchase_date"]=>
        string(27) "2020-07-22 02:25:25 Etc/GMT"
        ["purchase_date_ms"]=>
        string(13) "1595384725000"
        ["purchase_date_pst"]=>
        string(39) "2020-07-21 19:25:25 America/Los_Angeles"
        ["original_purchase_date"]=>
        string(27) "2020-07-22 02:25:25 Etc/GMT"
        ["original_purchase_date_ms"]=>
        string(13) "1595384725000"
        ["original_purchase_date_pst"]=>
        string(39) "2020-07-21 19:25:25 America/Los_Angeles"
        ["is_trial_period"]=>
        string(5) "false"
      }
    }
  }
  ["status"]=>
  int(0)
  ["environment"]=>
  string(10) "Production"
}

**/

参考链接

Validating Receipts with the App Store

https://developer.apple.com/documentation/storekit/in-app_purchase/validating_receipts_with_the_app_store

sn01615/apple-iap-php 适用场景与选型建议

sn01615/apple-iap-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.53k 次下载、GitHub Stars 达 12, 最近一次更新时间为 2019 年 06 月 03 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 sn01615/apple-iap-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 sn01615/apple-iap-php 我们能提供哪些服务?
定制开发 / 二次开发

基于 sn01615/apple-iap-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.53k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 12
  • 点击次数: 21
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 12
  • Watchers: 1
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-06-03