Download the PHP package checkout/checkout-sdk-php without Composer
On this page you can find all versions of the php package checkout/checkout-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download checkout/checkout-sdk-php
More information about checkout/checkout-sdk-php
Files in checkout/checkout-sdk-php
Package checkout-sdk-php
Short Description Checkout.com SDK for PHP
License MIT
Homepage https://github.com/checkout/checkout-sdk-php
Informations about the package checkout-sdk-php
Checkout.com PHP SDK
Getting started
Version 3.0.0 is here!
We improved the initialization of SDK making it easier to understand the available options.
NowNAS
accounts are the default instance for the SDK andABC
structure was moved to aprevious
prefixes.
If you have been using this SDK before, you may find the following important changes:
- Marketplace module was moved to Accounts module, same for classes and references.
- In most cases, IDE can help you determine from where to import, but if you’re still having issues don't hesitate to open a ticket.
:rocket: Please check in GitHub releases for all the versions available.
:book: Checkout our official documentation.
:books: Check out our official API documentation guide, where you can also find more usage examples.
Composer
How to use the SDK
This SDK can be used with two different pair of API keys provided by Checkout. However, using different API keys imply using specific API features. Please find in the table below the types of keys that can be used within this SDK.
Account System | Public Key (example) | Secret Key (example) |
---|---|---|
Default | pk_zyxwabcde123pqrstu876vwxyt | sk_abcdef98765mnopqr4321ghijk |
Previous | pk_f3456789-ab12-cd34-ef56-7890ghijklmn | sk_hijklmn0-1234-5678-abcd-efgh98765432 |
Note: sandbox keys have a sbox_
or test_
identifier, for Default and Previous accounts respectively.
PLEASE NEVER SHARE OR PUBLISH YOUR CHECKOUT CREDENTIALS.
If you don't have your own API keys, you can sign up for a test account here.
Default
Default keys client instantiation can be done as follows:
Default OAuth
The SDK supports client credentials OAuth, when initialized as follows:
Previous
If your pair of keys matches the Previous type, this is how the SDK should be used:
PHP Settings
For operations that require file upload (Disputes or Marketplace) the configuration extension=fileinfo
must be enabled in the php.ini
.
Exception handling
All the API responses that do not fall in the 2** status codes, the SDK will throw a CheckoutApiException
.
The exception encapsulates http_metadata
and $error_details
, if available.
Building from source
Once you check out the code from GitHub, the project can be built using composer:
The execution of integration tests require the following environment variables set in your system:
- For default account systems (NAS):
CHECKOUT_DEFAULT_PUBLIC_KEY
&CHECKOUT_DEFAULT_SECRET_KEY
- For default account systems (OAuth):
CHECKOUT_DEFAULT_OAUTH_CLIENT_ID
&CHECKOUT_DEFAULT_OAUTH_CLIENT_SECRET
- For Previous account systems (ABC):
CHECKOUT_PREVIOUS_PUBLIC_KEY
&CHECKOUT_PREVIOUS_SECRET_KEY
Code of Conduct
Please refer to Code of Conduct
Licensing
MIT
All versions of checkout-sdk-php with dependencies
guzzlehttp/guzzle Version ^6.5 || ^7.4
monolog/monolog Version ^1.27 || ^2.4 || ^3.0.0
ext-json Version *
ext-fileinfo Version *