Download the PHP package muhammadnan/tripay-payment-gateway without Composer

On this page you can find all versions of the php package muhammadnan/tripay-payment-gateway. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tripay-payment-gateway

Unofficial Tripay Payment Gateway

This package is un-official, already compatible with Composer, for more details please visit Documentation.

This package is made to make it easier for php users

IMPORTANT: Make sure you read the documentation and understand what these methods are used for!

need PHP 8 and above to use this package

Instalation for PHP >8

Instalation for PHP <8

Configuration

before starting further, you must define or import a tripay for further configuration

then after that configure api-key, private-key, merchant-code

or you can create or add env variable in your project (such as laravel, codeigniter) like this

and after add env variable in your project declare main class like this

For mode by default it will be in production mode, to change it to sandbox mode, you can add a 'sandbox' after the merchant code

Contents available

content method available so far

Method Contents Status
initChannelPembayaran() Channel Pembayaran OK
initInstruksiPembayaran(string $code) Instruksi Pembayaran OK
initMerchantChannelPembayaran(string $code) Merchant Channel Pembayaran OK
initKalkulatorBiaya(string $code, int $amount) Kalkulator Biaya OK
initDaftarTransaksi(int $page, int $per_page, string $sort, string $reference, string $merchant_ref, string $method, string $status) Daftar Transaksi OK
initTransaction(string $merchantRef) Transaksi Open/Close OK
initCallback() Callback OK

Request available

request can return the available content, the list of available methods is as follows

Method Description
getRequest(string $url) return return guzzle http client
getResponse() return response
getJson() return json decode
getStatusCode() return status code
getSuccess() return boolean
getData() return data response

Channel Pembayaran

This API is used to get a list of all available payment channels along with complete information including transaction fees for each channel

the next method can be seen in the request method or can be seen in examples

Instruksi Pembayaran

This API is used to retrieve payment instructions from each channel

the next method can be seen in the request method or can be seen in examples

Merchant Channel Pembayaran

This API is used to obtain a list of payment channels available in your Merchant account along with complete information including transaction fees for each channel

the next method can be seen in the request method or can be seen in examples

Kalkulator Biaya

This API is used to obtain detailed transaction fee calculations for each channel based on a specified nominal

the next method can be seen in the request method or can be seen in examples

Daftar Transaksi

This API is used to get a list of merchant transactions

the next method can be seen in the request method or can be seen in examples

Transaction

Before proceeding to the next step in transactions, please configure your reference merchant

Before making a signature, please set the amount for close transactions and for open transactions, please set the payment method

Note: if you use an open payment do not define the amount and vice versa if you use a close payment do not define the amount

Create Signature

Close Transaction

To define close transaction, use the closeTransaction () method

After you define a close transaction, please set the payload with the setPayload (array $ data) method

examples:

for get the payload u can use method,

after set transaction u can sent the request and get data directly with the getData () method or for more method u can seen in the request method or can be see in examples

Get Close Detail Transaction

To see further transaction data, you can see it in transaction details, for close transactions, see below where to get reference code? please go to the simulator menu and get it in the transaction menu, there is a reference code that can be matched here

the next method can be seen in the request method or can be seen in examples

Open Transaction

To define close transaction, use the openTransaction () method

After you define a open transaction, please set the payload with the setPayload (array $ data) method

examples:

for get the payload u can use method,

after set transaction u can sent the request and get data directly with the getData () method or for more method u can seen in the request method or can be see in examples

Get Open Detail Transaction

To see further transaction data, you can see it in transaction details, for close transactions, see below where can i get uuid? please open the transaction menu then select open payment then there is a uuid code there

the next method can be seen in the request method or can be seen in examples

Get Daftar Pembayaran Transaction

To see a list of payments made in open transactions you can use this method you can get the uuid in your account.

the next method can be seen in the request method or can be seen in examples

Callback

Callback is a method of sending transaction notifications from the TriPay server to the user's server. When the payment from the customer is completed, the TriPay system will provide a notification containing transaction data which can then be further managed by the user's system.

please define the method below before starting

Receive JSON

to get the json that was sent by tripay you can use the method below

Decode JSON

rather than wasting time on json_decode, this package provides that

Get The Signature

take signature from tripay using the method below

Callback Signature

tripay also sends a callback signature to validate customer data

Call Event

for re-validation, tripay sends an event in the form of payment_status this package also captures that

Validate Signature

To shorten the code, we prepared signature validation as well.

Validate Event

To shorten the code too, we also set up validate events to go a step further

Testing

This package is tested using PHPunit, but mostly direct testing

Contribute

If you want to contribute this SDK, you can fork, edit and create pull request. And we will review your request and if we finish to review your request. We will merge your request to developemnt branch. Thanks


All versions of tripay-payment-gateway with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^7.0
symfony/http-foundation Version ^6.0
vlucas/phpdotenv Version ^5.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package muhammadnan/tripay-payment-gateway contains the following files

Loading the files please wait ....