Skip to content

peakium/peakium-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Peakium PHP API Bindings

About

This is an experimental release of converted PHP version of Peakium Ruby bindings.

Installation

1. Add peakium-php to your application's composer.json.
  {
    // ...
    "require": {
      "peakium/peakium-php": "dev-master"
    },
    // ...
  }
2. Run composer intall

Example usage

Set API key:

\Peakium::$api_key = "you_secret_api_key";

Retrieve a customer:

$customer = \Peakium\Customer::retrieve("test_customer");

Create a submission form:

$submission_form = \Peakium\SubmissionForm::build('create-subscription', $args);

Cancel a subscription:

$customer->cancel_subscription("test_subscription");

Errors

The library will throw exceptions when errors are encountered, e.g. if a resource doesn’t exist.

Requirements

  • php 5.2

  • php_curl extension

  • php_json extension

Releases

No releases published

Packages

No packages published

Languages