Skip to content

Commit

Permalink
⚡ : 포트원 에러처리 추가 (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
imenuuu committed Dec 21, 2023
1 parent b2a0716 commit e32e005
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.example.matchbatch.model.CalculateMonthLastDateDto;
import com.example.matchbatch.model.PaymentCntDto;
import com.example.matchcommon.annotation.RedissonLock;
import com.example.matchcommon.exception.BaseException;
import com.example.matchdomain.donation.adaptor.RegularPaymentAdaptor;
import com.example.matchdomain.donation.adaptor.RequestFailedHistoryAdapter;
import com.example.matchdomain.donation.entity.*;
Expand All @@ -26,6 +27,7 @@
import java.util.stream.Collectors;

import static com.example.matchcommon.constants.MatchStatic.*;
import static org.springframework.http.HttpStatus.*;

@Service
@RequiredArgsConstructor
Expand Down Expand Up @@ -111,7 +113,7 @@ public boolean processRegularPayment(RegularPayment payment, String accessToken,
String orderId = orderHelper.createRandomOrderId();

PortOneResponse<PortOneBillPayResponse> portOneResponse = attemptPayment(payment, accessToken, orderId);
if(portOneResponse.getCode()!=0){
if(portOneResponse.getCode()!=0 || portOneResponse.getResponse().getFail_reason()!=null){
handlePaymentFailure(payment, portOneResponse.getMessage(), type);
return true;
}
Expand Down

0 comments on commit e32e005

Please sign in to comment.