Download the PHP package andriichuk/bluesnap-php-sdk without Composer

On this page you can find all versions of the php package andriichuk/bluesnap-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bluesnap-php-sdk

BlueSnap PHP SDK

A framework-agnostic PHP 8.5 SDK for the BlueSnap Payment API.

This project is under active development. Its public API may change before the first stable release.

Requirements

The SDK deliberately does not depend on Laravel, Symfony, Guzzle, or any other framework. Applications provide their preferred PSR implementations.

Installation

Install a PSR-18 implementation if your project does not already contain one. For example:

Creating a client

Never expose BlueSnap API credentials in client-side code or commit them to source control.

merchantId is required when building Hosted Payment Page URLs. API-only clients may omit it.

Plans

Subscriptions

The payload shape follows BlueSnap's API so new BlueSnap capabilities remain available without waiting for an SDK release.

Hosted Payment Fields tokens

BlueSnap returns the token in the response's Location header. Extract the final path segment only when the Hosted Payment Fields JavaScript integration requires the token value.

For saved-card 3-D Secure flows, use paymentFieldsTokens()->prefill().

Hosted Payment Pages

Hosted Payment Page URLs use the checkout host rather than the API base URI. The SDK defaults to https://sandbox.bluesnap.com in sandbox and https://checkout.bluesnap.com in production; pass checkoutHost to Configuration to override that origin.

Use paramEncryption()->encrypt() to encrypt protected parameters such as thankyou.backtosellerurl, then build the redirect URL with hostedPageUrl(). Parameter encryption requires a Data Protection Key configured in the BlueSnap merchant console.

The merchant ID lives on Configuration and is validated there; HostedPageRequest validates the per-checkout values. Building a URL without a merchant ID throws.

The production checkout origin https://checkout.bluesnap.com is taken from BlueSnap's published examples and has not been exercised against a live production account. Confirm the origin your account is issued and set checkoutHost explicitly before going live.

Cashier readiness

The SDK includes the outbound API operations required for a card-based Laravel Cashier package: customers and payment methods, plans, BlueSnap-managed and merchant-managed subscriptions, charge history, plan-switch previews, one-time payments, authorization/capture/reversal, refunds, 3-D Secure token prefill, webhook configuration, and reconciliation queries.

See the Cashier endpoint coverage matrix for the exact mapping and the integration responsibilities that belong in the future Laravel package.

Errors

Non-successful responses throw typed exceptions:

HTTP 401/403, 404, 409, 422, and 429 responses have dedicated exception classes. Other unsuccessful responses throw ApiException. PSR transport failures throw TransportException.

Idempotency

BlueSnap accepts idempotency keys on transactional POST endpoints and retains them for up to 24 hours. Generate the key in your application and reuse the same value only when retrying the same logical request. Keys are limited to 64 characters.

Development

The test suite does not make live BlueSnap requests or require API credentials.

Security

Please do not report security vulnerabilities through public GitHub issues. Until a dedicated security policy is published, contact [email protected].

License

BlueSnap PHP SDK is open-source software licensed under the MIT license.


All versions of bluesnap-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package andriichuk/bluesnap-php-sdk contains the following files

Loading the files please wait ...