PageSourceSearch

https://printrider.jp/wp-content/themes/insatu/js/settlement/zeus.js?ver=3.5-bp20260323

js printrider.jp collected 2026-10-07 23:02:46 UTC 4,875 bytes, 125 lines download raw bytes

1jQuery(function () {
2    try {
3        let times = 0;
4        const trgNode = document.getElementById("3dscontainer");
5        const config = { childList: true };
6        const callback = function (mutationList, observer) {
7            const node = jQuery("#3dscontainer");
8            for (const mutation of mutationList) {
9                if (mutation.type === "childList") {
10                    if (times) {
11                        // 2回目はモーダル表示(2個目のiframe)
12                        node.closest("div.modaal-outer-wrapper")
13                            .parent()
14                            .css("height", "100%");
15                        node.css("height", window.innerHeight - 200);
16                        in2cart_create_overlay("close");
17                        observer.disconnect();
18                    } else {
19                        // 1回目はモーダル起動(1個目のiframe)
20                        node.closest("div.modaal-outer-wrapper")
21                            .parent()
22                            .css("height", 0);
23                    }
24                    times++;
25                }
26            }
27        };
28        const observer = new MutationObserver(callback);
29        observer.observe(trgNode, config);
30    } catch(e) {}
31});
32//-----------------------------------------
33//ゼウス、クレジット決済オーソリ
34//-----------------------------------------
35function in2cart_zeus_before_submit(val) {
36    zeusToken.getToken(function (zeus_token_response_data) {
37        if (!zeus_token_response_data["result"]) {
38            alert(
39                zeusToken.getErrorMessage(
40                    zeus_token_response_data["error_code"]
41                )
42            ); // エラーの場合
43            in2cart_create_overlay("close");
44        } else if ("1" == zeus3ds) {
45            // 3Dセキュアの場合
46            doEnrol();
47        } else {
48            // フォーム送信(カード情報のかわりにトークンキーが送信されます)
49            formSubmit("form_main");
50        }
51    });
52}
53function doEnrol() {
54    const zeus_token_value = jQuery("input[name=zeus_token_value]").val();
55    const zeus_token_return_card_name = jQuery(
56        "input[name=zeus_token_return_card_name]"
57    ).val();
58    const zeus_card_option = jQuery(
59        "input[name=zeus_card_option]:checked"
60    ).val();
61    // AjaxでEnrolを実施する
62    jQuery
63        .ajax({
64            url: location.origin + enrolResultUrl,
65            type: "POST",
66            data: {
67                token_key: zeus_token_value,
68                card_holder_name: zeus_token_return_card_name,
69                card_option: zeus_card_option,
70            },
71            error: function () {
72                jQuery("input[name=mode]").val("3dsError");
73                formSubmit("form_main");
74                return false;
75            },
76            complete: function () {},
77        })
78        .done(function (ajaxRslt) {
79            // Enrolの結果を取得、エラーがなければpareqを実施する
80            const rslt = jQuery.parseJSON(ajaxRslt);
81            if ("success" != rslt["status"] || "000" != rslt["code"]) {
82                // エラーの場合ここで終了
83                alert(zeusToken.getErrorMessage(rslt["code"])); // エラーの場合
84                jQuery("input[name=mode]").val("3dsError");
85                formSubmit("form_main");
86                return false;
87            }
88            jQuery("#modal_3ds_box_trigger").modaal("open");
89
90            // 結果のXMLからxidとiframeUrlを取得し、pareqに設定する
91            const md = rslt["xid"];
92            const paReq = "PaReq";
93            const termUrl = location.origin + paresReturnUrl;
94            const threeDSMethod = "2";
95            const iframeUrl = rslt["iframeUrl"];
96            setPareqParams(md, paReq, termUrl, threeDSMethod, iframeUrl);
97        });
98}
99function paResSuccess(data) {
100    jQuery
101        .ajax({
102            url: location.origin + paresResultUrl,
103            type: "POST",
104            error: function () {
105                jQuery("input[name=mode]").val("3dsError");
106                formSubmit("form_main");
107                return false;
108            },
109            complete: function () {},
110        })
111        .done(function (ajaxRslt) {
112            // PaResの結果を取得・確認する
113            if ("PaResOK" != ajaxRslt) {
114                // エラーの場合モードをエラーに変更する
115                jQuery("input[name=mode]").val("3dsError");
116                alert(
117                    "認証に失敗しました。\n時間をおいて再度お試しいただくか、別のカードでお試しください。"
118                );
119            }
120            formSubmit("form_main");
121        });
122}
123function formSubmit(name) {
124    document.forms[name].submit();
125}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.