-
Notifications
You must be signed in to change notification settings - Fork 0
/
AlsatIPG.js
38 lines (32 loc) · 1.3 KB
/
AlsatIPG.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
const IPGDomain = require("./IPGDomain")
const URLConstant = require("./remote/util/URLConstant")
const signMostaghim = (Api, Amount, InvoiceNumber, RedirectAddress) => new Promise((resolve, reject) => {
IPGDomain.signMostaghim(
Api, Amount, InvoiceNumber, RedirectAddress
).then((data) => resolve(URLConstant.GO_ROUTE + "?Token=" + data.Token))
.catch((error) => reject(error))
})
const signVaset = (Api, Amount, RedirectAddress, Tashim, InvoiceNumber) => new Promise((resolve, reject) => {
IPGDomain.signVaset(
Api, Amount, Tashim, RedirectAddress, InvoiceNumber
).then((data) => resolve(URLConstant.GO_ROUTE + "?Token=" + data.Token))
.catch((error) => reject(error))
})
const validationMostaghim = (Api, tref, iN, iD, PayId) => new Promise((resolve, reject) => {
IPGDomain.validationMostaghim(
Api, tref, iD, iN
).then((data) => resolve({ ...data, PayId: PayId }))
.catch((error) => reject(error))
})
const validationVaset = (Api, tref, iN, iD, PayId) => new Promise((resolve, reject) => {
IPGDomain.validationVaset(
Api, tref, iD, iN
).then((data) => resolve({ ...data, PayId: PayId }))
.catch((error) => reject(error))
})
module.exports = {
signMostaghim,
signVaset,
validationMostaghim,
validationVaset
}