@motionpicture/gmo-service
GMO Client Library for Node.js
Last updated 2 years ago by ilovegadd .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @motionpicture/gmo-service 
SYNC missed versions from official npm registry.

GMO Client Library for Node.js

npm (scoped) CircleCI Coverage Status Dependency Status npm

Node.jsでGMOサービスを使うためのパッケージです。

Table of contents

Usage

npm install @motionpicture/gmo-service
const GMO = require('@motionpicture/gmo-service');

When using the GMO Service SDK, you must provide connection information. This can be provided using:

Environment variables

Name Required Value Purpose
DEBUG false gmo-service:* Debug
GMO_ENDPOINT false GMO API endpoint

クレジットカード決済(即時売上)の例

const GMO = require('@motionpicture/gmo-service');

const orderId ='orderId';
const creditService = new GMO.service.Credit(
    { endpoint: process.env.GMO_ENDPOINT }
);
creditService.entryTran({
    shopId: 'your shopId',
    shopPass: 'sour shopPass',
    orderId: orderId,
    jobCd: GMO.utils.util.JobCd.Auth,
    amount: 1234
}).then((entryTranResult) => {
    console.log('entryTranResult:', entryTranResult);

    creditService.execTran({
        accessId: entryTranResult.accessId,
        accessPass: entryTranResult.accessPass,
        orderId: orderId,
        method: GMO.utils.util.Method.Lump,
        cardNo: '1234123412341234',
        expire: '2024',
        securityCode: '123'
    }).then((execTranResult) => {
        console.log('execTranResult:', execTranResult);

        creditService.alterTran({
            shopId: 'your shopId',
            shopPass: 'sour shopPass',
            accessId: entryTranResult.accessId,
            accessPass: entryTranResult.accessPass,
            jobCd: GMO.utils.util.JobCd.Sales,
            amount: amount
        }).then((alterTranResult) => {
            console.log('alterTranResult:', alterTranResult);
        });
    });
});

Code Samples

コードサンプルは example にあります。

Jsdoc

npm run docでjsdocを作成できます。./docに出力されます。

License

ISC

Current Tags

  • 4.3.0                                ...           latest (2 years ago)
  • 4.2.0-alpha.8                                ...           next (2 years ago)

40 Versions

  • 4.3.0                                ...           2 years ago
  • 4.2.1                                ...           2 years ago
  • 4.2.0                                ...           2 years ago
  • 4.2.0-alpha.8                                ...           2 years ago
  • 4.2.0-alpha.7                                ...           2 years ago
  • 4.2.0-alpha.6                                ...           2 years ago
  • 4.2.0-alpha.5                                ...           2 years ago
  • 4.2.0-alpha.4                                ...           2 years ago
  • 4.2.0-alpha.3                                ...           2 years ago
  • 4.2.0-alpha.2                                ...           2 years ago
  • 4.2.0-alpha.0                                ...           2 years ago
  • 4.1.0                                ...           3 years ago
  • 4.0.2                                ...           3 years ago
  • 4.0.1                                ...           3 years ago
  • 4.0.1-alpha.0                                ...           3 years ago
  • 4.0.0                                ...           3 years ago
  • 3.6.0 [deprecated]           ...           3 years ago
  • 3.5.1 [deprecated]           ...           3 years ago
  • 3.5.0 [deprecated]           ...           3 years ago
  • 3.4.0 [deprecated]           ...           3 years ago
  • 3.3.0 [deprecated]           ...           3 years ago
  • 3.2.1 [deprecated]           ...           3 years ago
  • 3.1.0 [deprecated]           ...           3 years ago
  • 3.0.4 [deprecated]           ...           3 years ago
  • 3.0.0 [deprecated]           ...           3 years ago
  • 2.0.10 [deprecated]           ...           3 years ago
  • 2.0.9 [deprecated]           ...           3 years ago
  • 2.0.8 [deprecated]           ...           3 years ago
  • 2.0.7 [deprecated]           ...           3 years ago
  • 2.0.6 [deprecated]           ...           3 years ago
  • 2.0.5 [deprecated]           ...           3 years ago
  • 2.0.4 [deprecated]           ...           3 years ago
  • 2.0.3 [deprecated]           ...           3 years ago
  • 2.0.2 [deprecated]           ...           3 years ago
  • 2.0.1 [deprecated]           ...           3 years ago
  • 2.0.0 [deprecated]           ...           3 years ago
  • 1.0.3 [deprecated]           ...           3 years ago
  • 1.0.2 [deprecated]           ...           3 years ago
  • 1.0.1 [deprecated]           ...           3 years ago
  • 1.0.0 [deprecated]           ...           3 years ago

Copyright 2014 - 2017 © taobao.org |