Home: https://www.gmo-pg.com/en/
Contents:
import React, { Component, Fragment } from 'react'; | |
import { Link } from 'react-router-dom'; | |
import { Prompt } from 'react-router'; | |
import { Form, Icon } from 'antd'; | |
import { I18n } from 'react-i18next'; | |
import { Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap'; | |
import { | |
GetMedications, | |
CompleteReport, | |
ChangeReportStatus, |
import { useState, useEffect } from "react"; | |
import http from "./utils/http"; | |
//the function to call the push server: https://github.com/Spyna/push-notification-demo/blob/master/front-end-react/src/utils/http.js | |
import { | |
isPushNotificationSupported, | |
askUserPermission, | |
registerServiceWorker, | |
createNotificationSubscription, | |
getUserSubscription |
#Resource reference: https://docs.omniref.com/github/veracross/active_merchant/HEAD/symbols/ActiveMerchant::Billing::GmoGateway#line=46 | |
# The API does not return error messages, so I translated these from the | |
# example english-like messages in the GMO documentation | |
ERROR_CODES = { | |
'E01010001' => 'Shop ID not specified', | |
'E01010008' => 'Shop ID contains invalid characters or is too long', | |
'E01010010' => 'Shop ID is invalid', | |
'E01020001' => 'Shop Password not specified', | |
'E01020008' => 'Shop Password contains invalid characters or is too long', | |
'E01030002' => 'Shop ID and Password are invalid', |
案外知られていないGMOの設定方法をメモ。
まずは下記のURLから、アカウントを作成。 https://service.gmo-pg.com/cyllene/entry/trialStart.htm
アカウント登録が完了すると、下記のようなメールが飛んでくる。
export function randomString(size) { | |
if (size === 0) { | |
throw new Error('Zero-length randomString is useless.'); | |
} | |
let chars = ('ABCDEFGHIJKLMNOPQRSTUVWXYZ' + | |
'abcdefghijklmnopqrstuvwxyz' + | |
'0123456789'); | |
let objectId = ''; | |
let bytes = randomBytes(size); | |
for (let i = 0; i < bytes.length; ++i) { |
export const errorCodes = { | |
'E00000000': 'This is for communication confirmation, so no action is required. ', | |
'E00000001': 'An error corresponding to HTTP status code 405. HTTP method is not POST. ', | |
'E00000002': 'An error corresponding to HTTP status code 406. Accept related items of HTTP request header are not correct. ', | |
'E00000003': 'An error corresponding to HTTP status code 415. The Content-type item in the HTTP request header is incorrect. ', | |
'E00000010': 'HTTP content is empty or malformed. ', | |
'E01010001': 'Shop ID is not specified. ', | |
'E01010008': 'The shop ID contains non-alphanumeric characters or exceeds 13 characters. ', | |
'E01010010': 'Shop ID does not match. ', |
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \; |
import React, { Component } from 'react'; | |
import { BrowserRouter as Router, Route, Link } from "react-router-dom"; | |
import { Layout, Menu, Icon } from 'antd'; | |
import Dashboard from './containers/Dashboard/Dashboard'; | |
import Meseros from './containers/Meseros/Meseros'; | |
const { Header, Content, Footer, Sider } = Layout; | |
const SubMenu = Menu.SubMenu; |