Download the PHP package suretly/php7-sdk without Composer

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

Suretly LenderAPI SDK

PHP7 SDK for Suretly Lender API

Installing LenderAPI SDK

The recommended way to install LenderAPI SDK is through Composer.

Next, run the Composer command to install the latest stable version of LenderAPI SDK:

After installing, you need to require Composer's autoloader:

Use

After installing, you need to create a new Suretly\LenderApi\LenderManager.

Include LenderManager class

You can create SDK from static method:

Or you can create a configuration for your connection and create a LenderManager:

Calling API methods with SDK

1 General methods

1.1 Getting parameters for surety search

1.2 Orders list

Get orders with parameter $limit and optional parameter $skip. The limit parameter must be set in the range from 0 to 25.

2 Creating and handling orders

2.2 Create surety order

For a create a new order, you must create a new Suretly\LenderApi\Model\NewOrder object.

After, you can add new order on Suretly server with method postNewOrder:

Method postNewOrder return object with 2 fields

For example, json data

2.3 Get order status

To get the status of the order, run method getOrderStatus, which return Suretly\LenderApi\Model\OrderStatus object:

For example, json data

2.4 Get public Order and public Order Url

To get a order, you must call method getOrder with parameter $orderID:

For example, json data for Borrower with russian passport:

2.5 Cancel order

For a cancel the order, you must call method postOrderStop with parameter $orderID:

2.6 Get borrower contract

To get a contract for a Borrower, you must call method getContract with parameter $orderID:

Method getContract return HTML code:

2.7 Confirm that contract is signed by borrower

To confirm that contract is signed by borrower:

2.8 Confirm that order is paid and issued

To confirm that order is paid and issued:

2.9 8 Confirm that order is paid

To confirm that order is paid:

2.10 Confirm that order is partial paid

To confirm that order is partial paid:

2.11 Prolong order

To get fee_amount prolong order, you must run method getOrderProlong with parameter $orderID and parameter $days, which return float value:

For example, json data

To prolong order, you must call method postOrderUnpaid

2.13 Upload borrower image

To upload a borrower image, you must call method postUploadImageOrder with parameter $orderID, parameter $realPathToFile, which is realpath to file, and optional parameter $filename:

2.14 Mark loan as overdue

Mark loan as overdue:

Dictionaries

Currencies

For example, json data

Countries

For example, json data

Work with errors

All SDK methods should use try/catch. For example:

All SDK methods call ResponseErrorException when an error occurs on the server. You can see all errors in class - SuretlySDK\Type\ResponseErrorStatusType.

Migration

version v0.3, v0.4 to v1.0

Now, you should use LenderManager instead Suretly.

Also, all field on Model is private and you should use getters and setters.

That's all.

Development

For run examples test in root project directory run commands

For run unit tests in root project directory run command in console

For Windows


All versions of php7-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3
guzzlehttp/guzzle Version ^6.3
netresearch/jsonmapper Version ^1.4
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 suretly/php7-sdk contains the following files

Loading the files please wait ....