16 $serviceShowInfo =
true;
17 $serviceLoadMenu =
true;
18 $serviceShowMenu =
true;
19 $serviceLiveCheck =
true;
21 require_once(dirname(__FILE__) .
'/../library/hcuService.i');
24 require_once(dirname(__FILE__) .
'/../../shared/library/cutrusted.i');
30 if ( !HCU_array_key_exists(
"rdc_token", $_REQUEST ) ) {
31 $SPEEDBUMP_FEATURE =
"RDC";
32 require_once(dirname(__FILE__) .
'/../includes/hcuAccountSelector.i');
33 $accountToUse = $HB_ENV[
"selected_account"];
36 require_once(dirname(__FILE__) .
'../../../banking/library/rdcCommon.i');
42 PermCheckFeatureScreen($dbh, $HB_ENV, $MC, FEATURE_MOBILE_RDC);
47 $varOk = Array(
"rdcVendor"=>array(
"filter" => FILTER_SANITIZE_STRING),
48 "rdc_token"=>array(
"filter" => FILTER_SANITIZE_STRING),
49 "btnAgree"=>array(
"filter" => FILTER_SANITIZE_STRING),
50 "rdcEndorse"=>array(
"filter" => FILTER_SANITIZE_STRING)
52 HCU_ImportVars( $inputVars,
"", $varOk );
55 $rdcVendorKey = isset( $inputVars[
"rdcVendor"] ) ? $inputVars[
"rdcVendor"] :
"";
58 $rdcEndorse = isset( $inputVars[
"rdcEndorse"] ) ? $inputVars[
"rdcEndorse"] :
"";
61 $skipTermsCheck =
false;
65 if ( isset( $inputVars[
'rdc_token'] ) && strlen( $inputVars[
'rdc_token'] ) > 0 ) {
66 if ( strpos( $inputVars[
'rdc_token'],
"=" ) !==
false ||
67 strpos( $inputVars[
'rdc_token'],
"+" ) !==
false ) {
69 $decodedToken = $inputVars[
'rdc_token'];
70 $encodedToken = urlencode( $inputVars[
'rdc_token'] );
72 $encodedToken = $inputVars[
'rdc_token'];
73 $decodedToken = urldecode( $inputVars[
'rdc_token'] );
75 $commonString = hcu_decrypturl( $decodedToken, $HB_ENV[
'2factorkey']);
77 parse_str( $commonString, $commonParms );
79 if ( strlen( $commonParms[
"rdcVendor"] ) > 0 ) {
80 $rdcVendorKey = $commonParms[
"rdcVendor"];
83 $rdcDepositId = $commonParms[
"rdcToken"];
84 $rdcAccount = $commonParms[
"rdcAccount"];
87 $rdcEndorse = isset( $commonParms[
"rdcEndorse"] ) ? $commonParms[
"rdcEndorse"] :
"";
89 $skipTermsCheck =
true;
93 $rdcAccount = $accountToUse;
106 if ( !strlen( $rdcDepositId ) ) {
107 $rdcParams[
"RDCVENDOR"] = $rdcVendorKey;
108 $rdcParams[
"RDC_ACTION"] =
"AUTH";
109 $rdcParams[
"MBRACCT"]= $rdcAccount;
112 $rdcResultAry = HandleRDCRequest($HB_ENV, $rdcParams);
115 if ($rdcResultAry[
'STATUS'][
'CODE'] == 0 && strlen( $rdcResultAry[
"DEPOSITID"] ) > 0 ) {
117 $rdcDepositId = $rdcResultAry[
"DEPOSITID"];
118 }
else if ( $rdcResultAry[
'STATUS'][
'CODE'] ==
"4011" ) {
121 $serviceErrorMsg = html_entity_decode( $rdcResultAry[
'STATUS'][
'MESSAGE'] );
122 $serviceErrorCode =
'915';
124 require_once(dirname(__FILE__) .
'/../includes/hcuErrorPage.i');
130 if (isset($rdcResultAry[
'STATUS'][
'MESSAGE']) && (strlen($rdcResultAry[
'STATUS'][
'MESSAGE']) > 0) ) {
132 $noticeString = $MC->msg(
"Feature Not Set");
134 $noticeString .=
"<br />" . $rdcResultAry[
'STATUS'][
'MESSAGE'];
137 $noticesAry = Get_NoticeInfo($dbh, $HB_ENV, $MC,
"M",
"mblNoRDC",
true);
139 $hasNoticePopup =
false;
141 if ( $noticesAry[
"status"][
"code"] ==
"000" && $noticesAry[
"notice"][0][
"notice_id"] ) {
143 $noticeOption = $noticesAry[
'notice'][0];
145 $noticeOptions = Array (
146 'docsid' => $noticeOption[
'notice_id'],
147 'docstype' => $noticeOption[
'notice_type'],
150 'expireTime' => mktime() + 86400
153 $noticeString = $noticesAry[
"notice"][0][
"notice_text"];
156 $noticeString = $MC->combo_msg(
'Requested Feature Unavailable', 0,
'#msg#',
"");
161 $serviceErrorMsg = $noticeString;
162 $serviceErrorCode =
'915';
166 require_once(dirname(__FILE__) .
'/../includes/hcuErrorPage.i');
176 $commonURL =
"rdcDepositId=$rdcDepositId&rdcVendor=$rdcVendorKey&rdcAccount=$rdcAccount&rdcEndorse=" . urlencode($rdcEndorse);
177 $encryptedCommonURL = hcu_encrypturl( $commonURL, $HB_ENV[
'2factorkey'] );
178 $encodedCommonURL = urlencode( $encryptedCommonURL );
180 if (isset($inputVars[
'btnAgree']) && $inputVars[
'btnAgree'] !=
'') {
184 $rdcParams[
"RDCVENDOR"] = $rdcVendorKey;
185 $rdcParams[
"RDC_ACTION"] =
"ACCEPT";
186 $rdcParams[
"MBRACCT"] = $rdcAccount;
187 $rdcParams[
"DEPOSITID"] = $rdcDepositId;
188 $rdcResultAry = HandleRDCRequest($HB_ENV, $rdcParams);
191 if ($rdcResultAry[
'STATUS'][
'CODE'] !=
'000') {
193 $error_display =
"An error was encountered with accepting the terms.";
194 $serviceErrorMsg = $error_display;
195 $serviceErrorCode =
'915';
197 require_once(dirname(__FILE__) .
'/../includes/hcuErrorPage.i');
202 $doTermsCheck =
false;
207 if ( strlen( trim( $rdcResultAry[
"RDC_RESPONSE"][
"TERMS"] ) ) > 0 ) {
216 $noticesAry = Get_NoticeInfo($dbh, $HB_ENV, $MC,
"D",
"mblRDCInstructions",
true);
219 $hasRDCInstructions =
false;
220 if ( $noticesAry[
"status"][
"code"] ==
"000" && HCU_array_key_exists(
'0', $noticesAry[
'notice']) ) {
221 if ( $noticesAry[
"notice"][0][
"notice_id"] ) {
222 $noticeLinkDisplay = $noticesAry[
"notice"][0][
"notice_linkdisplay"];
224 $noticeOption = $noticesAry[
'notice'][0];
226 $noticeOptions = Array (
227 'docsid' => $noticeOption[
'notice_id'],
228 'docstype' => $noticeOption[
'notice_type'],
231 'expireTime' => mktime() + 86400
234 $encryptedDocDetails= HCU_PayloadEncode($HB_ENV[
'Cu'], $noticeOptions);
236 $noticeOptions[
'noticeOnly'] = 1;
238 $encryptedDocDetailsNoticeOnly= HCU_PayloadEncode($HB_ENV[
'Cu'], $noticeOptions);
242 $noticeURLEXT = $HB_ENV[
'homebankingpath'] .
'/hcuViewNotice.prg?cu=' . $HB_ENV[
'cu'] .
'&x=' . urlencode($encryptedDocDetails);
245 $noticeURLNoticeOnly = $HB_ENV[
'homebankingpath'] .
'/hcuViewNotice.prg?cu=' . $HB_ENV[
'cu'] .
'&x=' . urlencode($encryptedDocDetailsNoticeOnly);
247 $hasRDCInstructions =
true;
251 require_once(dirname(__FILE__) .
'/../includes/hcuPreContent.i');
255 <?php
if ( $showTerms ==
true) : ?>
256 <form
class=
'' id=
'formAcceptTerms' name=
'formAcceptTerms' method=
"post" action=
'<?php echo $actionPath ?>'>
257 <div
class=
'container-fluid'>
259 <div
class=
'k-content col-xs-12'>
260 <?php echo html_entity_decode($rdcResultAry[
'RDC_RESPONSE'][
'TERMS']) ?>
264 <div
class=
"hcu-template">
265 <div
class=
"hcu-edit-buttons k-state-default">
266 <a href=
"#" onclick=
"document.formAcceptTerms.submit();" id=
"btnAgree" class=
"k-button k-primary" name=
'btnAgree' value=
'Agree'>
267 <i
class=
"fa fa-check fa-lg"></i>Agree
274 <!-- <div
class=
'ui-block-b' style=
'text-align:right;'><input type=
'submit' name=
'btnAgree_old' value=
'Agree' data-
inline=
'false' data-transition=
"flow" data-theme=
"a"></div> -->
275 <input type=
'hidden' name=
'rdc_token' value=
'<?php echo $encodedCommonURL ?>'>
276 <input type=
'hidden' name=
'btnAgree' value=
'Agree'>
279 <div
class=
'container-fluid'>
281 <div
class=
'col-xs-12'>
282 <div
class=
"list-group" style=
"max-width:600px">
283 <a href=
"hcuMRDCDeposit.prg?rdc_token=<?php echo $encodedCommonURL ?>&<?php echo $HB_ENV['cuquery'] ?>" class=
"list-group-item">
284 <?php echo $MC->msg(
"New Deposit", HCU_DISPLAY_AS_HTML)?><span
class=
"icon-angle-right pull-right"><i
class=
"fa fa-chevron-right" aria-hidden=
"true"></i></span>
286 <span
class=
"icon-angle-right pull-right"></span>
287 <a href=
"hcuMRDCHistory.prg?rdc_token=<?php echo $encodedCommonURL ?>&<?php echo $HB_ENV['cuquery'] ?>" class=
"list-group-item">
288 <?php echo $MC->msg(
"History", HCU_DISPLAY_AS_HTML)?><span
class=
"icon-angle-right pull-right"><i
class=
"fa fa-chevron-right" aria-hidden=
"true"></i></span>
291 if ( $hasRDCInstructions ) : ?>
292 <a onClick=
"ShowNotice('<?php echo $noticeURLNoticeOnly; ?>', '<?php echo $noticeLinkDisplay ?>');" class=
"list-group-item">
293 <?php echo $MC->msg(
"Instructions", HCU_DISPLAY_AS_HTML)?><span
class=
"icon-angle-right pull-right"><i
class=
"fa fa-chevron-right" aria-hidden=
"true"></i></span>
301 $(document).ready(
function () {
314 require_once(dirname(__FILE__) .
'/../includes/hcuPostContent.i');