Stripe 결제 상태 재확인
This commit is contained in:
@@ -5908,6 +5908,16 @@ public class BOOrdrService{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Stripe 주문 상태 조회
|
||||
* @param ordrVO
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
public DataMap selectOrdrSttus(BOOrdrVO ordrVO) {
|
||||
return mapper.selectOrdrDtl(ordrVO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > 주문완료 정보 조회
|
||||
* @param ordrVO
|
||||
|
||||
@@ -7,6 +7,8 @@ import com.stripe.model.checkout.Session;
|
||||
import com.stripe.param.checkout.SessionCreateParams;
|
||||
import com.wb.domainserver.domain.admin.store.sopmal.service.BOMaSopmalService;
|
||||
import com.wb.domainserver.domain.admin.store.sopmal.vo.BOMaSopmalVO;
|
||||
import com.wb.domainserver.domain.gcone.ordr.ordr.service.BOOrdrService;
|
||||
import com.wb.domainserver.domain.gcone.ordr.ordr.vo.BOOrdrVO;
|
||||
import com.wb.domainserver.domain.gcone.ordr.pay.service.BOPayService;
|
||||
import com.wb.domainserver.response.WnbtResponse;
|
||||
import com.wb.domainserver.response.WnbtResponseBody;
|
||||
@@ -40,6 +42,8 @@ public class StripeController {
|
||||
private BOMaSopmalService boMaSopmalService;
|
||||
@Autowired
|
||||
private BOPayService payService;
|
||||
@Autowired
|
||||
private BOOrdrService ordrService;
|
||||
|
||||
private Util utilClass;
|
||||
|
||||
@@ -168,10 +172,23 @@ public class StripeController {
|
||||
customerDetails = rawJson.getAsJsonObject("customer_details");
|
||||
}
|
||||
|
||||
BOOrdrVO ordrVO = new BOOrdrVO();
|
||||
ordrVO.setSopmalCd(sopmalCd);
|
||||
ordrVO.setOrdrInnb(session.getMetadata().get("ordrInnb"));
|
||||
DataMap ordrDtl = ordrService.selectOrdrSttus(ordrVO);
|
||||
if (ordrDtl != null && !"25".equals(ordrDtl.get("ordrSttusCd"))) {
|
||||
try {
|
||||
Thread.sleep(3000);
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
ordrDtl = ordrService.selectOrdrSttus(ordrVO);
|
||||
}
|
||||
|
||||
model.addAttribute("status", status);
|
||||
model.addAttribute("payment_status", paymentStatus);
|
||||
model.addAttribute("customer_details", customerDetails);
|
||||
if("complete".equals(status) && "paid".equals(paymentStatus)) {
|
||||
if("complete".equals(status) && "paid".equals(paymentStatus) && "25".equals(ordrDtl.get("ordrSttusCd"))) {
|
||||
model.addAttribute("returnUrl", "/sopmal/ordr/selectOrdrCompt");
|
||||
model.addAttribute("message", "Stripe 결제 정보 등록을 완료 하였습니다.");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user