PagaMasTarde Api Client in PHP. Use the api with simple methods and using POO.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/PagaMasTarde
test/PagaMasTarde
.gitignore
.travis.yml
README.md
composer.json
composer.lock
phpunit.xml

README.md

PagaMasTarde Api Client

Build Status Latest Stable Version composer.lock Scrutinizer Code Quality

Shopper Library offers the shops connected to Paga+Tarde a way to get the payment form using objects. The library provides stubs for each type of shop connected to the shopper service. For communication with the shopper service includes a client to create the CURL request.

All the code is tested and inspected by external services.

How to use

Install the library by:

  • Downloading it from here

https://github.com/PagaMasTarde/pmtApiClient/releases/latest

  • Using Composer:
composer require pagamastarde/pmt-api-client

Finally, be sure to include the autoloader:

require_once '/path/to/your-project/vendor/autoload.php';

Once you have the library ready inside your project you will have the stub objects available and the pmtApiClient also available.

//Create a pmtApi object, for example:
$pmtApiClient = new PmtApiClient($privateKey);

//Example: verify a loan exists before notification arrives:
$isOrderPaid = $pmtApiClient->charge->validatePaymentForOrderId($orderId);

//then you can:
if ($isOrderPaid){
    //order is paid mark it as paid in your DB and show order-confirm page.
} else {
    //order is not paid, redirect to checkout.
}

// You can investigate the rest of the methods. And find all the documentation of the API here:
// http://docs.pagamastarde.com/api/

Help us to improve

We are happy to accept suggestions or pull requests. If you are willing to help us develop better software please create a pull request here following the PSR-2 code style and we will use reviewable to check the code and if al test pass and no issues are detected by SensioLab Insights you could will be ready to merge.