Download the PHP package sbpay/sdk without Composer

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

SBPay.me PHP SDK

Build Status Latest Stable Version Total Downloads License PHP Version Require

The SBPay.me PHP library provides convenient access to the SBPay.me API from applications written in the PHP language.

Requirements

PHP 8.1.0 and later.

Composer

You can install the bindings via Composer. Run the following command:

Dependencies

The bindings 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.

Getting Started

Simple usage looks like:

Reference

Payments

To access payments API methods, get payments object from SBPayClient object:

Available methods:

Method Description
getOrder Returns order details by Order ID
approveOrder Approve payment order.
Pass $paymentMethodReferenceId and $paymentMethodName to save payment method for future use (recurring payments or rebilling)
refundOrder Refund payment order
validateCustomPaymentProcessorRequest Validate custom payment processor request. (Required for implementing custom payment processor)

Subscriptions

To access subscriptions API methods, get subscriptions object from SBPayClient object:

Available methods:

Method Description
getCustomerSubscriptions Returns customer subscriptions list by Customer reference ID

Custom payment processor callbacks

Using SBPay.me, you have the flexibility to integrate a personalized payment processor. Whenever SBPay needs to initiate a specific action, it will trigger a callback to the URL you have designated. You can configure these callback URLs within your SBPay.me account settings.

Here is a list of the callback URLs you can configure:

Parameter name Description
order_id Order id in SBPay
amount Amount
currency Currency
customer_id Customer reference id
save_payment_method 1 if customer selected to store payment method/0 if customer selected to not store payment method
recurring_period_type Recurring period type for recurring payments only (year/month/week/day)
recurring_period Recurring period for recurring payments only (number)
return_url Return URL (you should redirect customer here after payment)
cancel_url Cancel URL (you should redirect customer here if customer cancels payment)
timestamp Time stamp of request (to validate signature)
algo Algorithm of signature
signature Signature to validate request
Parameter name Description
order_id Order id in SBPay
amount Amount
currency Currency
customer_id Customer reference id
payment_method_reference_id Payment method reference id (You should pass it during confirm initial payment)
timestamp Time stamp of request (to validate signature)
algo Algorithm of signature
signature Signature to validate request
Parameter name Description
customer_id Customer reference id
payment_method_reference_id Payment method reference id (You should pass it during confirm initial payment)
timestamp Time stamp of request (to validate signature)
algo Algorithm of signature
signature Signature to validate request
Parameter name Description
order_id Order id in SBPay
amount Amount
currency Currency
transaction_id Transaction ID of payment (you should pass it during payment confirmation)
timestamp Time stamp of request (to validate signature)
algo Algorithm of signature
signature Signature to validate request

You can use SDK to validate request:

Examples

You can find custom payment processor example here

Documentation for API Endpoints

You can find API documentation here


All versions of sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1.0
ext-curl Version *
guzzlehttp/guzzle Version ^7.7
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 sbpay/sdk contains the following files

Loading the files please wait ....