1function getParameter(name) { 2 for( let kvpair of location.search.substring(1).split('&')) { 3 if (kvpair.charAt('#') > 0) 4 kvpair = kvpair.substring(0,kvpair.charAt('#')); 5 var kv = kvpair.split('='); 6 if (kv[0] === name) 7 return kv.length == 1 ? "" : kv[1] ? kv[1].charAt('%') > 0 ? decodeURIComponent(kv[1]) : kv[1] : null; 8 } 9 return null; 10}; 11var transactionid = getParameter("tid"); 12var action = getParameter("act"); 13var inpURL = getParameter("rl"); 14var rURL = getParameter("nl"); 15var params = getParameter("param"); 16var buttonUrl = 'https://checkout.rakuten.co.jp/p/common/img/btn_check_01.gif?7eb475b6c65172e129f6717195643d00' ; 17if (!params) 18 params = encodeURIComponent(location.search); 19function getsiteid() { 20 var siteid = getParameter("SITEID"); 21 return siteid ? siteid : location.hostname; 22} 23function getCookie(name) { 24 var cookie =new RegExp('[^a-zA-Z]?' + name + '=([^;&]*)').exec(document.cookie); 25 return cookie && cookie[1] ? cookie[1] : null; 26}; 27var info; 28function getSiteInfo(func) { 29 var name = getsiteid(); 30 if (!name) return; 31 if (info) 32 func(info); 33 else 34 $.getJSON( "/SmartInterchange/rakutenpay/PerchaseInfo" + location.search, function(json) { 35 info = json; 36 func(json); 37 }); 38}; 39 40function loginform(target) { 41 getSiteInfo(function (info) { 42 $(target).html(formBuild( 43 "https://accounts.id.rakuten.co.jp/auth/oauth/authorize", 44 getButtonUrl("login", "r", "280"), 45 { 46 response_type : "code", 47 client_id : info.Clientid, 48 redirect_uri : "https://" + location.hostname + "/rakutenpay/verify", 49 scope : "openid", 50 state : encodeURIComponent( 51 "https://" + location.hostname + "/rakutenpay/auth/openid.html" + location.search), 52 nonce : info.nonce 53 } 54 )); 55 }); 56} 57 58function paymentForm(idname, target) { 59 getSiteInfo(function (info) { 60 $(idname).html( formBuild(target, 61 'https://checkout.rakuten.co.jp/p/common/img/btn_check_01.gif?7eb475b6c65172e129f6717195643d00', 62 { checkout: info.checkout, 63 sig: info.sig} )); 64 }); 65} 66 67function monthlyForm(idname) { 68 paymentForm(idname, 'https://my.checkout.rakuten.co.jp/myc/cdodl/1.1/stepin_1_1'); 69} 70 71function trialForm(idname) { 72 paymentForm(idname, ' https://my.checkout.rakuten.co.jp/myc/cdodl/flexpay/stepin_fp_1_0 '); 73} 74 75function onetimeForm(idname) { 76 paymentForm(idname, 'https://my.checkout.rakuten.co.jp/myc/cdodl/1.0/stepin'); 77} 78 79function getButtonUrl(type, color, size) { 80 const typename = { new : "02-new", login : "01-login", pay: "04-pay"}; 81 if (! ["new", "login", "pay"].includes(type)) type = "new"; 82 if (! [ "r", "w"].includes(color)) color = "r"; 83 if (! ["156", "174", "280", "312", "390", "410", "640"].includes(size)) size = "280"; 84 return "https://static.id.rakuten.co.jp/static/btn-japanese-2x/idconnect_" + typename[type] + "_" + color + "_" + size + ".png"; 85} 86 87function formBuild(actionUrl, buttonSrc, hparams) { 88var form = $("<form>", {method : "POST", action : actionUrl}); 89 form.append($("<input>", { type : "image", src : buttonSrc, border: 0})); 90 $.each(hparams, function(key,val) { 91 form.append($("<input>", { type : "hidden", name : key, value : val})) 92 }); 93 return form; 94} 95 96function sendAutoPayResign() { 97 window.location.href = "MonthlyVerify" + location.search; 98}; 99 100var trials; 101function getTrialInfo(func) { 102 var name = getsiteid(); 103 if (!name) return; 104 if (trials) 105 func(trials); 106 else 107 $.getJSON( "/rakutenpay/TrialStatus", {SITEID: name}, function(json) { 108 trials = json; 109 func(trials); 110 }); 111};
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.