코스모스팜 나이스페이 간편결제 결제 하얀창 문제

1. 정확한 제품 또는 플러그인 이름

코스모스팜 우커머스 나이스페이 바로오픈 신용카드 & 간편결제⤴

2. 상세 내용

나이스페이 신용카드와 카카오 네이버 간편결제를 세팅해서 쓰고 있습니다

아이프레임에 버그가 있는거 같아서 팝업을 쓰고 있습니다 


다른 사이트 대비 간편결제 시 오류가 있는데
제 크롬에서도 결제 오류가 있습니다

고객이 말하길
결제완료가 떴는데 결제가 안 됐다고 하거나
 

결제 과정에서 
결제 요청하면 다음 화면으로 넘어가는데, 화면은 넘어갔는데 아무것도 뜨질 않는 버그가 있고
카드나 계좌 선택하는 창이 뜨질 않음

카드결제로 선택했음 하얀창만 떠 있었있었다고 합니다

제 경우에는 결제 시도중 에러가 발생했다고 얼럿이 뜨고 콘솔에는 해당 로그가 남아있습니

pay:1 Uncaught SyntaxError: Unexpected identifier 'Object'
    at NicePayStd.receiveMessageValue (nicepay-3.0.js:540:29)
pay:1 Uncaught SyntaxError: Unexpected identifier 'Object'
    at NicePayStd.receiveMessageValue (nicepay-3.0.js:540:29)
common.js?version=20181220&tVer=20230706:668 brName:chrome, brPlatform:win, brVersion:120.0.0.0
common.js?version=20181220&tVer=20230706:88 [Call POST Message] : {"code":"10","width":"789"}
ui.js?version=20231210&tVer=20231210:125 [Template:loadTemplate] is called....[url : /v3/webstd/template/agree.jsp?NpLang=ko&token=NICETOKNE3B5EE9A3D51B9DA7D7F56BC1412BD06]
pay:1 Uncaught SyntaxError: Unexpected identifier 'Object'
    at NicePayStd.receiveMessageValue (nicepay-3.0.js:540:29)
ui.js?version=20231210&tVer=20231210:125 [Template:loadTemplate] is called....[url : /v3/webstd/terms/terms_ko.html]



Uncaught SyntaxError: Unexpected identifier 'Object'
    at NicePayStd.receiveMessageValue (nicepay-3.0.js:540:29)
pay:1 Uncaught SyntaxError: Unexpected identifier 'Object'
    at NicePayStd.receiveMessageValue (nicepay-3.0.js:540:29)
common.js?version=20181220&tVer=20230706:668 brName:chrome, brPlatform:win, brVersion:120.0.0.0
common.js?version=20181220&tVer=20230706:88 [Call POST Message] : {"code":"10","width":"789"}
ui.js?version=20231210&tVer=20231210:125 [Template:loadTemplate] is called....[url : /v3/webstd/template/agree.jsp?NpLang=ko&token=NICETOKN5E1FD290016EFCFEE4D5D3336B883537]
ui.js?version=20231210&tVer=20231210:125 [Template:loadTemplate] is called....[url : /v3/webstd/terms/terms_ko.html]
pay:1 Uncaught SyntaxError: Unexpected identifier 'Object'
    at NicePayStd.receiveMessageValue (nicepay-3.0.js:540:29)

 

3. 확인 가능한 상세 페이지 주소

https://gptkoreaclass.com/

카카오로그인 이후, 몇몇 유저만 생기는 문제가 있습니다
 

4. 수정한 코드 내역 (있다면)

/* 로그인 유저를 리다이렉션 해주는 코드 */
add_action('wpmem_register_redirect', 'my_reg_redirect', 10, 1);
function my_reg_redirect($fields){
    wp_redirect('https://gptkoreaclass.com/courses/gpt-ai-standard/');
    exit;
}

/* first_name을 받아와서 디스플레이 네임으로 업데이트 하는 코드 */
add_action('profile_update', 'update_display_name_on_profile_update', 10, 2);
function update_display_name_on_profile_update($user_id, $old_user_data){
    // 사용자의 first_name을 받아옵니다.
    $first_name = get_user_meta($user_id, 'first_name', true);

    // first_name이 제공되었다면, 디스플레이 네임만 업데이트합니다.
    if($first_name){
        // 현재 작업을 확인하여 무한 루프 방지
        $current_action = current_filter();
        if ('profile_update' === $current_action) {
            // profile_update 액션 제거
            remove_action('profile_update', 'update_display_name_on_profile_update', 10);

            // 디스플레이 네임을 first_name으로 업데이트합니다.
            wp_update_user(array(
                'ID' => $user_id,
                'display_name' => $first_name
            ));

            // profile_update 액션 다시 추가
            add_action('profile_update', 'update_display_name_on_profile_update', 10, 2);
        }
    }
}


/* 보여지는값이 이름으로 보이게 */
add_filter('wpmem_member_links_args', 'my_wpmem_member_links_args', 999, 1);
function my_wpmem_member_links_args($args){
    $current_user = wp_get_current_user();
    
    $args['wrapper_before'] = '<div class="cosmosfarm-members-form">';
    
    $args['wrapper_before'] .= '<div class="profile-header"><form id="cosmosfarm_members_avatar_form" method="post" enctype="multipart/form-data">';
    $args['wrapper_before'] .= wp_nonce_field('cosmosfarm_members_avatar', 'cosmosfarm_members_avatar_nonce');
    $args['wrapper_before'] .= '';
    
    $args['wrapper_before'] .= '<div class="avatar-img"><label for="cosmosfarm_members_avatar_file" title="'.__('Change Avatar', 'cosmosfarm-members').'">'.get_avatar(get_current_user_id(), '150').'<p class="change-avatar-message">'.__('Change Avatar', 'cosmosfarm-members').'</p><input type="file" name="cosmosfarm_members_avatar_file" id="cosmosfarm_members_avatar_file" multiple="false" accept="image/*" onchange="cosmosfarm_members_avatar_form_submit(this)"></label></div>';
    $args['wrapper_before'] .= '<div class="display-name">'.$current_user->first_name.'</div>';
    
    $args['wrapper_before'] .= '</form></div>';
    
    $args['wrapper_before'] .= '<ul class="members-link">';
    
    return $args;
}

 

워드프레스 에러 기술지원 서비스 전문가에게 맡기세요
워드프레스 에러 기술지원 서비스 전문가에게 맡기세요
워드프레스 에러 기술지원 서비스 전문가에게 맡기세요