Download the PHP package laratusk/spreedly without Composer

On this page you can find all versions of the php package laratusk/spreedly. 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 spreedly

Spreedly PHP SDK

A production-ready PHP SDK for the Spreedly payment orchestration API, following the Stripe PHP SDK architecture. Works as a standalone PHP library or as a Laravel package.

Requirements

Installation

Standalone PHP Usage

Configuration Options

Laravel Usage

Publish the config file:

Add credentials to your .env:

Use the facade:

Or inject the client:

Certificate Automation (Laravel)

Spreedly supports certificate pinning for additional API security. The SDK can automatically generate, upload, and renew self-signed certificates on a per-machine basis, binding each certificate to the machine's MAC address so that multi-server deployments each maintain their own certificate.

Setup

Publish and run the migration:

Add the relevant variables to your .env:

How it works

Each server keeps exactly one active certificate at a time, identified by its MAC address. The key pair is generated locally (the private key never leaves the server), then uploaded to Spreedly. The encrypted private key is stored in your database.

Scenario Behaviour
No certificate exists A new certificate is created and uploaded
Certificate expires within threshold (default: 7 days) Certificate is renewed; old record is deleted
Certificate is still valid No action taken
--force flag Certificate is replaced immediately regardless of expiry

Artisan command

Scheduled auto-renewal

Register the command in your scheduler so certificates are renewed automatically. Running it once a day is sufficient — the command exits immediately when the certificate is not close to expiring.

Laravel 11+ (routes/console.php):

Laravel 10 (app/Console/Kernel.php):

Tip: Set SPREEDLY_CERTIFICATE_EXPIRING_DAYS to control how many days before expiry a renewal is triggered. The default is 7.

Resolving the current certificate

Retrieve the active certificate for the current machine at runtime:


Resources

Gateways

Docs: Gateways API

Payment Methods

Docs: Payment Methods API

Transactions

Docs: Transactions API

Note: All monetary amounts are in the smallest currency unit (cents for USD). 1000 = $10.00.

Receivers

Docs: Receivers API

Certificates

Docs: Certificates API

Environments

Docs: Environments API

Events

Docs: Events API

Merchant Profiles

Docs: Merchant Profiles API

Composer (Workflows)

Docs: Composer API

SCA Authentication

Docs: SCA Authentication API

Sub Merchants

Docs: Sub Merchants API

Card Refresher

Docs: Card Refresher API

Keeps stored payment methods up-to-date by fetching the latest card details from card networks.

Claim

Docs: Claim API

Payments

Docs: Payments API

Protection Events

Docs: Protection Events API

Protection events are created when Spreedly detects a change to a stored payment method (e.g. updated card number or expiration date).

Access Secrets (Environments)

Docs: Access Secrets API

Network Tokenization (Payment Methods)

Docs: Network Tokenization API

Payment Method Events

Docs: Payment Method Events API

Protection Provider & SCA Provider (Merchant Profiles)

Docs: Merchant Profiles API

Pagination

Spreedly uses token-based pagination (since_token). The SDK provides a PaginatedCollection that handles this:

Error Handling

All exceptions extend SpreedlyException and provide:

Custom HTTP Transport

Implement TransporterInterface to use a custom HTTP client:

Testing

Testing in Your Application

The SDK ships with SpreedlyFake and MockTransporter to make testing easy — no real HTTP calls, no Spreedly credentials needed.

Standalone PHP

Laravel (swap the container binding)

In your Laravel feature tests, swap the SpreedlyClient binding before the code under test runs. After the swap the Spreedly facade automatically uses the fake.

Or test the facade directly:

MockTransporter API

Method Description
addResponse(method, endpoint, array) Register a canned response. Chainable.
assertCalled(method, endpoint) Throws RuntimeException if the call was never made.
getCallCount() Total number of HTTP calls recorded.

Running the SDK's Own Tests

Run tests:

Run quality checks:

Integration Tests

Integration tests require real Spreedly credentials and run against the test gateway:

License

MIT. See LICENSE.md.


All versions of spreedly with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.0
nesbot/carbon Version ^2.0 || ^3.0
ext-openssl Version *
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 laratusk/spreedly contains the following files

Loading the files please wait ...