Peach Payments - Payment Links SDK.
PHP 7.4.0 and later.
You can install the sdk via Composer. Run the following command:
composer require peach/peach-payment-php
To use the sdk, use Composer's autoload:
If you do not wish to use Composer, you can download
the latest release.
Then, to use the sdk, include the
The sdk require the following extensions in order to work properly:
If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available.
Simple usage looks like:
const CLIENT_ID = ""; const CLIENT_SECRET = ""; const MERCHANT_ID = ""; const ENTITY_ID = ""; $ppay = new \PeachPayments\PaymentLinksClient(new \PeachPayments\AuthDetails(CLIENT_ID, CLIENT_SECRET, MERCHANT_ID)); $response = $ppay->payment->create(ENTITY_ID, [ ...PaymentDetails ]); print_r($response);
Other examples can be found in the Examples Directory