Download the PHP package ninoskopac/promisepay-php without Composer
On this page you can find all versions of the php package ninoskopac/promisepay-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ninoskopac/promisepay-php
More information about ninoskopac/promisepay-php
Files in ninoskopac/promisepay-php
Package promisepay-php
Short Description PHP SDK for the PromisePay API
License
Homepage https://promisepay.com/
Informations about the package promisepay-php
PHP SDK - PromisePay API
Note: The api only responds to the models which are included with the php package.
- Installation
- Composer
- Manual Installation
- Prerequisites
- Configuration
- Examples
- Tokens
- Request session token
- Items
- Create an item
- Get an item
- Get a list of items
- Update an item
- Delete an item
- Get an item status
- Get an item's buyer
- Get an item's seller
- Get an item's fees
- Get an item's transactions
- Get an item's wire details
- Get an item's BPAY details
- Item Actions
- Make payment
- Request payment
- Release payment
- Request release
- Cancel
- Acknowledge wire
- Acknowledge PayPal
- Revert wire
- Request refund
- Refund
- Decline refund
- Raise Dispute
- Request Dispute Resolution
- Resolve Dispute
- Escalate Dispute
- Request Tax Invoice
- List Item Batch Transactions
- Send Tax Invoice
- Users
- Create a user
- Get a user
- Get a list of users
- Update a user
- Get a user's card accounts
- Get a user's PayPal accounts
- Get a user's bank accounts
- Get a user's items
- Show User Wallet Account
- Set a user's disbursement account
- Wallet Accounts
- Show Wallet Account
- Withdraw Funds
- Deposit Funds
- Show Wallet Account User
- Card Accounts
- Create a card account
- Get a card account
- Delete a card account
- Get a card account's users
- Bank Accounts
- Create a bank account
- Get a bank account
- Delete a bank account
- Get a bank account's users
- Validate Routing Number
- PayPal Accounts
- Create a PayPal account
- Get a PayPal account
- Delete a PayPal account
- Get a PayPal account's users
- Batch Transactions
- List Batch Transactions
- Show Batch Transaction
- Charges
- Create Charge
- List Charges
- Show Charge
- Show Charge Buyer
- Show Charge Status
- Marketplaces
- Show Marketplace
- Token Auth
- Generate Card Token
- Direct Debit Authority
- Create Direct Debit Authority
- List Direct Debit Authority
- Show Direct Debit Authority
- Delete Direct Debit Authority
- Companies
- Create a company
- Get a company
- Get a list of companies
- Update a company
- Fees
- Get a list of fees
- Get a fee
- Create a fee
- Transactions
- Get a list of transactions
- Get a transaction
- Get a transaction's user
- Get a transaction's fee
- Show Transaction Wallet Account
- Show Transaction Card Account
- Addresses
- Show Address
- Tools
- Health check
- Configurations
- Create Configuration
- Show Configuration
- List Configurations
- Update Configuration
- Delete Configuration
- Payment Restrictions
- List Payment Restrictions
- Show Payment Restriction
- Callbacks
- Create Callback
- List Callbacks
- Show Callback
- Update Callback
- Delete Callback
- List Callback Responses
- Show Callback Response
- Async and Wrappers
- Async
- Wrappers
- Contributing
Installation
Composer
You can include this package via Composer.
Install the package.
composer install
Require the package in the controller where you'll be using it.
Manual Installation
Download the latest release from GitHub, then require the package in the relevant controller.
Prerequisites
Configuration
Before interacting with PromisePay API, you'll need to create a prelive account and get an API token.
Afterwards, you need to declare environment, login (your email address) and password (API token), thus:
Examples
Tokens
Request session token
The below example shows the request for a marketplace configured to have the Item and User IDs generated automatically for them.
Items
Create an item
Get an item
Get a list of items
Update an item
Delete an item
Get an item status
Get an item's buyer
Get an item's seller
Get an item's fees
Get an item's transactions
Get an item's wire details
Get an item's BPAY details
Item Actions
Make payment
Request payment
Release payment
Request release
Cancel
Acknowledge wire
Acknowledge PayPal
Revert wire
Request refund
Refund
Decline refund
Raise Dispute
Request Dispute Resolution
Resolve Dispute
Escalate Dispute
Request Tax Invoice
List Item Batch Transactions
Send Tax Invoice
Users
Create a user
Get a user
Get a list of users
Update a user
Get a user's card accounts
Get a user's PayPal accounts
Get a user's bank accounts
Get a user's items
Show User Wallet Account
Set a user's disbursement account
Wallet Accounts
Show Wallet Account
Withdraw Funds
Deposit Funds
Show Wallet Account User
Card Accounts
Create a card account
Get a card account
Delete a card account
Get a card account's users
Bank Accounts
Create a bank account
Get a bank account
Delete a bank account
Get a bank account's users
Validate Routing Number
PayPal Accounts
Create a PayPal account
Get a PayPal account
Delete a PayPal account
Get a PayPal account's users
Batch Transactions
List Batch Transactions
Show Batch Transaction
Charges
Create Charge
List Charges
Show Charge
Show Charge Buyer
Show Charge Status
Marketplaces
Show Marketplace
Token Auth
Generate Card Token
Direct Debit Authority
Create Direct Debit Authority
List Direct Debit Authority
Show Direct Debit Authority
Delete Direct Debit Authority
Companies
Create a company
Get a company
Get a list of companies
Update a company
Fees
Get a list of fees
Get a fee
Create a fee
Transactions
Get a list of transactions
Get a transaction
Get a transaction's user
Get a transaction's fee
Show Transaction Wallet Account
Show Transaction Card Account
Addresses
Show Address
Tools
Health check
Configurations
Create Configuration
Show Configuration
List Configurations
Update Configuration
Delete Configuration
Payment Restrictions
List Payment Restrictions
Show Payment Restriction
Callbacks
Create Callback
List Callbacks
Show Callback
Update Callback
Delete Callback
List Callback Responses
Show Callback Response
Async and Wrappers
Async
Asynchronous execution provides a significant speed improvement, as compared to synchronous execution.
Response variables are placed inside done()
method; they can be used both as arrays and objects, but using them as objects provides finer grained control. For example, the following will return equivalent data: $cardToken['user_id']
and $cardToken->getJson('user_id')
.
Response variables contain the following methods/getters:
getJson()
-> full response JSONgetMeta()
-> meta array extracted from response JSON, if presentgetLinks()
-> links array extracted from response JSON, if presentgetDebug()
-> response headers
Wrappers
Two wrappers are available: PromisePay::getAllResults()
and PromisePay::getAllResultsAsync()
. They can be used to get all results from sets of result pages, instead of up to 200 per request. For example, they can be used to fetch all batch transactions at once. Note that these requests may take some time depending on amount requested. If getting all results is mandatory, no matter how big the size, use the synchronous version. For a faster version, use async version, but not all requests are guaranteed to be returned. Generally, asynchronous execution is fine for up to 20 pages, each containing up to 200 results, yielding 4000 results within a few seconds.
Synchronous execution
Asynchronous execution
Contributing
1. Fork it ( https://github.com/PromisePay/promisepay-php/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request