Download the PHP package sanmai/gmopg without Composer

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

Build Status Coverage Status Maintainability Latest Stable Version License

Installation

composer require sanmai/gmopg

Configuration

There are two ways to configure the API:

  1. With global constants. Namely, you need to have defined:

    Where first three you can get from the management panel or from emails from GMO PG.

    The last constant GMO_TRIAL_MODE should be set to true if you're using a test shop password.

  2. By calling these static methods:

Testing payments

Currently there is no other way to enable a test mode other than by defining a constant GMO_TRIAL_MODE set to true.

Testing payments with directly-entered card numbers with test environment credentials requires you to enable such payments as outlined in the documentation.

Basic usage

Array of $errors comes in a form similar to this:

array(1) {
  'E01040010' =>
  string(34) "This order ID was used previously."
}

A list of most known error codes. In a readable form. And another.

A typical $response will look like so:

class GMO\API\Response\ExecTranResponse#1 (9) {
  public $ACS =>
  string(1) "0"
  public $OrderID =>
  string(10) "1517000000"
  public $Forward =>
  string(7) "0afd1200"
  public $Method =>
  string(1) "1"
  public $PayTimes =>
  string(0) ""
  public $Approve =>
  string(7) "0112234"
  public $TranID =>
  string(28) "180111111111111111111344439"
  public $TranDate =>
  string(14) "20221222213141"
  public $CheckString =>
  string(32) "68b329da9893e34099c7d8ad5cb9c940"
}

Paying with a token

A payment object can accept a token received from the JavaScript API instead of credit card details:

One should use the above method of payment if they're getting the venerable error E61040001.

Transaction details

Now you naturally want to load transaction details for the current payment.

In this $response you would find these fields:

class GMO\API\Response\SearchTradeResponse#4950 (21) {
  public $AccessID =>
  string(32) "b026324c6904b2a9cb4b88d6d61c81d1"
  public $AccessPass =>
  string(32) "26ab0db90d72e28ad0ba1e22ee510510"
  public $OrderID =>
  string(10) "1517000000"
  public $Status =>
  string(5) "SALES"
  public $ProcessDate =>
  string(14) "20221222213141"
  public $JobCd =>
  string(5) "SALES"
  public $ItemCode =>
  string(7) "0000000"
  public $Amount =>
  string(4) "4999"
  public $Tax =>
  string(1) "0"
  public $SiteID =>
  string(0) ""
  public $MemberID =>
  string(0) ""
  public $CardNo =>
  string(16) "************1111"
  public $Expire =>
  string(4) "2307"
  public $Method =>
  string(1) "1"
  public $PayTimes =>
  string(0) ""
  public $Forward =>
  string(7) "0afd1200"
  public $TranID =>
  string(28) "180111111111111111111344439"
  public $Approve =>
  string(7) "0112234"
  public $ClientField1 =>
  string(0) ""
  public $ClientField2 =>
  string(0) ""
  public $ClientField3 =>
  string(0) ""
}

Futher API Documentation

GMO-PG is very secretive seemingly for no reason at all (that's a complete opposite of Stripe), and typically you can only access their documentation upon signing a non-disclosure agreement.


All versions of gmopg with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
guzzlehttp/guzzle Version ^6
sanmai/pipeline Version ^0.3.2|^2.0|^3.0.1
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 sanmai/gmopg contains the following files

Loading the files please wait ....