saatchiart/affirm-php-sdk 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

saatchiart/affirm-php-sdk

最新稳定版本:1.0.1

Composer 安装命令:

composer require saatchiart/affirm-php-sdk

包简介

Unofficial Affirm php sdk

README 文档

README

Affirm API Docs

Install:

composer require saatchiart/affirm-php-sdk

Usage:

// get an affirm php sdk instance
$config = [
    'public_api_key' => 'MY_AFFIRM_PUBLIC_API_KEY',
    'private_api_key' => 'MY_AFFIRM_PRIVATE_API_KEY',
    'is_sandbox' => true,
];
$affirm = new \SaatchiArt\Affirm\Api\Client($config);

// authorize an affirm payment by checkout token
/** @var \stdClass $response decoded json from response */
$optionalData = ['order_id' => 'OPTIONAL_ORDER_ID'];
$response = $affirm->authorize('MY_CHECKOUT_TOKEN', $optionalData);

// capture an authorized affirm payment by charge id
$optionalData = [
    'order_id' => 'abc123',
    'shipping_carrier' => 'my carrier',
    'shipping_confirmation' => 'abc123',
];
$response = $affirm->capture('MY_CHARGE_ID', $optionalData);

// read an authorized charge by charge id
$optionalData = [
    'limit' => 123,
    'before' => 'beforeString',
    'after' => 'afterString',
];
$response = $affirm->read('MY_CHARGE_ID', $optionalData);

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 11
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-12-04