Skip to content
This repository was archived by the owner on Oct 1, 2019. It is now read-only.

Commit 87704e2

Browse files
committedNov 25, 2014
split schemas
1 parent 0312c47 commit 87704e2

File tree

3 files changed

+22
-21
lines changed

3 files changed

+22
-21
lines changed
 

‎lib/NMIGateway.js

+1-20
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,7 @@ var mapKeys = require('42-cent-util').mapKeys;
77
var qs = require('query-string');
88
var GatewayError = require('42-cent-base').GatewayError;
99

10-
var schema = {
11-
amount: 'amount',
12-
creditCardNumber: 'ccnumber',
13-
cvv: 'cvv',
14-
customerFirstName: 'firstname',
15-
customerLastName: 'lastname',
16-
customerEmail: 'email',
17-
billingAddress: 'address1',
18-
billingCity: 'city',
19-
billingState: 'state',
20-
billingZip: 'zip',
21-
billingCountry: 'country',
22-
shippingFirstName: 'shipping_firstname',
23-
shippingLastName: 'shipping_lastname',
24-
shippingAddress: 'shipping_address1',
25-
shippingCity: 'shipping_city',
26-
shippingState: 'shipping_state',
27-
shippingZip: 'shipping_zip',
28-
shippingCountry: 'shipping_country'
29-
};
10+
var schema = require('./schemas.js');
3011

3112
function NMIGateway(config) {
3213

‎lib/schemas.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module.exports = {
2+
amount: 'amount',
3+
creditCardNumber: 'ccnumber',
4+
cvv: 'cvv',
5+
customerFirstName: 'firstname',
6+
customerLastName: 'lastname',
7+
customerEmail: 'email',
8+
billingAddress: 'address1',
9+
billingCity: 'city',
10+
billingState: 'state',
11+
billingZip: 'zip',
12+
billingCountry: 'country',
13+
shippingFirstName: 'shipping_firstname',
14+
shippingLastName: 'shipping_lastname',
15+
shippingAddress: 'shipping_address1',
16+
shippingCity: 'shipping_city',
17+
shippingState: 'shipping_state',
18+
shippingZip: 'shipping_zip',
19+
shippingCountry: 'shipping_country'
20+
};

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "42-cent-nmi",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"description": "42-cent adaptor for nmi payment gateway",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)