fix : sep gateway
This commit is contained in:
@@ -47,7 +47,7 @@ class SepGateway implements IGateway {
|
|||||||
const purchaseData = {
|
const purchaseData = {
|
||||||
Action: "Token",
|
Action: "Token",
|
||||||
TerminalId: this.terminalNumber,
|
TerminalId: this.terminalNumber,
|
||||||
Amount: amount, // ریال
|
Amount: amount * 10,//ریال
|
||||||
RedirectUrl: `${this.callBackURL}${callBackPath}`,
|
RedirectUrl: `${this.callBackURL}${callBackPath}`,
|
||||||
ResNum: Date.now().toString(),
|
ResNum: Date.now().toString(),
|
||||||
CellNumber: _mobile,
|
CellNumber: _mobile,
|
||||||
@@ -71,14 +71,7 @@ class SepGateway implements IGateway {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkOutgoingIp() {
|
|
||||||
try {
|
|
||||||
const response = await axios.get("https://api.ipify.org?format=json");
|
|
||||||
return response.data.ip;
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Could not determine outgoing IP", error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async verifyPayment(data: { authority?: string; refNum?: string; amount: number }) {
|
async verifyPayment(data: { authority?: string; refNum?: string; amount: number }) {
|
||||||
if (!this.gatewayApiUrl || !this.terminalNumber) {
|
if (!this.gatewayApiUrl || !this.terminalNumber) {
|
||||||
|
|||||||
Reference in New Issue
Block a user