Download the PHP package bamz3r/veritrans-php without Composer

On this page you can find all versions of the php package bamz3r/veritrans-php. 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 veritrans-php

Veritrans-PHP

Enchanced version feature:

If you want to use my version first remove the original of veritrans/veritrans-php and then add bamz3r/veritrans-php to your composer.json:

and run composer install on your terminal.

Original README:

Build Status

Veritrans is now :arrow_right: Midtrans

Midtrans :heart: PHP!

This is the Official PHP wrapper/library for Midtrans Payment API. Visit https://midtrans.com for more information about the product and see documentation at http://docs.midtrans.com for more technical details.

1. Installation

1.a Composer Installation

If you are using Composer, add this require line to your composer.json file:

and run composer install on your terminal.

1.b Manual Instalation

If you are not using Composer, you can clone or download this repository.

2. How to Use

2.1 General Settings

2.2 Choose Product/Method

We have 3 different products of payment that you can use:

Choose one that you think best for your unique needs.

2.2.a Snap

You can see Snap example here.

Get Snap Token

Initialize Snap JS when customer click pay button

Implement Notification Handler

Refer to this section

2.2.b VT-Web

You can see some VT-Web examples here.

Get Redirection URL of a Charge

Implement Notification Handler

Refer to this section

2.2.c Core API (VT-Direct)

You can see some VT-Direct examples here.

Set Client Key

Checkout Page

Checkout Process

1. Create Transaction Details
2. Create Item Details, Billing Address, Shipping Address, and Customer Details (Optional)
3. Get Token ID from Checkout Page
4. Create Transaction Data
5. Charge
6. Handle Transaction Status

7. Implement Notification Handler

Refer to this section

2.3 Handle HTTP Notification

Create separated web endpoint (notification url) to receive HTTP POST notification callback/webhook. HTTP notification will be sent whenever transaction status is changed. Example also available here

2.4 Process Transaction

Get Transaction Status

Approve Transaction

If transaction fraud_status == CHALLENGE, you can approve the transaction from Merchant Dashboard, or API :

Cancel Transaction

You can Cancel transaction with fraud_status == CHALLENGE, or credit card transaction with transaction_status == CAPTURE (before it become SETTLEMENT)

Expire Transaction

You can Expire transaction with transaction_status == PENDING (before it become SETTLEMENT or EXPIRE)

Contributing

Developing e-commerce plug-ins

There are several guides that must be taken care of when you develop new plugins.

  1. Handling currency other than IDR. Veritrans v1 and v2 currently accepts payments in Indonesian Rupiah only. As a corrolary, there is a validation on the server to check whether the item prices are in integer or not. As much as you are tempted to round-off the price, DO NOT do that! Always prepare when your system uses currencies other than IDR, convert them to IDR accordingly, and only round the price AFTER that.

  2. Consider using the auto-sanitization feature.

All versions of veritrans-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
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 bamz3r/veritrans-php contains the following files

Loading the files please wait ....