No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
lib
tests
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
RequestExample.md
VERSION
build.php
composer.json
init.php
phpunit.no_autoload.xml
phpunit.xml

README.md

PAY.JP for PHP

Build Status

Requirements

PHP 5.6 and later.

Even if it is not a corresponding version, it may work, but it does not support it. Due to the PHP END OF LIFE cycle.

Composer

You can install the bindings via Composer. Add this to your composer.json:

{
  "require": {
    "payjp/payjp-php": "~1.0"
  }
}

Then install via:

composer install

To use the bindings, use Composer's autoload:

require_once 'vendor/autoload.php';

Manual Installation

If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the init.php file.

require_once '/path/to/payjp-php/init.php';

Getting Started

Simple usage looks like:

\Payjp\Payjp::setApiKey('sk_test_c62fade9d045b54cd76d7036');
$myCard = array('number' => '4242424242424242', 'exp_month' => 5, 'exp_year' => 2020);
$charge = \Payjp\Charge::create(array('card' => $myCard, 'amount' => 2000, 'currency' => 'jpy'));
echo $charge;

Documentation

Tests

In order to run tests first install PHPUnit via Composer:

composer update --dev

To run the test suite:

./vendor/bin/phpunit