-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathotu-basic.js
45 lines (44 loc) · 1.1 KB
/
otu-basic.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
const fetch = require('node-fetch');
fetch('https://api.nexiopaysandbox.com/pay/v3/token', {
method: 'post',
body: JSON.stringify({
"data": {
"customer": {
"firstName": "Rocky",
"lastName": "Squirrel",
"phone": "5555551234",
"email": "[email protected]",
"billToAddressOne": "123 Test St",
"billToAddressTwo": "Suite 123",
"billToCity": "Testerville",
"billToState": "UT",
"billToPostal": "12345",
"billToCountry": "US",
"billToPhone": "8015551234",
"shipToAddressOne": "123 Ship St",
"shipToAddressTwo": "Warehouse 456",
"shipToCity": "Shipperville",
"shipToState": "OR",
"shipToPostal": "67890",
"shipToCountry": "US",
"shipToPhone": "5033335678"
}
},
"uiOptions": {
"displaySubmitButton": true,
"useLegacyIframe": false,
"hideCvc": false,
"requireCvc": true,
"hideBilling": false,
"forceExpirationSelection": true
}
}),
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic eW91clVzZXJOYW1lOnlvdXJQYXNzd29yZA=='
},
}).then((res) => {
return res.json()
}).then((json) => {
console.log(json)
});