Introduction
The Deposits PHP SDK (Software Development Kit) is a software package you can download and add to your existing code facilitating the integration by having pre-defined classes and functions you can call to integrate the Create deposit endpoint Review and download the source code from GitHub by clicking on this button PHP SDKThe SDKs are published under the
directa24 name (package and namespace). This is expected: use them as shown with your Pandablue credentials.Installation
Requirements
- PHP 5.6 or later
Install
Via ComposerInstall PHP SDK via Composer
Usage
Begin by initializing your credentialsDeposit Credentials
Make sure you have whitelisted your servers IPs on Pandablue Connect by going to Operations -> Accounts -> API Access.
As soon as you are ready with the integration and you have the production credentials, replace the credentials with the production ones and set the ProductionMode to True to use the production endpoints.
Set Production Mode to True
Classes
Check the respective Endpoint Page to see the format of the responses, fields requirements and validations.
Create Deposit
Every time you need to create a deposit, you will need to invoke theCreateDepositRequest Class with all the objects containing the information required to be sent. The amount of information required depends on the flow you have chosen, either the Hosted Checkout Experience or the ONE SHOT Experience.
Hosted Checkout Experience
ONE SHOT Experience
The amount and the country are the only mandatory fields for a successful request. The rest of the fields needs to be sent depending on the flow you have chosen as those will be collected by us if not sent.
Deposit Status
As soon as the deposit is created and you have received the notification in yournotification_url, you will want to retrieve the status of the deposit.
Click here to see the deposits status flow.
Make sure you are adding the deposit_id received on your notification_url in the field depositId.
Payment Methods
For the best user experience, we recommend integrating our Payment Methods Endpoint to automatically retrieve the list of payment methods name, logos, types and more that your account has available. In order to do that, invoke thePaymentMethodRequest Class containing the Countryโs ISO code of the country you need the payment methods from in the field PaymentMethodRequest.country
Exchange Rates
If you need to know the Exchange Rate of a given currency, you can do so by invokingExchangeRateRequest with the Countryโs ISO code of the origin and the amount you want to convert to USD.