Categories
PHP

Paysbuy PHP integration

I was asked to integrate Paysbuy.com into Yclas.com by a client who paid for the integration.

This is a payment gateway that operates in Thailand. Nice thing is that once integrated accepts multiple cards, bank transfer, cash payment, paypal or other users from the platform.

The integration is quite old and if you check the docs…. damn… so by checking other modules, reading the docs checking the API, checking other forums… I got something a bit cleaner and more updated than what they offer.

Example of usage

    

Read the results

if ( paysbuy::result() === TRUE )
    echo 'Paid do something';
else
    echo 'NOT paid';

You can get the full code here

 

Testing

To test the gateway / sandbox you can user this user and password and then pay with a fake card, you will get a rejected. I was unable to find a buyer demo account or a test card.

email[email protected]
pass: paysbuy123

Official docs

In the research I found some more docs which are quite hidden…. thanks google 😉