변경 파일 목록
총 7개
변경 파일 코드
추가삭제
변경 전order_view.php
| <?php if ($data['mallSno'] > DEFAULT_MALL_NUMBER) { ?> | |
| <span class="notice-danger" style="font-size:12px;">멀티상점 주문의 경우 PG부분 결제취소가 불가하므로 전체 반품/환불처리만 가능합니다.</span> | |
| <?php } ?> | |
| <?php if(($data['settleKind'] == 'oa' || $data['settleKind'] == 'ou') && empty($data['pgResultCode'])) {?> | |
| <div class="notice-info">올페이 결제 결과를 받지 못한 주문은 1회에 한하여 주문상태 수동 동기화가 가능합니다. <a class="btn-link hand js-allPay-inquiry" href="javascript:;">[주문상태 수동 동기화]</a></div> | |
| <?php } ?> | |
| <?php if($data['orderChannelFl'] == 'naverpay') {?> | |
| <?php if($data['statusMode'] == 'o') {?> | |
| //$("textarea[name='consult[consultMemo]']").val(''); | |
| }); | |
| $('.js-allPay-inquiry').click(function () { | |
| post_with_reload('../order/order_ps.php', { | |
| mode: 'allPayInquiry', | |
| orderNo: '<?=$data['orderNo']?>', | |
| }); | |
| }); | |
변경 후order_view.php
| <?php if ($data['mallSno'] > DEFAULT_MALL_NUMBER) { ?> | |
| <span class="notice-danger" style="font-size:12px;">멀티상점 주문의 경우 PG부분 결제취소가 불가하므로 전체 반품/환불처리만 가능합니다.</span> | |
| <?php } ?> | |
| <?php if(in_array($data['settleKind'], ['oa', 'ot', 'ou'], true) && empty($data['pgResultCode'])) {?> | |
| <div class="notice-info">선레이트 결제 결과를 받지 못한 주문은 1회에 한하여 주문상태 수동 동기화가 가능합니다. <a class="btn-link hand js-sunrate-inquiry" href="javascript:;">[주문상태 수동 동기화]</a></div> | |
| <?php } ?> | |
| <?php if($data['orderChannelFl'] == 'naverpay') {?> | |
| <?php if($data['statusMode'] == 'o') {?> | |
| //$("textarea[name='consult[consultMemo]']").val(''); | |
| }); | |
| $('.js-sunrate-inquiry').click(function () { | |
| post_with_reload('../order/order_ps.php', { | |
| mode: 'sunrateInquiry', | |
| orderNo: '<?=$data['orderNo']?>', | |
| }); | |
| }); | |
변경 전PageAccess.php
| 'guest' => 'x', | |
| 'intro' => 'x', | |
| ], | |
| 'allpay/pg_return.php' => [ | |
| 'member' => 'x', | |
| 'guest' => 'x', | |
| 'intro' => 'x', | |
변경 후PageAccess.php
| 'guest' => 'x', | |
| 'intro' => 'x', | |
| ], | |
| 'sunrate/pg_return.php' => [ | |
| 'member' => 'x', | |
| 'guest' => 'x', | |
| 'intro' => 'x', | |
| ], | |
| 'sunrate/pg_refund_return.php' => [ | |
| 'member' => 'x', | |
| 'guest' => 'x', | |
| 'intro' => 'x', | |
변경 전OrderSalesStatistics.php
| 'eb' => '에스크로<br/>(계좌이체)', | |
| 'ev' => '에스크로<br/>(가상계좌)', | |
| 'oa' => 'ALIPAY', | |
| 'ot' => 'TENPAY', | |
| 'ou' => 'UNIONPAY', | |
| 'mp' => 'PAYPAL', | |
| 'mc' => 'VISA / MASTER / JCB / AMEX', | |
변경 후OrderSalesStatistics.php
| 'eb' => '에스크로<br/>(계좌이체)', | |
| 'ev' => '에스크로<br/>(가상계좌)', | |
| 'oa' => 'ALIPAY', | |
| 'ot' => 'WECHAT PAY', | |
| 'ou' => 'UNIONPAY', | |
| 'mp' => 'PAYPAL', | |
| 'mc' => 'VISA / MASTER / JCB / AMEX', | |
변경 전ReOrderCalculation.php
| use Framework\Utility\NumberUtils; | |
| use Framework\Utility\StringUtils; | |
| use Globals; | |
| use Origin\Service\WebHook\OrderWebHookService; | |
| use Origin\Enum\Statistics\Analytics\Order\ClaimType; | |
| use Origin\Service\Statistics\Analytics\Order\ClaimCompleteAnalyticsCollectorService; | |
| if ($orderInfo['settleKind'] === 'gb' && ((int)$getData['info']['completePgPrice'] > 0 || $getData['info']['refundMethod'] === 'PG환불')) { | |
| throw new Exception(__('무통장입금 주문건은 PG환불 수단으로 환불을 진행할 수 없습니다.')); | |
| } | |
| // 환불할 주문상품을 가공하여 사용할 데이터 조합. | |
| $orderRefundInfo = $this->getRefundInfoData($getData['orderNo'], $orderInfo, $getData); | |
| if ($orderInfo['settleKind'] === 'gb' && ((int)$getData['info']['completePgPrice'] > 0 || $getData['info']['refundMethod'] === 'PG환불')) { | |
| throw new Exception(__('무통장입금 주문건은 PG환불 수단으로 환불을 진행할 수 없습니다.')); | |
| } | |
| // *** 1. 데이터 백업 | |
| $backupReturn = $this->setBackupOrderOriginalData($getData['orderNo'], 'r'); | |
| $this->db->set_update_db_query(DB_MEMBER, $updateSet, $where); | |
| } | |
| /** | |
| * completeRefundPrice | |
| * 환불 - 현금성 환불에 대한 처리 | |
변경 후ReOrderCalculation.php
| use Framework\Utility\NumberUtils; | |
| use Framework\Utility\StringUtils; | |
| use Globals; | |
| use Origin\Enum\Payment\Sunrate\SunrateCommonCode; | |
| use Origin\Service\WebHook\OrderWebHookService; | |
| use Origin\Enum\Statistics\Analytics\Order\ClaimType; | |
| use Origin\Service\Statistics\Analytics\Order\ClaimCompleteAnalyticsCollectorService; | |
| if ($orderInfo['settleKind'] === 'gb' && ((int)$getData['info']['completePgPrice'] > 0 || $getData['info']['refundMethod'] === 'PG환불')) { | |
| throw new Exception(__('무통장입금 주문건은 PG환불 수단으로 환불을 진행할 수 없습니다.')); | |
| } | |
| // 올페이 결제 주문은 선레이트로 PG 취소할 수 없다 (환불 처리 저장 전에 차단) | |
| if ($orderInfo['pgName'] === SunrateCommonCode::PREV_PG_NAME && ((int)$getData['info']['completePgPrice'] > 0 || $getData['info']['refundMethod'] === 'PG환불')) { | |
| throw new Exception(__(SunrateCommonCode::PREV_PG_REFUND_NOT_SUPPORTED_MESSAGE)); | |
| } | |
| // 선레이트는 전체 취소만 지원하므로 부분 PG환불은 환불 처리 저장 전에 차단 | |
| if ($this->isSunratePartPgRefund($orderInfo, $getData)) { | |
| throw new Exception(__(SunrateCommonCode::PART_CANCEL_NOT_SUPPORTED_MESSAGE)); | |
| } | |
| // 환불할 주문상품을 가공하여 사용할 데이터 조합. | |
| $orderRefundInfo = $this->getRefundInfoData($getData['orderNo'], $orderInfo, $getData); | |
| if ($orderInfo['settleKind'] === 'gb' && ((int)$getData['info']['completePgPrice'] > 0 || $getData['info']['refundMethod'] === 'PG환불')) { | |
| throw new Exception(__('무통장입금 주문건은 PG환불 수단으로 환불을 진행할 수 없습니다.')); | |
| } | |
| // 올페이 결제 주문은 선레이트로 PG 취소할 수 없다 (환불 처리 저장 전에 차단) | |
| if ($orderInfo['pgName'] === SunrateCommonCode::PREV_PG_NAME && ((int)$getData['info']['completePgPrice'] > 0 || $getData['info']['refundMethod'] === 'PG환불')) { | |
| throw new Exception(__(SunrateCommonCode::PREV_PG_REFUND_NOT_SUPPORTED_MESSAGE)); | |
| } | |
| // 선레이트는 전체 취소만 지원하므로 부분 PG환불은 환불 처리 저장 전에 차단 | |
| if ($this->isSunratePartPgRefund($orderInfo, $getData)) { | |
| throw new Exception(__(SunrateCommonCode::PART_CANCEL_NOT_SUPPORTED_MESSAGE)); | |
| } | |
| // *** 1. 데이터 백업 | |
| $backupReturn = $this->setBackupOrderOriginalData($getData['orderNo'], 'r'); | |
| $this->db->set_update_db_query(DB_MEMBER, $updateSet, $where); | |
| } | |
| /** | |
| * 선레이트 부분 PG환불 여부 (선레이트는 전체 취소만 지원) | |
| * | |
| * PG 취소 모듈(Cancel::sendPgCancel)과 같은 기준(결제 금액 = PG 환불 금액 + 해외배송 보험료)으로 판정한다. | |
| * @param array $orderInfo 주문 정보 (pgName, settlePrice) | |
| * @param array $getData 환불 요청 정보 (info.completePgPrice, info.refundDeliveryInsuranceFee) | |
| * @return bool | |
| */ | |
| protected function isSunratePartPgRefund(array $orderInfo, array $getData): bool | |
| { | |
| if ($orderInfo['pgName'] !== SunrateCommonCode::PG_NAME || (int) $getData['info']['completePgPrice'] <= 0) { | |
| return false; | |
| } | |
| $settlePrice = gd_money_format((float) $orderInfo['settlePrice'], false); | |
| $cancelPrice = gd_money_format((float) $getData['info']['completePgPrice'], false); | |
| $deliveryInsuranceFee = $getData['info']['refundDeliveryInsuranceFee'] ?? 0; | |
| return intval($settlePrice) !== intval($cancelPrice + floatval($deliveryInsuranceFee)); | |
| } | |
| /** | |
| * completeRefundPrice | |
| * 환불 - 현금성 환불에 대한 처리 | |
변경 전OrderPsController.php
| use Cookie; | |
| use Component\Order\OrderDelete; | |
| use Component\Godo\MyGodoSmsServerApi; | |
| /** | |
| * 주문 상세 처리 페이지 | |
| } | |
| exit(); | |
| break; | |
| // 올페이 주문상태 수동 동기화 | |
| case 'allPayInquiry': | |
| Request::get()->set('orderNo', Request::post()->get('orderNo')); | |
| Request::get()->set('f4Fl', true); | |
| $pgReturn = \App::load('\\Component\\Payment\\Allpay\\PgReturn'); | |
| $orderNo = $pgReturn->setPgResultRecheck(); | |
| $orderStatus = $order->getOrderData($orderNo); | |
| if (substr($orderStatus['orderStatus'], 0, 1) == 'f' && $orderStatus['orderStatus'] != 'f3') { | |
| $this->json(__('동기화에 실패하였습니다. 잠시 후 다시 시도하여 주세요. 해당 현상이 계속 되는 경우 고객센터에 문의 바랍니다.')); | |
변경 후OrderPsController.php
| use Cookie; | |
| use Component\Order\OrderDelete; | |
| use Component\Godo\MyGodoSmsServerApi; | |
| use Origin\Service\Payment\Sunrate\PgResultRecheckService; | |
| /** | |
| * 주문 상세 처리 페이지 | |
| } | |
| exit(); | |
| break; | |
| // 선레이트 주문상태 수동 동기화 | |
| case 'sunrateInquiry': | |
| Request::get()->set('orderNo', Request::post()->get('orderNo')); | |
| Request::get()->set('f4Fl', true); | |
| $pgResultRecheckService = \App::getInstance(PgResultRecheckService::class); | |
| $orderNo = $pgResultRecheckService->setPgResultRecheck(); | |
| $orderStatus = $order->getOrderData($orderNo); | |
| if (substr($orderStatus['orderStatus'], 0, 1) == 'f' && $orderStatus['orderStatus'] != 'f3') { | |
| $this->json(__('동기화에 실패하였습니다. 잠시 후 다시 시도하여 주세요. 해당 현상이 계속 되는 경우 고객센터에 문의 바랍니다.')); | |
변경 전SettlePgOverseasConfigController.php
| } | |
| // 2017-09-29 사이렉스페이 VISA, AMEX 메뉴 숨김처리 | |
| if (!gd_in_array($cKey, ['vmcard', 'jacard', 'tenpay', 'paypal'])) { | |
| $setDefaultPgDataOverseasList[$pgKey][$cKey] = $cVal; | |
| } | |
| } | |
변경 후SettlePgOverseasConfigController.php
| } | |
| // 2017-09-29 사이렉스페이 VISA, AMEX 메뉴 숨김처리 | |
| if (!gd_in_array($cKey, ['vmcard', 'jacard', 'wechatpay', 'paypal'])) { | |
| $setDefaultPgDataOverseasList[$pgKey][$cKey] = $cVal; | |
| } | |
| } | |
변경 전OrderHandleRepository.php
| ->map(fn ($model) => $model->toArray()) | |
| ->all(); | |
| } | |
| } | |
변경 후OrderHandleRepository.php
| ->map(fn ($model) => $model->toArray()) | |
| ->all(); | |
| } | |
| /** | |
| * 주문의 처리건 (환불 상태 전환 판단에 필요한 항목만, 환불 계좌 등은 조회하지 않는다) | |
| * | |
| * @param string $orderNo 주문 번호 | |
| * @return array 처리건 목록 | |
| */ | |
| public function findRefundHandlesByOrderNo(string $orderNo): array | |
| { | |
| return OrderHandle::query() | |
| ->select(['sno', 'handleMode', 'handleCompleteFl', 'refundGroupCd', 'refundPrice']) | |
| ->where('orderNo', $orderNo) | |
| ->get() | |
| ->toArray(); | |
| } | |
| } | |