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