fix : sep gateway
This commit is contained in:
@@ -40,7 +40,7 @@ class SepGateway implements IGateway {
|
|||||||
if (!this.gatewayApiUrl || !this.terminalNumber) {
|
if (!this.gatewayApiUrl || !this.terminalNumber) {
|
||||||
throw new InternalError(["SEP gateway is not configured"]);
|
throw new InternalError(["SEP gateway is not configured"]);
|
||||||
}
|
}
|
||||||
await this.checkOutgoingIp();
|
|
||||||
const requesturl = `${this.gatewayApiUrl}/onlinepg/onlinepg`;
|
const requesturl = `${this.gatewayApiUrl}/onlinepg/onlinepg`;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -93,7 +93,7 @@ class SepGateway implements IGateway {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const sepResponse = response.data;
|
const sepResponse = response.data;
|
||||||
|
console.log('sepResponse verify response *', sepResponse)
|
||||||
// Normalize SEP response to match expected format
|
// Normalize SEP response to match expected format
|
||||||
// SEP considers ResultCode = 0 and Success = true as successful
|
// SEP considers ResultCode = 0 and Success = true as successful
|
||||||
const isSuccess = sepResponse.ResultCode === 0 && sepResponse.Success === true;
|
const isSuccess = sepResponse.ResultCode === 0 && sepResponse.Success === true;
|
||||||
|
|||||||
@@ -185,8 +185,6 @@ class PaymentService {
|
|||||||
|
|
||||||
// Handle unsuccessful payment status
|
// Handle unsuccessful payment status
|
||||||
if (status !== "OK") {
|
if (status !== "OK") {
|
||||||
// user can retry
|
|
||||||
// await this.handleFailedPayment(paymentData._id.toString(), order._id, orderItems, session);
|
|
||||||
return this.buildPaymentResponse(status, PaymentMessage.PaymentNotSuccessful, paymentData._id.toString(), order._id);
|
return this.buildPaymentResponse(status, PaymentMessage.PaymentNotSuccessful, paymentData._id.toString(), order._id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user