|
@@ -41,6 +41,9 @@ public class NotifyCallback implements MQTTCallbackHandler {
|
|
|
}
|
|
|
String orderNo = dataObj.getString("order_no");
|
|
|
ExamRegistrationPayment order = notifyCallback.examRegistrationPaymentService.getByOrderNo(orderNo);
|
|
|
+ if (order == null || !order.getTransStatus().equals("ING")) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
order.setPayChannel(dataObj.getString("pay_channel"));
|
|
|
order.setTransStatus("SUCCESS");
|
|
|
order.setUpdateTime(new Date());
|
|
@@ -63,6 +66,9 @@ public class NotifyCallback implements MQTTCallbackHandler {
|
|
|
}
|
|
|
String orderNo = dataObj.getString("order_no");
|
|
|
ExamRegistrationPayment order = notifyCallback.examRegistrationPaymentService.getByOrderNo(orderNo);
|
|
|
+ if (order == null || !order.getTransStatus().equals("ING")) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
order.setPayChannel(dataObj.getString("pay_channel"));
|
|
|
order.setTransStatus("FAILED");
|
|
|
order.setUpdateTime(new Date());
|
|
@@ -85,6 +91,9 @@ public class NotifyCallback implements MQTTCallbackHandler {
|
|
|
}
|
|
|
String orderNo = dataObj.getString("order_no");
|
|
|
ExamRegistrationPayment order = notifyCallback.examRegistrationPaymentService.getByOrderNo(orderNo);
|
|
|
+ if (order == null || !order.getTransStatus().equals("ING")) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
order.setPayChannel(dataObj.getString("pay_channel"));
|
|
|
order.setTransStatus("FAILED");
|
|
|
order.setUpdateTime(new Date());
|