SDK
in package
Main class for Ualá Bis SDK
Tags
Table of Contents
- $apiBaseUrls : array<string|int, string>
- $authApiBaseUrls : array<string|int, string>
- $config : object
- __construct() : void
- Config with your params to auth with Ualá Bis
- createOrder() : response
- Create an order that you can use to make a sale.
- getFailedNotifications() : response
- Get a list of failed notifications via webhook that could not be completed with HTTP Status 200
- getOrder() : response
- Gets a previously created order with unique identifier.
- getOrders() : response
- Get a list of orders that be created
- createAccessToken() : access_token
- Generates a token with the credentials previously obtained in the constructor
Properties
$apiBaseUrls
private
array<string|int, string>
$apiBaseUrls
= ['stage' => 'https://checkout.stage.ua.la/1', 'production' => 'https://checkout.prod.ua.la/1']
$authApiBaseUrls
private
array<string|int, string>
$authApiBaseUrls
= ['stage' => 'https://auth.stage.ua.la/1/auth', 'production' => 'https://auth.prod.ua.la/1/auth']
$config
private
object
$config
Methods
__construct()
Config with your params to auth with Ualá Bis
public
__construct(string $userName, string $clientId, string $clientSecret[, bool $isDev = false ]) : void
Parameters
- $userName : string
-
userName from Ualá Bis credentials
- $clientId : string
-
clientId from Ualá Bis credentials
- $clientSecret : string
-
clientSecret from Ualá Bis credentials
- $isDev : bool = false
-
determines the environment where the code will be executed, false by default
Return values
void —createOrder()
Create an order that you can use to make a sale.
public
createOrder(float $amount, string $description, string $callbackFail, string $callbackSuccess[, string|null $notificationUrl = null ]) : response
Parameters
- $amount : float
-
order amount
- $description : string
-
order description
- $callbackFail : string
-
URL to redirect in case the payment of an order fails
- $callbackSuccess : string
-
URL to redirect in case the payment of an order fails
- $notificationUrl : string|null = null
-
URL endpoint to send status notifications. This is an OPTIONAL value
Tags
Return values
response —getFailedNotifications()
Get a list of failed notifications via webhook that could not be completed with HTTP Status 200
public
getFailedNotifications() : response
Tags
Return values
response —getOrder()
Gets a previously created order with unique identifier.
public
getOrder(orderId $orderId) : response
Parameters
- $orderId : orderId
-
the order id
Tags
Return values
response —getOrders()
Get a list of orders that be created
public
getOrders([int|string|null $limit = null ][, string|null $fromDate = null ][, string|null $toDate = null ]) : response
Parameters
- $limit : int|string|null = null
-
max number of orders to return - 10 by default.
- $fromDate : string|null = null
-
date of creation of the orders from which the search will begin.
- $toDate : string|null = null
-
date of creation of the orders until where it will be searched.
Tags
Return values
response —createAccessToken()
Generates a token with the credentials previously obtained in the constructor
private
createAccessToken() : access_token