Download the PHP package rootwritter/tripay-payment-gateway without Composer
On this page you can find all versions of the php package rootwritter/tripay-payment-gateway. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rootwritter/tripay-payment-gateway
More information about rootwritter/tripay-payment-gateway
Files in rootwritter/tripay-payment-gateway
Package tripay-payment-gateway
Short Description PHP Payment Gateway Tripay Library
License GPL-3.0
Homepage https://payment.tripay.co.id
Informations about the package tripay-payment-gateway
Un-official 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 7 and above to use this package
Instalation
Configuration
before starting further, you must define or import a tripay for further configuration
then after that configure api-key, private-key, merchant-code
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 |
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 |
getStatusCode() |
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
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 getPayload()
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 getPayload()
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
php $init->callEvent(); // callback event, return `payment_status`
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
Project ini saya buat karena sebelumnya saya menggunakan tripay sebagai payment gateway, daripada kode saya nganggur jadi ada baiknya saya share. so, silahkan berkontribusi baik dari dokumentasi atau membenahi script dari package ini ;)