UNPKG

9.66 kBHTMLView Raw
1<!DOCTYPE html>
2
3<html lang="en">
4<head>
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width">
7 <title>GMO Client Library for Node.js Index</title>
8
9 <!--[if lt IE 9]>
10 <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11 <![endif]-->
12 <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
13
14 <link type="text/css" rel="stylesheet" href="styles/site.cosmo.css">
15
16</head>
17
18<body>
19
20<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
21<div class="container">
22 <div class="navbar-header">
23 <a class="navbar-brand" href="index.html">GMO Client Library for Node.js</a>
24 <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
25 <span class="icon-bar"></span>
26 <span class="icon-bar"></span>
27 <span class="icon-bar"></span>
28 </button>
29 </div>
30 <div class="navbar-collapse collapse" id="topNavigation">
31 <ul class="nav navbar-nav">
32
33 <li class="dropdown">
34 <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
35 <ul class="dropdown-menu ">
36 <li><a href="error_badRequestError.html">error/badRequestError</a></li><li><a href="error_errors.html">error/errors</a></li><li><a href="factory.resultNotification.creditCard.html">factory.resultNotification.creditCard</a></li><li><a href="services_card.html">services/card</a></li><li><a href="services_credit.html">services/credit</a></li><li><a href="utils_util.html">utils/util</a></li>
37 </ul>
38 </li>
39
40 <li class="dropdown">
41 <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
42 <ul class="dropdown-menu ">
43 <li><a href="module-index.html">index</a></li>
44 </ul>
45 </li>
46
47 <li class="dropdown">
48 <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
49 <ul class="dropdown-menu ">
50 <li><a href="error_badRequestError.BadRequestError.html">error/badRequestError.BadRequestError</a></li>
51 </ul>
52 </li>
53
54 <li class="dropdown">
55 <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
56 <ul class="dropdown-menu ">
57 <li><a href="global.html#parseErrorMessage">parseErrorMessage</a></li>
58 </ul>
59 </li>
60
61 </ul>
62
63 <div class="col-sm-3 col-md-3">
64 <form class="navbar-form" role="search">
65 <div class="input-group">
66 <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
67 <div class="input-group-btn">
68 <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
69 </div>
70 </div>
71 </form>
72 </div>
73
74 </div>
75
76</div>
77</div>
78
79
80<div class="container" id="toc-content">
81<div class="row">
82
83
84 <div class="col-md-8">
85
86 <div id="main">
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109 <section class="readme-section">
110 <article><h1>GMO Client Library for Node.js</h1><p><a href="https://www.npmjs.com/package/@motionpicture/gmo-service"><img src="https://img.shields.io/npm/v/@motionpicture/gmo-service.svg" alt="npm (scoped)"></a><br><a href="https://circleci.com/gh/motionpicture/gmo-service"><img src="https://circleci.com/gh/motionpicture/gmo-service.svg?style=shield" alt="CircleCI"></a><br><a href="https://coveralls.io/github/motionpicture/gmo-service"><img src="https://coveralls.io/repos/github/motionpicture/gmo-service/badge.svg" alt="Coverage Status"></a><br><a href="https://david-dm.org/motionpicture/gmo-service"><img src="https://img.shields.io/david/motionpicture/gmo-service.svg" alt="Dependency Status"></a><br><a href="https://snyk.io/test/github/motionpicture/gmo-service"><img src="https://snyk.io/test/github/motionpicture/gmo-service/badge.svg" alt="Known Vulnerabilities"></a><br><a href="https://nodei.co/npm/@motionpicture/gmo-service/"><img src="https://img.shields.io/npm/dm/@motionpicture/gmo-service.svg" alt="npm"></a></p>
111<p>node.jsでGMOサービスを使うためのパッケージです。</p>
112<h2>Table of contents</h2><ul>
113<li><a href="#usage">Usage</a></li>
114<li><a href="#code-samples">Example</a></li>
115<li><a href="#jsdoc">Jsdoc</a></li>
116<li><a href="#license">License</a></li>
117</ul>
118<h2>Usage</h2><pre class="prettyprint source lang-sh"><code>npm install @motionpicture/gmo-service</code></pre><pre class="prettyprint source lang-js"><code>var GMO = require('@motionpicture/gmo-service');</code></pre><p>When using the GMO Service SDK, you must provide connection information. This can be provided using:</p>
119<h3>set environment variables - For example,</h3><pre class="prettyprint source lang-shell"><code>set GMO_ENDPOINT=*****</code></pre><p>for test</p>
120<pre class="prettyprint source lang-shell"><code>set TEST_GMO_SHOP_ID=*****
121set TEST_GMO_SHOP_PASS=*****
122set TEST_GMO_SITE_ID=*****
123set TEST_GMO_SITE_PASS=*****</code></pre><h3>Debug</h3><p>DEBUG環境変数をセットすることでリクエストのIN,OUTをデバッグできます。</p>
124<pre class="prettyprint source lang-shell"><code>set DEBUG=gmo-service:*</code></pre><h3>クレジットカード決済(即時売上)の例</h3><pre class="prettyprint source lang-js"><code>const GMO = require('@motionpicture/gmo-service');
125
126const orderId ='orderId';
127GMO.services.credit.entryTran({
128 shopId: 'your shopId',
129 shopPass: 'sour shopPass',
130 orderId: orderId,
131 jobCd: GMO.utils.util.JobCd.Auth,
132 amount: 1234
133}).then((entryTranResult) => {
134 GMO.services.credit.execTran({
135 accessId: entryTranResult.accessId,
136 accessPass: entryTranResult.accessPass,
137 orderId: orderId,
138 method: GMO.utils.util.Method.Lump,
139 cardNo: '1234123412341234',
140 expire: '2024',
141 securityCode: '123'
142 }).then((execTranResult) => {
143 console.log(execTranResult);
144
145 GMO.services.credit.alterTran({
146 shopId: 'your shopId',
147 shopPass: 'sour shopPass',
148 accessId: entryTranResult.accessId,
149 accessPass: entryTranResult.accessPass,
150 jobCd: GMO.utils.util.JobCd.Sales,
151 amount: amount
152 }).then((result) => {
153 console.log(result);
154 });
155 });
156});</code></pre><h2>Code Samples</h2><p>コードサンプルは <a href="https://github.com/motionpicture/gmo-service/tree/master/example">example</a> にあります。</p>
157<h2>Jsdoc</h2><p><code>npm run doc</code>でjsdocを作成できます。./docに出力されます。</p>
158<h2>License</h2><p>ISC</p></article>
159 </section>
160
161
162
163
164
165
166
167 </div>
168 </div>
169
170 <div class="clearfix"></div>
171
172
173 <div class="col-md-3">
174 <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
175 </div>
176
177
178</div>
179</div>
180
181
182 <div class="modal fade" id="searchResults">
183 <div class="modal-dialog">
184 <div class="modal-content">
185 <div class="modal-header">
186 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
187 <h4 class="modal-title">Search results</h4>
188 </div>
189 <div class="modal-body"></div>
190 <div class="modal-footer">
191 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
192 </div>
193 </div><!-- /.modal-content -->
194 </div><!-- /.modal-dialog -->
195 </div>
196
197
198<footer>
199
200
201<span class="jsdoc-message">
202 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
203
204 on Sat Oct 28th 2017
205
206 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
207</span>
208</footer>
209
210<script src="scripts/docstrap.lib.js"></script>
211<script src="scripts/toc.js"></script>
212
213 <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
214
215
216<script>
217$( function () {
218 $( "[id*='$']" ).each( function () {
219 var $this = $( this );
220
221 $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
222 } );
223
224 $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
225 var $this = $( this );
226
227 var example = $this.find( "code" );
228 exampleText = example.html();
229 var lang = /{@lang (.*?)}/.exec( exampleText );
230 if ( lang && lang[1] ) {
231 exampleText = exampleText.replace( lang[0], "" );
232 example.html( exampleText );
233 lang = lang[1];
234 } else {
235 var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
236 lang = langClassMatch ? langClassMatch[1] : "javascript";
237 }
238
239 if ( lang ) {
240
241 $this
242 .addClass( "sunlight-highlight-" + lang )
243 .addClass( "linenums" )
244 .html( example.html() );
245
246 }
247 } );
248
249 Sunlight.highlightAll( {
250 lineNumbers : true,
251 showMenu : true,
252 enableDoclinks : true
253 } );
254
255 $.catchAnchorLinks( {
256 navbarOffset: 10
257 } );
258 $( "#toc" ).toc( {
259 anchorName : function ( i, heading, prefix ) {
260 return $( heading ).attr( "id" ) || ( prefix + i );
261 },
262 selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
263 showAndHide : false,
264 smoothScrolling: true
265 } );
266
267 $( "#main span[id^='toc']" ).addClass( "toc-shim" );
268 $( '.dropdown-toggle' ).dropdown();
269
270 $( "table" ).each( function () {
271 var $this = $( this );
272 $this.addClass('table');
273 } );
274
275} );
276</script>
277
278
279
280<!--Navigation and Symbol Display-->
281
282
283<!--Google Analytics-->
284
285
286
287 <script type="text/javascript">
288 $(document).ready(function() {
289 SearcherDisplay.init();
290 });
291 </script>
292
293
294</body>
295</html>
\No newline at end of file