Download the PHP package ridebuilder/affiliate without Composer

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

ridebuilder/affiliate (PHP)

Server-side SDK for RideBuilder's FirstParty affiliate program. It does two things:

  1. Capture the click_id a shopper arrives with, so your backend can bind it to the cart/order.
  2. Report checkout and return postbacks to RideBuilder (auth, retries, idempotency handled).

Mirrors the Node/.NET/Python SDKs — same contract, verified by the shared conformance suite.

Install

Requires PHP 8.1+ and ext-curl (bundled with virtually every PHP). No third-party runtime dependencies — the default transport uses cURL. To run from source without Composer, require 'sdk/php/autoload.php'.

The pattern: capture at landing, bind to the order

Capture the click_id on landing, store it with the cart, and send it at purchase.

Store the API key server-side (env/secrets) — never in frontend code.

Decoupled frontend (e.g. React) + separate PHP backend

If the frontend is separate, the browser snippet captures the click_id into a first-party cookie, and you get it to your backend one of two ways:

Either way, reportCheckout is unchanged — that's the SDK's real value in a decoupled setup.

Refunds

Integration protocol (register / verify / heartbeat)

The SDK reports its own type (php_sdk), version, and default capabilities.

Capture helpers

All validate ref == "ridebuilder" and the UUID-v4 click_id, returning null otherwise:

Client options

reportCheckout / reportReturn return PostbackResult(accepted, status) (202 = accepted, validated asynchronously). Invalid input throws a non-retryable RideBuilderException; auth/size failures (401, 413) throw with ->status and ->errorCode. Amounts must be > 0 with at most 2 decimal places (pass a string to avoid float rounding) or the call throws up front.

Tests

Plain PHP, no PHPUnit/Composer required:

Contract

Wraps the RideBuilder affiliate REST contract — POST /v1/postback/checkout, /postback/return, /postback/health, the /integration/* endpoints, the /redirect link format, and API-key provisioning. Verified byte-for-byte against the Node/.NET/Python SDKs by the shared conformance fixtures.


All versions of affiliate with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-curl Version *
ext-json 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 ridebuilder/affiliate contains the following files

Loading the files please wait ...