14 define(
"MP_IPAY_ERROR_CODE",
"5011" );
16 function bpAuth( $parms) {
17 if ($parms[
'moc'] == 1) {
18 $parms[
'tokenurl'] = $parms[
'moctoken'];
19 $parms[
'password'] = $parms[
'mocpass'];
20 $parms[
'serviceurl'] = $parms[
'mocservice'];
23 $reply = ipayGetToken( $parms );
25 if ( $reply[
"status"][
"response"] ==
"false" ) {
26 if ( empty($reply[
"status"][
"message"]) ) {
27 $reply[
"status"][
"message"] =
'Get Token Failed';
31 $testToken = $reply[
"ipaydata"][
"token"];
33 if (!preg_match(
'/[^0-]/', $testToken)) {
35 $reply[
"status"][
"response"] =
"false";
36 $reply[
"status"][
"code"] =
"2075";
37 $reply[
"status"][
"message"] =
"Bill Pay Service not available";
40 $parms[
'Token'] = $testToken;
42 $response = ipaySubscriberValidation( $parms );
43 # normalize the name for scalability 44 if ( $response[
"status"][
"response"] ==
"false" ) {
45 if ( empty($response[
"status"][
"message"]) ) {
46 $response[
"status"][
"response"] =
"false";
47 $response[
"status"][
"code"] =
"999";
48 $response[
"status"][
"message"] =
"Subscriber Validation Failed. {$response['ipaydata'][0]['Response']}";
52 $response[
"status"][
"code"] =
"000";
54 $output[
"Token"] = $response[
'ipaydata'][0][
"Token"];
55 $output[
"DateModel"] = $parms[
"datemodel"];
56 $output[
"BillpayId"] = $parms[
"BillpayId"];
57 $output[
'MoblPayName']= (trim($parms[
'MoblPayName']) ==
'' ? htmlentities(
'Pay Bills') : htmlentities($parms[
'MoblPayName']));
58 $output[
'Extras'] = htmlentities($parms[
'ExtraOptions']);
59 $response[
'data']= $output;
70 function histSort( $a, $b ) {
71 $atime = strtotime($a[
'Date']);
72 $btime = strtotime($b[
'Date']);
73 if ($atime == $btime) {
74 return strcmp( $a[
"TxnId"], $b[
"TxnId"] );
76 return ($atime > $btime) ? -1 : 1;
79 function bpHist( $parms ) {
80 if ($parms[
'moc'] == 1) {
81 $parms[
'serviceurl'] = $parms[
'mocservice'];
84 $parms[
'Token'] = $parms[
"passwith"][
"Token"];
85 $response = ipayGetHistory( $parms );
87 if ( $response[
"status"][
"response"] ==
"false" ) {
88 if ( empty($response[
"status"][
"message"]) )
89 $response[
"status"][
"message"] =
'Get History Failed';
96 foreach( $response[
"ipaydata"] as $value ) {
97 $outputElem = array();
98 $outputElem[
"TxnId"] = $value[
"Id"];
99 $outputElem[
"Type"] = $value[
"Type"];
100 $outputElem[
"ToName"] = $value[
"ToName"];
101 $outputElem[
"Amount"] = number_format( $value[
"Amount"], 2 );
102 $outputElem[
"Date"] = date(
"m/d/Y", strtotime( $value[
"Date"] ) );
105 $estimatedArrival = strtotime( $value[
"EstimatedArrival"] );
107 $Additional = array(
"From" => $value[
"FromName"],
108 "Estimated_Arrival" => date(
"m/d/Y", $estimatedArrival ),
109 "Confirmation" => $value[
"Confirmation"],
110 "Rush" => $value[
"Rush"],
111 "Method" => $value[
"Method"] );
113 $outputElem[
"AdditionalInfo"] = $Additional;
115 $output[] = $outputElem;
118 usort( $output,
"histSort" );
121 $return[
"status"][
"code"] =
"000";
123 # normalize the name for scalability 124 $return[
'data'] = $output;
131 function schedSort( $a, $b ) {
132 $atime = strtotime($a[
'Date']);
133 $btime = strtotime($b[
'Date']);
134 if ($atime == $btime) {
135 return strcmp( $a[
"TxnId"], $b[
"TxnId"] );
137 return ($atime < $btime) ? -1 : 1;
140 function bpSched( $parms ) {
141 if ($parms[
'moc'] == 1) {
142 $parms[
'serviceurl'] = $parms[
'mocservice'];
145 $parms[
'Token'] = $parms[
"passwith"][
"Token"];
146 $response = ipayGetScheduled( $parms );
148 if ( $response[
"status"][
"response"] ==
"false" ) {
149 if ( empty($response[
"status"][
"message"]) ) {
150 $response[
"status"][
"message"] =
'Get Scheduled Failed';
156 foreach( $response[
"ipaydata"] as $key => $value ) {
157 $outputElem = array();
159 $outputElem[
"TxnId"] = $value[
"Id"];
160 $outputElem[
"Type"] = $value[
"Type"];
161 $outputElem[
"ToId"] = $value[
"To"];
162 $outputElem[
"ToName"] = $value[
"ToName"];
163 $outputElem[
"FromId"] = $value[
"From"];
164 $outputElem[
"Amount"] = number_format( $value[
"Amount"], 2 );
165 $outputElem[
"Date"] = date(
"m/d/Y", strtotime( $value[
"Date"] ) );
166 $outputElem[
"Confirmation"] = $value[
"Confirmation"];
168 $estimatedArrival = strtotime( $value[
"EstimatedArrival"] );
169 $Additional = array(
"From" => $value[
"FromName"],
170 "Estimated_Arrival" => date(
"m/d/Y", $estimatedArrival ),
171 "Rush" => $value[
"Rush"],
172 "Method" => $value[
"Method"] );
175 $outputElem[
"AdditionalInfo"] = $Additional;
176 $output[] = $outputElem;
179 usort( $output,
"schedSort" );
182 $return[
"status"][
"code"] =
"000";
184 # normalize the name for scalability 185 $return[
'data'] = $output;
191 function bpSourceAccts( $parms ) {
193 if ($parms[
'moc'] == 1) {
194 $parms[
'serviceurl'] = $parms[
'mocservice'];
197 $parms[
'Account'][
'types'] =
"PayFrom";
198 $parms[
'Token'] = $parms[
"passwith"][
"Token"];
199 $response=ipayGetAccountList( $parms );
201 if ($response[
"status"][
"response"]==
'false'){
202 if (empty($response[
"status"][
"message"]))
203 $response[
"status"][
"message"]=
'Get Accounts Failed';
207 foreach( $response[
"ipaydata"] as $key => $value ) {
208 $outputElem = array();
209 $outputElem[
"Name"] = $value[
"Name"];
210 $outputElem[
"FromId"] = $value[
"Id"];
211 $outputElem[
"CanRush"] = $value[
"CanRush"] ==
"true" ?
"1" :
"0";
214 if ( strlen( trim( $outputElem[
"Name"] ) ) == 0 ) {
215 $outputElem[
"Name"] = $value[
"Id"];
218 $output[] = $outputElem;
221 if ( !count( $output ) ) {
222 throw new Exception(
"No source accounts received from vendor.");
226 $response[
"status"][
"code"] =
"000";
228 # normalize the name for scalability 229 $response[
'data']= $output;
231 }
catch (Exception $e) {
232 $response[
"status"][
"response"] =
"false";
233 $response[
"status"][
"message"] = $e->getMessage();
234 $response[
"code"] = MP_IPAY_ERROR_CODE;
235 $response[
"data"] = array();
244 function bpDestAccts( $parms ) {
246 if ($parms[
'moc'] == 1) {
247 $parms[
'serviceurl'] = $parms[
'mocservice'];
250 $parms[
'Account'][
'types'] =
"Outbound";
251 $parms[
'Token'] = $parms[
"passwith"][
"Token"];
252 if ( $parms[
"passwith"][
"AcctType"] ==
"Payment" )
253 $response=ipayGetPayeeList( $parms );
255 $response=ipayGetAccountList( $parms );
257 if ($response[
"status"][
"response"]==
'false'){
258 if (empty($response[
"status"][
"message"]))
259 $response[
"status"][
"message"]=
'Get Payee List Failed';
263 foreach( $response[
"ipaydata"] as $key => $value ) {
264 $outputElem = array();
265 $outputElem[
"Name"] = $value[
"Name"];
266 $outputElem[
"Type"] = $value[
"Type"];
267 $outputElem[
"ToId"] = $value[
"Id"];
268 $outputElem[
"CanRush"] = $value[
"CanRush"] ==
"true" ?
"1" :
"0";
270 $output[] = $outputElem;
273 if ( !count( $output ) ) {
274 throw new Exception(
"No Payees Configured.");
278 $response[
"status"][
"code"] =
"000";
280 # normalize the name for scalability 281 $response[
'data']= $output;
284 }
catch (Exception $e) {
285 $response[
"status"][
"response"] =
"false";
286 $response[
"status"][
"message"] = $e->getMessage();
287 $response[
"code"] = MP_IPAY_ERROR_CODE;
288 $response[
"data"] = array();
294 function bpPmtAdd( $parms ) {
295 if ($parms[
'moc'] == 1) {
296 $parms[
'serviceurl'] = $parms[
'mocservice'];
299 $parms[
'Account'][
'types'] =
"PayFrom";
300 $parms[
'Token'] = $parms[
"passwith"][
"Token"];
302 $parms[
'Payment'][
'From'] = $parms[
"passwith"][
"FromId"];
303 $parms[
'Payment'][
'To'] = $parms[
"passwith"][
"ToId"];
304 $parms[
'Payment'][
'Amount'] = $parms[
"passwith"][
"Amount"];
305 $parms[
'Payment'][
'Rush'] = $parms[
"passwith"][
"Rush"];
306 $parms[
'Payment'][
'Date'] = $parms[
"passwith"][
"Date"];
307 $response=ipaySubmitPayment( $parms );
309 if ($response[
"status"][
"response"]==
'false'){
310 if (empty($response[
"status"][
"message"]))
311 $response[
"status"][
"message"]=
'Submit Payment Failed';
316 $outputElem = array();
317 $outputElem[
"Confirmation"] = $response[
"ipaydata"][0][
"Confirmation"];
318 $outputElem[
"EstimatedArrival"] = $response[
"ipaydata"][0][
"EstimatedArrival"];
321 $response[
"status"][
"code"] =
"000";
323 # normalize the name for scalability 324 $response[
'data'] = $outputElem;
330 function bpTrnAdd( $parms ) {
331 if ($parms[
'moc'] == 1) {
332 $parms[
'serviceurl'] = $parms[
'mocservice'];
335 $parms[
'Account'][
'types'] =
"PayFrom";
336 $parms[
'Token'] = $parms[
"passwith"][
"Token"];
338 $parms[
'Payment'][
'From'] = $parms[
"passwith"][
"FromId"];
339 $parms[
'Payment'][
'To'] = $parms[
"passwith"][
"ToId"];
340 $parms[
'Payment'][
'Amount'] = $parms[
"passwith"][
"Amount"];
341 $parms[
'Payment'][
'Date'] = $parms[
"passwith"][
"Date"];
343 $response=ipaySubmitTransfer( $parms );
345 if ($response[
"status"][
"response"]==
'false'){
346 if (empty($response[
"status"][
"message"]))
347 $response[
"status"][
"message"]=
'Submit Transfer Failed';
350 $outputElem = array();
351 $outputElem[
"Confirmation"] = $response[
"ipaydata"][0][
"Confirmation"];
352 $outputElem[
"EstimatedArrival"] = $response[
"ipaydata"][0][
"EstimatedArrival"];
355 $response[
"status"][
"code"] =
"000";
357 # normalize the name for scalability 358 $response[
'data']= $outputElem;
364 function bpPmtEdit( $parms ) {
365 if ($parms[
'moc'] == 1) {
366 $parms[
'serviceurl'] = $parms[
'mocservice'];
369 $parms[
'Account'][
'types'] =
"PayFrom";
370 $parms[
'Token'] = $parms[
"passwith"][
"Token"];
372 $parms[
'Payment'][
'Id'] = $parms[
"passwith"][
"TxnId"];
373 $parms[
'Payment'][
'From'] = $parms[
"passwith"][
"FromId"];
374 $parms[
'Payment'][
'Amount'] = $parms[
"passwith"][
"Amount"];
375 $parms[
'Payment'][
'Rush'] = $parms[
"passwith"][
"Rush"];
376 $parms[
'Payment'][
'Date'] = $parms[
"passwith"][
"Date"];
377 $response = ipayEditPayment( $parms );
379 if ($response[
"status"][
"response"]==
'false'){
380 if (empty($response[
"status"][
"message"]))
381 $response[
"status"][
"message"]=
'Edit Payment Failed';
384 $outputElem = array();
385 $outputElem[
"Confirmation"] = $response[
"ipaydata"][0][
"Confirmation"];
386 $outputElem[
"EstimatedArrival"] = $response[
"ipaydata"][0][
"EstimatedArrival"];
389 $response[
"status"][
"code"] =
"000";
391 # normalize the name for scalability 392 $response[
'data']= $outputElem;
398 function bpPmtStop($parms) {
399 if ($parms[
'moc'] == 1) {
400 $parms[
'serviceurl'] = $parms[
'mocservice'];
403 $parms[
'Token'] = $parms[
"passwith"][
"Token"];
404 $parms[
'Payment'][
'Id'] = $parms[
"passwith"][
"TxnId"];
406 $response = ipayStopPayment($parms);
408 if ($response[
"status"][
"response"] ==
'false') {
409 if (empty($response[
"status"][
"message"]))
410 $response[
"status"][
"message"] =
'Stop Payment Failed';
413 $response[
"status"][
"code"] =
"000";
415 # normalize the name for scalability 416 $response[
'data'][
"StopResult"] = $response[
'ipaydata'][0][
"Response"] ==
"S01" ?
"1" :
"0";
422 function bpGetPaymentDates( $parms ) {
423 if ($parms[
'moc'] == 1) {
424 $parms[
'serviceurl'] = $parms[
'mocservice'];
427 $payeeId = $parms[
"passwith"][
"PayeeId"];
429 $canRush = $parms[
"passwith"][
"CanRush"] ==
"1";
433 $parms[
'Token'] = $parms[
"passwith"][
"Token"];
434 $parms[
'Payee'][
'Id'] = $payeeId;
435 $parms[
'Payee'][
'Type'] =
"Transfer";
436 $parms[
'Payee'][
'RushOptions'] =
"Overnight SecondDay SecondDayEconomy";
437 $responseRush = ipayGetDeliveryOptions( $parms );
439 if ( $responseRush[
"status"][
"response"] ==
"false" ) {
440 if ( empty($responseRush[
"status"][
"message"]) ) {
441 $responseRush[
"status"][
"message"] =
'Get Delivery Options Failed';
445 return $responseRush;
448 $responseRush = array();
452 $parms[
'Token'] = $parms[
"passwith"][
"Token"];
453 $parms[
'Payee'][
'Id'] = $payeeId;
454 $parms[
'Payee'][
'Type'] =
"Payment";
457 if ( strtoupper( $parms[
"datemodel"] ) ==
"DUE" ) {
458 $responseDates = ipayGetDeliverByDates( $parms );
460 $responseDates = ipayGetProcessDates( $parms );
465 if ( $responseDates[
"status"][
"response"] ==
'false' ) {
466 if (empty( $responseDates[
"status"][
"message"] ) )
467 $responseDates[
"status"][
"message"] =
"Get " . (strtoupper( $parms[
"datemodel"] ) ==
"DUE" ?
"Deliver By" :
"Process") .
" Dates Failed";
469 $response = $responseDates;
474 $response[
"data"][
"RushOptions"] = $responseRush[
"ipaydata"][0];
476 foreach( $responseDates[
"ipaydata"] as $key => $value ) {
477 $outputElem = array();
478 $outputElem[
"Proc"] = date(
"Y-m-d", strtotime( $value[
"ProcessDate"] ) );
479 if ( strtoupper( $parms[
"datemodel"] ) ==
"DUE" ) {
480 $outputElem[
"Due"] = date(
"Y-m-d", strtotime( $value[
"DeliverByDate"] ) );
483 $output[] = $outputElem;
486 $response[
"status"][
"code"] =
"000";
488 # normalize the name for scalability 489 $response[
'data'][
"PaymentDates"] = $output;
497 function bpGetTerms( $parms ) {
498 if ($parms[
'moc'] == 1) {
499 $parms[
'serviceurl'] = $parms[
'mocservice'];
502 $parms[
'Token'] = $parms[
"passwith"][
"Token"];
503 $response = ipayGetDisclosures( $parms );
505 if ( $response[
"status"][
"response"] ==
"false" ) {
506 if ( empty($response[
"status"][
"message"]) ) {
507 $response[
"status"][
"message"] =
'Get Disclosures Failed';
512 $return[
"status"][
"code"] =
"000";
515 $return[
"data"][
"Terms"] = $response[
"ipaydata"][0][
"string"];
521 function bpGetRushOptions( $parms ) {
522 if ($parms[
'moc'] == 1) {
523 $parms[
'serviceurl'] = $parms[
'mocservice'];
526 $parms[
'Token'] = $parms[
"passwith"][
"Token"];
527 $parms[
'Payee'][
'Id'] = $parms[
"passwith"][
"PayeeId"];
528 $parms[
'Payee'][
'Type'] =
"Payment";
529 $parms[
'Payee'][
'RushOptions'] =
"Overnight,SecondDay,SecondDayEconomy";
530 $response = ipayGetDeliveryOptions( $parms );
532 if ( $response[
"status"][
"response"] ==
"false" ) {
533 if ( empty($response[
"status"][
"message"]) ) {
534 $response[
"status"][
"message"] =
'Get Delivery Options Failed';
539 $return[
"status"][
"code"] =
"000";
542 $return[
"data"][
"Rush"] = $response[
"ipaydata"][0];
548 function bpAcceptTerms( $parms ) {
549 if ($parms[
'moc'] == 1) {
550 $parms[
'serviceurl'] = $parms[
'mocservice'];
553 $parms[
'Token'] = $parms[
"passwith"][
"Token"];
554 $parms[
"User"][
"Accepted"] =
"1";
555 $response = ipayActivateUser( $parms );
556 if ( $response[
"status"][
"response"] ==
"false" ) {
557 if ( empty($response[
"status"][
"message"]) ) {
558 $response[
"status"][
"message"] =
'Activate User Failed';
563 $output[
"Status"] = isset( $response[
"ipaydata"][0][
"Accepted"] ) ?
"true" :
"false";
567 $return[
"status"][
"code"] =
"000";
569 $return[
"data"] = $output;
575 function bpGetFeatureList($parms) {
577 # Need to decide what the data looks like here -- string list of available features 578 # maybe something out of trusteddetail (which comes to this function in $parms) 579 # to allow customizing by cu 580 $extraOptions = htmlentities($parms[
'ExtraOptions']);
582 $return=array(
'status'=>array(
'response'=>
'true',
'message'=>
'success',
"code"=>
"000"),
583 'data'=>array(
"extras" => $extraOptions,
'featurelist'=>
""));
584 }
catch (Exception $e) {
585 $return=array(
'status'=>array(
'response'=>
'false',
'message'=>$e->getMessage()),
'code'=>MP_PSCU_ERROR_CODE,
'data'=>array());
590 function OpenIpay( $parms ) {
592 # uses: $parms['InstitutionId'] 595 # (retrieved and decoded from cuthird) 598 # SubscriberValidation 599 # return SubscriberValidation result as status, <User> data as ipaydata 602 if ( !isset($parms[
'InstitutionId']) || !isset($parms[
'password']) ||
603 !isset($parms[
'tokenurl']) ){
604 $token[
"status"][
"response"]=
'false';
605 $token[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
606 $token[
"status"][
"message"]=
'Missing Parameters (' . __LINE__ .
')';
611 $token = ipayGetToken( $parms );
614 if ($token[
"status"][
"response"] ==
'false') {
615 if (empty($token[
"status"][
"message"]))
616 $token[
"status"][
"message"] =
'Get Token Failed';
619 $parms[
'Token'] = $token[
"ipaydata"][
"token"];
620 $subscriber = ipaySubscriberValidation($parms);
621 $return = $subscriber;
626 function ipayGetToken( $parms ) {
629 if ( !isset($parms[
'InstitutionId']) || !isset($parms[
'password']) ||
630 !isset($parms[
'tokenurl']) ){
632 $token[
"status"][
"response"]=
'false';
633 $token[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
634 $token[
"status"][
"message"]=
'Missing Parameters (' . __LINE__ .
')';
638 $cuid = $parms[
'InstitutionId'];
639 $pwd = $parms[
'password'];
640 $ipayhost = $parms[
'tokenurl'];
642 $soapString =
'<?xml version="1.0"?>';
643 $soapString .=
"\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:AuthService=\"http://www.billpaysite.com/Mobile/\" xmlns:s1=\"http://microsoft.com/wsdl/types/\" xsl:version=\"1.0\">\n";
644 $soapString .=
"<soap:Body> 645 <AuthService:GetToken> 646 <AuthService:id>$cuid</AuthService:id> 647 <AuthService:password>$pwd</AuthService:password> 648 </AuthService:GetToken> 652 $cmd=
"/usr/bin/curl --silent --data-binary '$soapString' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: \"http://www.billpaysite.com/Mobile/GetToken\"' $ipayhost";
654 $response=getcurl($cmd);
655 if ($parms[
"logging"] ==
"enabled") {
656 $logParms = $parms[
"environment"];
657 $logParms[
"token"] =
'';
658 $logParms[
"txnId"] = time();
659 $logParms[
"logPoint"] =
"GetToken";
660 $logParms[
"request"] = $cmd;
661 $logParms[
"reply"] = $response;
662 LogSSOActivity($logParms);
665 preg_match(
'/<GetTokenResult>(.*)<\/GetTokenResult>/i',$response,$stat);
668 if (!preg_match(
'/[^0-]/',$token)) {
669 $return[
"status"][
"response"]=
"false";
670 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
671 $return[
"status"][
"message"]=
"Get Token Failed";
674 $return[
"status"][
"response"]=
'true';
675 $return[
"ipaydata"][
"token"]=$token;
681 function ipayActivateUser( $parms ) {
683 if ( !isset($parms[
'InstitutionId']) || !isset($parms[
'Token']) ||
684 !isset($parms[
'serviceurl']) || !isset($parms[
'BillpayId']) ||
685 !isset($parms[
'User'][
'Accepted']) ){
686 $return[
"status"][
"response"]=
'false';
687 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
688 $return[
"status"][
"message"]=
'Missing Parameters (' . __LINE__ .
')';
689 $return[
"ipaydata"] = array();
693 $ipayhost = $parms[
'serviceurl'];
695 #POST /Mobile/MobileService.asmx HTTP/1.1 696 #Host: services.billpaysite.com 697 #Content-Type: text/xml; charset=utf-8 698 #Content-Length: length 699 #SOAPAction: "http://mobile.billpaysite.com/ActivateUser" 702 $acceptDate = date(
"Y-m-d\TH:i:s" );
703 $soapString=
'<?xml version="1.0" encoding="utf-8"?>';
704 $soapString .=
"\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:MobileService=\"http://mobile.billpaysite.com/\" xmlns:s1=\"http://microsoft.com/wsdl/types/\" xsl:version=\"1.0\">";
705 $soapString .=
"\n<soap:Body> 706 <MobileService:ActivateUser> 707 <MobileService:user xsi:type=\"MobileService:User\"> 708 <MobileService:Product>Consumer</MobileService:Product> 709 <MobileService:Token>{$parms['Token']}</MobileService:Token> 710 <MobileService:InstitutionId>{$parms['InstitutionId']}</MobileService:InstitutionId> 711 <MobileService:Login>{$parms['BillpayId']}</MobileService:Login> 712 <MobileService:Accepted>{$acceptDate}</MobileService:Accepted> 713 </MobileService:user> 714 </MobileService:ActivateUser> 718 $cmd=
"/usr/bin/curl --silent --data-binary '$soapString' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: \"http://mobile.billpaysite.com/ActivateUser\"' $ipayhost";
720 $response=getcurl($cmd);
721 if ($parms[
"logging"] ==
"enabled") {
722 $logParms = $parms[
"environment"];
723 $logParms[
"token"] = $parms[
'Token'];
724 $logParms[
"txnId"] = time();
725 $logParms[
"logPoint"] =
"ActivateUser";
726 $logParms[
"request"] = $cmd;
727 $logParms[
"reply"] = $response;
728 LogSSOActivity($logParms);
731 if (empty($response)) {
732 $return[
"status"][
"response"]=
'false';
733 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
734 $return[
"status"][
"message"]=
"No Response (" . __LINE__ .
")";
735 $return[
"ipaydata"]=array();
737 # call parse function to format response array 738 $return=ipayGetXMLResponse($response,
'ActivateUserResult',
'user');
743 function ipaySubmitPayment( $parms ) {
744 # uses: $parms['InstitutionId'] 745 # $parms['Token']) || 746 # $parms['serviceurl'] 747 # $parms['BillpayId'] 748 # $parms['Payment']['From'] 749 # $parms['Payment']['To'] 750 # $parms['Payment']['Amount'] 751 # $parms['Payment']['Rush'] 752 # $parms['Payment']['Date'] 754 if ( !isset($parms[
'InstitutionId']) || !isset($parms[
'Token']) ||
755 !isset($parms[
'serviceurl']) || !isset($parms[
'BillpayId']) ||
756 !isset($parms[
'Payment'][
'From']) ||
757 !isset($parms[
'Payment'][
'To']) ||
758 !isset($parms[
'Payment'][
'Amount']) ||
759 !isset($parms[
'Payment'][
'Rush']) ||
760 !isset($parms[
'Payment'][
'Date']) ){
761 $return[
"status"][
"response"]=
'false';
762 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
763 $return[
"status"][
"message"]=
'Missing Parameters (' . __LINE__ .
')';
764 $return[
"ipaydata"]=array();
768 $ipayhost = $parms[
'serviceurl'];
769 #POST /Mobile/MobileService.asmx HTTP/1.1 770 #Host: services.billpaysite.com 771 #Content-Type: text/xml; charset=utf-8 772 #Content-Length: length 773 #SOAPAction: "http://mobile.billpaysite.com/SubmitPayment" 775 $soapString=
'<?xml version="1.0" encoding="utf-8"?>';
776 $soapString .=
"\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:MobileService=\"http://mobile.billpaysite.com/\" xmlns:s1=\"http://microsoft.com/wsdl/types/\" xsl:version=\"1.0\">";
777 $soapString .=
"<soap:Body> 778 <MobileService:SubmitPayment> 779 <MobileService:payment> 780 <MobileService:Product>Consumer</MobileService:Product> 781 <MobileService:Token>{$parms['Token']}</MobileService:Token> 782 <MobileService:InstitutionId>{$parms['InstitutionId']}</MobileService:InstitutionId> 783 <MobileService:Login>{$parms['BillpayId']}</MobileService:Login>\n";
785 foreach($parms[
'Payment'] as $key =>$value) {
786 if($key !=
'Token') {
787 $soapString .=
"<MobileService:{$key}>$value</MobileService:{$key}>\n";
791 $soapString .=
"</MobileService:payment> 792 </MobileService:SubmitPayment> 796 $cmd=
"/usr/bin/curl --silent --data-binary '$soapString' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: \"http://mobile.billpaysite.com/SubmitPayment\"' $ipayhost";
798 $response=getcurl($cmd);
799 if ($parms[
"logging"] ==
"enabled") {
800 $logParms = $parms[
"environment"];
801 $logParms[
"token"] = $parms[
'Token'];
802 $logParms[
"txnId"] = time();
803 $logParms[
"logPoint"] =
"SubmitPayment";
804 $logParms[
"request"] = $cmd;
805 $logParms[
"reply"] = $response;
806 LogSSOActivity($logParms);
809 if (empty($response)) {
810 $return[
"status"][
"response"]=
'false';
811 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
812 $return[
"status"][
"message"]=
"No Response (" . __LINE__ .
")";
813 $return[
"ipaydata"]=array();
815 # call parse function to format response array 816 $return=ipayGetXMLResponse($response,
'SubmitPaymentResult',
'payment');
821 function ipayEditPayment( $parms ) {
822 # uses: $parms['InstitutionId'] 824 # $parms['serviceurl'] 825 # $parms['BillpayId'] 826 # $parms['Payment']['Id'] 827 # $parms['Payment']['From'] 828 # $parms['Payment']['Amount'] 829 # $parms['Payment']['Rush'] 830 # $parms['Payment']['Date'] 831 if ( !isset($parms[
'InstitutionId']) || !isset($parms[
'Token']) ||
832 !isset($parms[
'serviceurl']) || !isset($parms[
'BillpayId']) ||
833 !isset($parms[
'Payment'][
'Id']) ||
834 !isset($parms[
'Payment'][
'From']) ||
835 !isset($parms[
'Payment'][
'Amount']) ||
836 !isset($parms[
'Payment'][
'Rush']) ||
837 !isset($parms[
'Payment'][
'Date']) ){
838 $return[
"status"][
"response"]=
'false';
839 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
840 $return[
"status"][
"message"]=
'Missing Parameters (' . __LINE__ .
')';
841 $return[
"ipaydata"]=array();
845 $ipayhost = $parms[
'serviceurl'];
846 #POST /Mobile/MobileService.asmx HTTP/1.1 847 #Host: services.billpaysite.com 848 #Content-Type: text/xml; charset=utf-8 849 #Content-Length: length 850 #SOAPAction: "http://mobile.billpaysite.com/EditPayment" 852 $soapString=
'<?xml version="1.0" encoding="utf-8"?>';
853 $soapString .=
"\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:MobileService=\"http://mobile.billpaysite.com/\" xmlns:s1=\"http://microsoft.com/wsdl/types/\" xsl:version=\"1.0\">\n";
854 $soapString .=
"<soap:Body> 855 <MobileService:EditPayment> 856 <MobileService:payment> 857 <MobileService:Product>Consumer</MobileService:Product> 858 <MobileService:Token>{$parms['Token']}</MobileService:Token> 859 <MobileService:InstitutionId>{$parms['InstitutionId']}</MobileService:InstitutionId> 860 <MobileService:Login>{$parms['BillpayId']}</MobileService:Login>";
862 foreach($parms[
'Payment'] as $key =>$value) {
863 if($key !=
'Token') {
864 $soapString .=
"<MobileService:{$key}>$value</MobileService:{$key}>\n";
868 $soapString .=
"</MobileService:payment> 869 </MobileService:EditPayment> 873 $cmd=
"/usr/bin/curl --silent --data-binary '$soapString' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: \"http://mobile.billpaysite.com/EditPayment\"' $ipayhost";
875 $response=getcurl($cmd);
876 if ($parms[
"logging"] ==
"enabled") {
877 $logParms = $parms[
"environment"];
878 $logParms[
"token"] = $parms[
'Token'];
879 $logParms[
"txnId"] = time();
880 $logParms[
"logPoint"] =
"EditPayment";
881 $logParms[
"request"] = $cmd;
882 $logParms[
"reply"] = $response;
883 LogSSOActivity($logParms);
886 if (empty($response)) {
887 $return[
"status"][
"response"]=
'false';
888 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
889 $return[
"status"][
"message"]=
"No Response (" . __LINE__ .
")";
890 $return[
"ipaydata"]=array();
892 # call parse function to format response array 893 $return=ipayGetXMLResponse($response,
'EditPaymentResult',
'payment');
898 function ipayGetAccountList( $parms ) {
900 # uses: $parms['InstitutionId'] 902 # $parms['serviceurl'] 903 # $parms['BillpayId']) 904 # $parms['Account']['types'] 906 if ( !isset($parms[
'InstitutionId']) || !isset($parms[
'Token']) ||
907 !isset($parms[
'serviceurl']) || !isset($parms[
'BillpayId']) ||
908 !isset($parms[
'Account'][
'types']) ){
909 $return[
"status"][
"response"]=
'false';
910 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
911 $return[
"status"][
"message"]=
'Missing Parameters (' . __LINE__ .
')';
912 $return[
"ipaydata"]=array();
916 $ipayhost = $parms[
'serviceurl'];
917 #POST /Mobile/MobileService.asmx HTTP/1.1 918 #Host: services.billpaysite.com 919 #Content-Type: text/xml; charset=utf-8 920 #Content-Length: length 921 #SOAPAction: "http://mobile.billpaysite.com/GetAccountList" 923 $soapString=
'<?xml version="1.0" encoding="utf-8"?>';
924 $soapString .=
"\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:MobileService=\"http://mobile.billpaysite.com/\" xmlns:s1=\"http://microsoft.com/wsdl/types/\" xsl:version=\"1.0\">";
925 $soapString .=
"<soap:Body> 926 <MobileService:GetAccountList> 927 <MobileService:user xsi:type=\"MobileService:User\"> 928 <MobileService:Product>Consumer</MobileService:Product> 929 <MobileService:Token>{$parms['Token']}</MobileService:Token> 930 <MobileService:InstitutionId>{$parms['InstitutionId']}</MobileService:InstitutionId> 931 <MobileService:Login>{$parms['BillpayId']}</MobileService:Login> 932 </MobileService:user> 933 <MobileService:types>{$parms['Account']['types']}</MobileService:types> 934 </MobileService:GetAccountList> 938 $cmd=
"/usr/bin/curl --silent --data-binary '$soapString' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: \"http://mobile.billpaysite.com/GetAccountList\"' $ipayhost";
940 $response=getcurl($cmd);
941 if ($parms[
"logging"] ==
"enabled") {
942 $logParms = $parms[
"environment"];
943 $logParms[
"token"] = $parms[
'Token'];
944 $logParms[
"txnId"] = time();
945 $logParms[
"logPoint"] =
"GetAccountList";
946 $logParms[
"request"] = $cmd;
947 $logParms[
"reply"] = $response;
948 LogSSOActivity($logParms);
951 if (empty($response)) {
952 $return[
"status"][
"response"]=
'false';
953 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
954 $return[
"status"][
"message"]=
"No Response (" . __LINE__ .
")";
955 $return[
"ipaydata"]=array();
957 # call parse function to format response array 958 $return=ipayGetXMLResponse($response,
'user/ipay:Response',
'Account');
964 function ValidDatesIpay( $parms ) {
966 # uses: $parms['InstitutionId'] 968 # $parms['serviceurl'] 969 # $parms['BillpayId'] 970 # $parms['datemodel'] {due, process (Default)} 971 # returns: array of ProcessDate and possibly DeliverByDates 973 # default datemodel is process 974 if ( !isset($parms[
'datemodel'])) {$parms[
'datemodel']=
'process';}
976 if ( !isset($parms[
'InstitutionId']) || !isset($parms[
'Token']) ||
977 !isset($parms[
'serviceurl']) || !isset($parms[
'BillpayId']) ||
978 (strtolower($parms[
'datemodel'])==
'due' && (
979 !isset($parms[
'Payee'][
'Id']) || !isset($parms[
'Payee'][
'Type'])))
981 $return[
"status"][
"response"]=
'false';
982 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
983 $return[
"status"][
"message"]=
'Missing Parameters (' . __LINE__ .
')';
984 $return[
"ipaydata"]=array();
987 if (strtolower($parms[
'datemodel']) ==
'due') {
988 $return=ipayGetDeliverByDates( $parms );
990 $return=ipayGetProcessDates( $parms );
997 function ipayGetProcessDates( $parms ) {
999 # uses: $parms['InstitutionId'] 1001 # $parms['serviceurl'] 1002 # $parms['BillpayId'] 1004 if ( !isset($parms[
'InstitutionId']) || !isset($parms[
'Token']) ||
1005 !isset($parms[
'serviceurl']) || !isset($parms[
'BillpayId']) ) {
1006 $return[
"status"][
"response"]=
'false';
1007 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1008 $return[
"status"][
"message"]=
'Missing Parameters (' . __LINE__ .
')';
1009 $return[
"ipaydata"]=array();
1013 $ipayhost = $parms[
'serviceurl'];
1014 #POST /Mobile/MobileService.asmx HTTP/1.1 1015 #Host: services.billpaysite.com 1016 #Content-Type: text/xml; charset=utf-8 1017 #Content-Length: length 1018 #SOAPAction: "http://mobile.billpaysite.com/GetProcessDates" 1020 $soapString=
'<?xml version="1.0" encoding="utf-8"?>';
1021 $soapString .=
"\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:MobileService=\"http://mobile.billpaysite.com/\" xmlns:s1=\"http://microsoft.com/wsdl/types/\" xsl:version=\"1.0\">";
1022 $soapString .=
"<soap:Body> 1023 <MobileService:GetProcessDates> 1024 <MobileService:user xsi:type=\"MobileService:User\"> 1025 <MobileService:Product>Consumer</MobileService:Product> 1026 <MobileService:Token>{$parms['Token']}</MobileService:Token> 1027 <MobileService:InstitutionId>{$parms['InstitutionId']}</MobileService:InstitutionId> 1028 <MobileService:Login>{$parms['BillpayId']}</MobileService:Login> 1029 </MobileService:user> 1030 </MobileService:GetProcessDates> 1032 </soap:Envelope>\n";
1034 $cmd=
"/usr/bin/curl --silent --data-binary '$soapString' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: \"http://mobile.billpaysite.com/GetProcessDates\"' $ipayhost";
1036 $response=getcurl($cmd);
1037 if ($parms[
"logging"] ==
"enabled") {
1038 $logParms = $parms[
"environment"];
1039 $logParms[
"token"] = $parms[
'Token'];
1040 $logParms[
"txnId"] = time();
1041 $logParms[
"logPoint"] =
"GetProcessDates";
1042 $logParms[
"request"] = $cmd;
1043 $logParms[
"reply"] = $response;
1044 LogSSOActivity($logParms);
1047 if (empty($response)) {
1048 $return[
"status"][
"response"]=
'false';
1049 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1050 $return[
"status"][
"message"]=
"No Response (" . __LINE__ .
")";
1051 $return[
"ipaydata"]=array();
1053 # call parse function to format response array 1054 $return=ipayGetXMLProcDates($response,
'user/ipay:Response',
'GetProcessDatesResult');
1059 function ipayGetDeliverByDates( $parms ) {
1060 # tested OK 11/05/12 1061 # uses: $parms['InstitutionId'] 1063 # $parms['serviceurl'] 1064 # $parms['BillpayId'] 1065 # $parms['Payee']['Id'] 1066 # $parms['Payee']['Type'] 1068 if ( !isset($parms[
'InstitutionId']) || !isset($parms[
'Token']) ||
1069 !isset($parms[
'serviceurl']) || !isset($parms[
'BillpayId']) ||
1070 !isset($parms[
'Payee'][
'Id']) || !isset($parms[
'Payee'][
'Type']) ){
1071 $return[
"status"][
"response"]=
'false';
1072 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1073 $return[
"status"][
"message"]=
'Missing Parameters (' . __LINE__ .
')';
1074 $return[
"ipaydata"]=array();
1078 $ipayhost = $parms[
'serviceurl'];
1079 #POST /Mobile/MobileService.asmx HTTP/1.1 1080 #Host: services.billpaysite.com 1081 #Content-Type: text/xml; charset=utf-8 1082 #Content-Length: length 1083 #SOAPAction: "http://mobile.billpaysite.com/GetDeliverByDates" 1085 $soapString=
'<?xml version="1.0" encoding="utf-8"?>';
1086 $soapString .=
"\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:MobileService=\"http://mobile.billpaysite.com/\" xmlns:s1=\"http://microsoft.com/wsdl/types/\" xsl:version=\"1.0\">";
1087 $soapString .=
"<soap:Body> 1088 <MobileService:GetDeliverByDates> 1089 <MobileService:user xsi:type=\"MobileService:User\"> 1090 <MobileService:Product>Consumer</MobileService:Product> 1091 <MobileService:Token>{$parms['Token']}</MobileService:Token> 1092 <MobileService:InstitutionId>{$parms['InstitutionId']}</MobileService:InstitutionId> 1093 <MobileService:Login>{$parms['BillpayId']}</MobileService:Login> 1094 </MobileService:user> 1095 <MobileService:payee>\n";
1097 foreach($parms[
'Payee'] as $key =>$value) {
1098 if($key !=
'Token') {
1099 $soapString .=
"<MobileService:{$key}>$value</MobileService:{$key}>\n";
1103 $soapString .=
"</MobileService:payee> 1104 </MobileService:GetDeliverByDates> 1106 </soap:Envelope>\n";
1108 $cmd=
"/usr/bin/curl --silent --data-binary '$soapString' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: \"http://mobile.billpaysite.com/GetDeliverByDates\"' $ipayhost";
1110 $response=getcurl($cmd);
1111 if ($parms[
"logging"] ==
"enabled") {
1112 $logParms = $parms[
"environment"];
1113 $logParms[
"token"] = $parms[
'Token'];
1114 $logParms[
"txnId"] = time();
1115 $logParms[
"logPoint"] =
"GetDeliverByDates";
1116 $logParms[
"request"] = $cmd;
1117 $logParms[
"reply"] = $response;
1118 LogSSOActivity($logParms);
1121 if (empty($response)) {
1122 $return[
"status"][
"response"]=
'false';
1123 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1124 $return[
"status"][
"message"]=
"No Response (" . __LINE__ .
")";
1125 $return[
"ipaydata"]=array();
1127 # call parse function to format response array 1128 $return=ipayGetXMLDueDates($response,
'user/ipay:Response',
'Date_x0020_Pairs');
1133 function ipayGetDeliveryOptions( $parms ) {
1134 # tested OK 11/06/12 1135 # weird though - returns Payee object but w/PaymentMethod 1136 # and RushOptions filled in (PaymentMethod is 'unknown' in PayeeList) 1137 # function documentation references 'DeliveryMethods', but 1138 # schema shows PaymentMethod, which is what function returns 1140 # uses: $parms['InstitutionId'] 1142 # $parms['serviceurl'] 1143 # $parms['BillpayId']) || 1144 # $parms['Payee']['Id'] 1146 if ( !isset($parms[
'InstitutionId']) || !isset($parms[
'Token']) ||
1147 !isset($parms[
'serviceurl']) || !isset($parms[
'BillpayId']) ||
1148 !isset($parms[
'Payee'][
'Id']) ){
1149 $return[
"status"][
"response"]=
'false';
1150 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1151 $return[
"status"][
"message"]=
'Missing Parameters (' . __LINE__ .
')';
1152 $return[
"ipaydata"]=array();
1156 $ipayhost = $parms[
'serviceurl'];
1157 #POST /Mobile/MobileService.asmx HTTP/1.1 1158 #Host: services.billpaysite.com 1159 #Content-Type: text/xml; charset=utf-8 1160 #Content-Length: length 1161 #SOAPAction: "http://mobile.billpaysite.com/GetDeliveryOptions" 1163 $soapString=
'<?xml version="1.0" encoding="utf-8"?>';
1164 $soapString .=
"\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:MobileService=\"http://mobile.billpaysite.com/\" xmlns:s1=\"http://microsoft.com/wsdl/types/\" xsl:version=\"1.0\">";
1165 $soapString .=
"<soap:Body> 1166 <MobileService:GetDeliveryOptions> 1167 <MobileService:payee> 1168 <MobileService:Product>Consumer</MobileService:Product> 1169 <MobileService:Token>{$parms['Token']}</MobileService:Token> 1170 <MobileService:InstitutionId>{$parms['InstitutionId']}</MobileService:InstitutionId> 1171 <MobileService:Login>{$parms['BillpayId']}</MobileService:Login>\n";
1172 foreach($parms[
'Payee'] as $key =>$value) {
1173 if($key !=
'Token') {
1174 $soapString .=
"<MobileService:{$key}>$value</MobileService:{$key}>\n";
1177 $soapString .=
"</MobileService:payee> 1178 </MobileService:GetDeliveryOptions> 1180 </soap:Envelope>\n";
1182 $cmd=
"/usr/bin/curl --silent --data-binary '$soapString' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: \"http://mobile.billpaysite.com/GetDeliveryOptions\"' $ipayhost";
1184 $response=getcurl($cmd);
1185 if ($parms[
"logging"] ==
"enabled") {
1186 $logParms = $parms[
"environment"];
1187 $logParms[
"token"] = $parms[
'Token'];
1188 $logParms[
"txnId"] = time();
1189 $logParms[
"logPoint"] =
"GetDeliveryOptions";
1190 $logParms[
"request"] = $cmd;
1191 $logParms[
"reply"] = $response;
1192 LogSSOActivity($logParms);
1195 if (empty($response)) {
1196 $return[
"status"][
"response"]=
'false';
1197 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1198 $return[
"status"][
"message"]=
"No Response (" . __LINE__ .
")";
1199 $return[
"ipaydata"]=array();
1201 # call parse function to format response array 1202 $return=ipayGetXMLResponse($response,
'GetDeliveryOptionsResult',
'payee');
1207 function ipayGetDisclosures( $parms ) {
1208 # tested OK 10/22/12 1209 # uses: $parms['InstitutionId'] 1211 # $parms['serviceurl'] 1212 # $parms['BillpayId'] 1214 if ( !isset($parms[
'InstitutionId']) || !isset($parms[
'Token']) ||
1215 !isset($parms[
'serviceurl']) || !isset($parms[
'BillpayId']) ){
1216 $return[
"status"][
"response"]=
'false';
1217 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1218 $return[
"status"][
"message"]=
'Missing Parameters (' . __LINE__ .
')';
1219 $return[
"ipaydata"]=array();
1223 $ipayhost = $parms[
'serviceurl'];
1224 #POST /Mobile/MobileService.asmx HTTP/1.1 1225 #Host: services.billpaysite.com 1226 #Content-Type: text/xml; charset=utf-8 1227 #Content-Length: length 1228 #SOAPAction: "http://mobile.billpaysite.com/GetDisclosures" 1230 $soapString=
'<?xml version="1.0" encoding="utf-8"?>';
1231 $soapString .=
"\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:MobileService=\"http://mobile.billpaysite.com/\" xmlns:s1=\"http://microsoft.com/wsdl/types/\" xsl:version=\"1.0\">";
1232 $soapString .=
"<soap:Body> 1233 <MobileService:GetDisclosures> 1234 <MobileService:user xsi:type=\"MobileService:User\"> 1235 <MobileService:Product>Consumer</MobileService:Product> 1236 <MobileService:Token>{$parms['Token']}</MobileService:Token> 1237 <MobileService:InstitutionId>{$parms['InstitutionId']}</MobileService:InstitutionId> 1238 <MobileService:Login>{$parms['BillpayId']}</MobileService:Login> 1239 </MobileService:user> 1240 </MobileService:GetDisclosures> 1242 </soap:Envelope>\n";
1244 $cmd=
"/usr/bin/curl --silent --data-binary '$soapString' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: \"http://mobile.billpaysite.com/GetDisclosures\"' $ipayhost";
1246 $response=getcurl($cmd);
1247 if ($parms[
"logging"] ==
"enabled") {
1248 $logParms = $parms[
"environment"];
1249 $logParms[
"token"] = $parms[
'Token'];
1250 $logParms[
"txnId"] = time();
1251 $logParms[
"logPoint"] =
"GetDisclosures";
1252 $logParms[
"request"] = $cmd;
1253 $logParms[
"reply"] = $response;
1254 LogSSOActivity($logParms);
1257 if (empty($response)) {
1258 $return[
"status"][
"response"]=
'false';
1259 $return[
"status"][
"message"]=
"No Response (" . __LINE__ .
")";
1260 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1261 $return[
"ipaydata"]=array();
1263 # call parse function to format response array 1264 $return=ipayGetXMLResponse($response,
'user/ipay:Response',
'GetDisclosuresResult');
1270 function ipayGetHistory( $parms ) {
1271 # tested OK 11/06/12 1272 # uses: $parms['InstitutionId'] 1274 # $parms['serviceurl'] 1275 # $parms['BillpayId'] 1277 if ( !isset($parms[
'InstitutionId']) || !isset($parms[
'Token']) ||
1278 !isset($parms[
'serviceurl']) || !isset($parms[
'BillpayId']) ) {
1279 $return[
"status"][
"response"]=
'false';
1280 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1281 $return[
"status"][
"message"]=
'Missing Parameters (' . __LINE__ .
')';
1282 $return[
"ipaydata"]=array();
1286 $ipayhost = $parms[
'serviceurl'];
1287 #POST /Mobile/MobileService.asmx HTTP/1.1 1288 #Host: services.billpaysite.com 1289 #Content-Type: text/xml; charset=utf-8 1290 #Content-Length: length 1291 #SOAPAction: "http://mobile.billpaysite.com/GetHistory" 1293 $soapString=
'<?xml version="1.0" encoding="utf-8"?>';
1294 $soapString .=
"\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:MobileService=\"http://mobile.billpaysite.com/\" xmlns:s1=\"http://microsoft.com/wsdl/types/\" xsl:version=\"1.0\">";
1295 $soapString .=
"<soap:Body> 1296 <MobileService:GetHistory> 1297 <MobileService:user xsi:type=\"MobileService:User\"> 1298 <MobileService:Product>Consumer</MobileService:Product> 1299 <MobileService:Token>{$parms['Token']}</MobileService:Token> 1300 <MobileService:InstitutionId>{$parms['InstitutionId']}</MobileService:InstitutionId> 1301 <MobileService:Login>{$parms['BillpayId']}</MobileService:Login> 1302 </MobileService:user> 1303 </MobileService:GetHistory> 1305 </soap:Envelope>\n";
1307 $cmd=
"/usr/bin/curl --silent --data-binary '$soapString' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: \"http://mobile.billpaysite.com/GetHistory\"' $ipayhost";
1309 $response=getcurl($cmd);
1310 if ($parms[
"logging"] ==
"enabled") {
1311 $logParms = $parms[
"environment"];
1312 $logParms[
"token"] = $parms[
'Token'];
1313 $logParms[
"txnId"] = time();
1314 $logParms[
"logPoint"] =
"GetHistory";
1315 $logParms[
"request"] = $cmd;
1316 $logParms[
"reply"] = $response;
1317 LogSSOActivity($logParms);
1320 if (empty($response)) {
1321 $return[
"status"][
"response"]=
'false';
1322 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1323 $return[
"status"][
"message"]=
"No Response (" . __LINE__ .
")";
1324 $return[
"ipaydata"]=array();
1326 # call parse function to format response array 1327 $return=ipayGetXMLResponse($response,
'user/ipay:Response',
'Payment');
1333 function ipaySubscriberValidation( $parms ) {
1335 # uses: $parms['InstitutionId'] 1337 # $parms['serviceurl'] 1338 # $parms['BillpayId']) 1340 if ( !isset($parms[
'InstitutionId']) || !isset($parms[
'Token']) ||
1341 !isset($parms[
'serviceurl']) || !isset($parms[
'BillpayId']) ){
1342 $return[
"status"][
"response"]=
'false';
1343 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1344 $return[
"status"][
"message"]=
'Missing Parameters (' . __LINE__ .
')';
1345 $return[
"ipaydata"]=array();
1348 $ipayhost = $parms[
'serviceurl'];
1349 #POST /Mobile/MobileService.asmx HTTP/1.1 1350 #Host: services.billpaysite.com 1351 #Content-Type: text/xml; charset=utf-8 1352 #Content-Length: length 1353 #SOAPAction: "http://mobile.billpaysite.com/SubscriberValidation" 1355 $soapString=
'<?xml version="1.0"?>';
1356 $soapString .=
"\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:MobileService=\"http://mobile.billpaysite.com/\" xmlns:s1=\"http://microsoft.com/wsdl/types/\" xsl:version=\"1.0\">";
1357 $soapString .=
"<soap:Body> 1358 <MobileService:SubscriberValidation> 1359 <MobileService:user xsi:type=\"MobileService:User\"> 1360 <MobileService:Product>Consumer</MobileService:Product> 1361 <MobileService:Token>{$parms['Token']}</MobileService:Token> 1362 <MobileService:InstitutionId>{$parms['InstitutionId']}</MobileService:InstitutionId> 1363 <MobileService:Login>{$parms['BillpayId']}</MobileService:Login> 1364 </MobileService:user> 1365 </MobileService:SubscriberValidation> 1367 </soap:Envelope>\n";
1369 $cmd=
"/usr/bin/curl --silent --data-binary '$soapString' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: \"http://mobile.billpaysite.com/SubscriberValidation\"' $ipayhost";
1371 $response=getcurl($cmd);
1372 if ($parms[
"logging"] ==
"enabled") {
1373 $logParms = $parms[
"environment"];
1374 $logParms[
"token"] = $parms[
'Token'];
1375 $logParms[
"txnId"] = time();
1376 $logParms[
"logPoint"] =
"SubscriberValidation";
1377 $logParms[
"request"] = $cmd;
1378 $logParms[
"reply"] = $response;
1379 LogSSOActivity($logParms);
1382 if (empty($response)) {
1383 $return[
"status"][
"response"]=
'false';
1384 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1385 $return[
"status"][
"message"]=
"No Response (" . __LINE__ .
")";
1386 $return[
"ipaydata"]=array();
1388 # call parse function to format response array 1389 $return=ipayGetXMLResponse($response,
'SubscriberValidationResult',
'user');
1396 function ipayGetLastPaid( $parms ) {
1397 # tested OK 11/06/12 1398 if ( !isset($parms[
'InstitutionId']) || !isset($parms[
'Token']) ||
1399 !isset($parms[
'serviceurl']) || !isset($parms[
'BillpayId']) ||
1400 !isset($parms[
'Payment'][
'To']) ) {
1401 $return[
"status"][
"response"]=
'false';
1402 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1403 $return[
"status"][
"message"]=
'Missing Parameters (' . __LINE__ .
')';
1404 $return[
"ipaydata"]=array();
1408 $ipayhost = $parms[
'serviceurl'];
1409 #POST /Mobile/MobileService.asmx HTTP/1.1 1410 #Host: services.billpaysite.com 1411 #Content-Type: text/xml; charset=utf-8 1412 #Content-Length: length 1413 #SOAPAction: "http://mobile.billpaysite.com/GetLastPaid" 1415 $soapString=
'<?xml version="1.0" encoding="utf-8"?>';
1416 $soapString .=
"\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:MobileService=\"http://mobile.billpaysite.com/\" xmlns:s1=\"http://microsoft.com/wsdl/types/\" xsl:version=\"1.0\">";
1417 $soapString .=
"<soap:Body> 1418 <MobileService:GetLastPaid> 1419 <MobileService:payment> 1420 <MobileService:Product>Consumer</MobileService:Product> 1421 <MobileService:Login>{$parms['BillpayId']}</MobileService:Login> 1422 <MobileService:Token>{$parms['Token']}</MobileService:Token>\n";
1424 foreach($parms[
'Payment'] as $key =>$value) {
1425 if($key !=
'Token') {
1426 $soapString .=
"<MobileService:{$key}>$value</MobileService:{$key}>\n";
1430 $soapString .=
"</MobileService:payment> 1431 </MobileService:GetLastPaid> 1433 </soap:Envelope>\n";
1435 $cmd=
"/usr/bin/curl --silent --data-binary '$soapString' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: \"http://mobile.billpaysite.com/GetLastPaid\"' $ipayhost";
1437 $response=getcurl($cmd);
1438 if ($parms[
"logging"] ==
"enabled") {
1439 $logParms = $parms[
"environment"];
1440 $logParms[
"token"] = $parms[
'Token'];
1441 $logParms[
"txnId"] = time();
1442 $logParms[
"logPoint"] =
"GetLastPaid";
1443 $logParms[
"request"] = $cmd;
1444 $logParms[
"reply"] = $response;
1445 LogSSOActivity($logParms);
1448 if (empty($response)) {
1449 $return[
"status"][
"response"]=
'false';
1450 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1451 $return[
"status"][
"message"]=
"No Response (" . __LINE__ .
")";
1452 $return[
"ipaydata"]=array();
1454 # call parse function to format response array 1455 $return=ipayGetXMLResponse($response,
'GetLastPaidResult',
'payment');
1460 function ipaySubmitTransfer( $parms ) {
1461 # uses: $parms['InstitutionId'] 1463 # $parms['serviceurl'] 1464 # $parms['BillpayId'] 1465 # $parms['Payment']['From'] 1466 # $parms['Payment']['To'] 1467 # $parms['Payment']['Amount'] 1468 # $parms['Payment']['Date'] 1470 if ( !isset($parms[
'InstitutionId']) || !isset($parms[
'Token']) ||
1471 !isset($parms[
'serviceurl']) || !isset($parms[
'BillpayId']) ||
1472 !isset($parms[
'Payment'][
'From']) ||
1473 !isset($parms[
'Payment'][
'To']) ||
1474 !isset($parms[
'Payment'][
'Amount']) ||
1475 !isset($parms[
'Payment'][
'Date']) ){
1476 $return[
"status"][
"response"]=
'false';
1477 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1478 $return[
"status"][
"message"]=
'Missing Parameters (' . __LINE__ .
')';
1479 $return[
"ipaydata"]=array();
1483 $ipayhost = $parms[
'serviceurl'];
1484 #POST /Mobile/MobileService.asmx HTTP/1.1 1485 #Host: services.billpaysite.com 1486 #Content-Type: text/xml; charset=utf-8 1487 #Content-Length: length 1488 #SOAPAction: "http://mobile.billpaysite.com/SubmitTransfer" 1490 $soapString=
'<?xml version="1.0" encoding="utf-8"?>';
1491 $soapString .=
"\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:MobileService=\"http://mobile.billpaysite.com/\" xmlns:s1=\"http://microsoft.com/wsdl/types/\" xsl:version=\"1.0\">";
1492 $soapString .=
"<soap:Body> 1493 <MobileService:SubmitTransfer> 1494 <MobileService:payment> 1495 <MobileService:Product>Consumer</MobileService:Product> 1496 <MobileService:Token>{$parms['Token']}</MobileService:Token> 1497 <MobileService:InstitutionId>{$parms['InstitutionId']}</MobileService:InstitutionId> 1498 <MobileService:Login>{$parms['BillpayId']}</MobileService:Login>\n";
1500 foreach($parms[
'Payment'] as $key =>$value) {
1501 if($key !=
'Token') {
1502 $soapString .=
"<MobileService:{$key}>$value</MobileService:{$key}>\n";
1506 $soapString .=
"</MobileService:payment> 1507 </MobileService:SubmitTransfer> 1509 </soap:Envelope>\n";
1511 $cmd=
"/usr/bin/curl --silent --data-binary '$soapString' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: \"http://mobile.billpaysite.com/SubmitTransfer\"' $ipayhost";
1513 $response=getcurl($cmd);
1514 if ($parms[
"logging"] ==
"enabled") {
1515 $logParms = $parms[
"environment"];
1516 $logParms[
"token"] = $parms[
'Token'];
1517 $logParms[
"txnId"] = time();
1518 $logParms[
"logPoint"] =
"SubmitTransfer";
1519 $logParms[
"request"] = $cmd;
1520 $logParms[
"reply"] = $response;
1521 LogSSOActivity($logParms);
1524 if (empty($response)) {
1525 $return[
"status"][
"response"]=
'false';
1526 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1527 $return[
"status"][
"message"]=
"No Response (" . __LINE__ .
")";
1528 $return[
"ipaydata"]=array();
1530 # call parse function to format response array 1531 $return=ipayGetXMLResponse($response,
'SubmitTransferResult',
'payment');
1536 function ipayGetPayeeList( $parms ) {
1537 # tested OK 10/22/12 1538 # uses: $parms['InstitutionId'] 1540 # $parms['serviceurl'] 1541 # $parms['BillpayId']) 1543 if ( !isset($parms[
'InstitutionId']) || !isset($parms[
'Token']) ||
1544 !isset($parms[
'serviceurl']) || !isset($parms[
'BillpayId']) ){
1545 $return[
"status"][
"response"]=
'false';
1546 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1547 $return[
"status"][
"message"]=
'Missing Parameters (' . __LINE__ .
')';
1548 $return[
"ipaydata"]=array();
1552 $ipayhost = $parms[
'serviceurl'];
1553 #POST /Mobile/MobileService.asmx HTTP/1.1 1554 #Host: services.billpaysite.com 1555 #Content-Type: text/xml; charset=utf-8 1556 #Content-Length: length 1557 #SOAPAction: "http://mobile.billpaysite.com/GetPayeeList" 1559 $soapString=
'<?xml version="1.0" encoding="utf-8"?>';
1560 $soapString .=
"\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:MobileService=\"http://mobile.billpaysite.com/\" xmlns:s1=\"http://microsoft.com/wsdl/types/\" xsl:version=\"1.0\">";
1561 $soapString .=
"<soap:Body> 1562 <MobileService:GetPayeeList> 1563 <MobileService:user xsi:type=\"MobileService:User\"> 1564 <MobileService:Product>Consumer</MobileService:Product> 1565 <MobileService:Token>{$parms['Token']}</MobileService:Token> 1566 <MobileService:InstitutionId>{$parms['InstitutionId']}</MobileService:InstitutionId> 1567 <MobileService:Login>{$parms['BillpayId']}</MobileService:Login> 1568 </MobileService:user> 1569 </MobileService:GetPayeeList> 1571 </soap:Envelope>\n";
1573 $cmd=
"/usr/bin/curl --silent --data-binary '$soapString' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: \"http://mobile.billpaysite.com/GetPayeeList\"' $ipayhost";
1575 $response=getcurl($cmd);
1576 if ($parms[
"logging"] ==
"enabled") {
1577 $logParms = $parms[
"environment"];
1578 $logParms[
"token"] = $parms[
'Token'];
1579 $logParms[
"txnId"] = time();
1580 $logParms[
"logPoint"] =
"GetPayeeList";
1581 $logParms[
"request"] = $cmd;
1582 $logParms[
"reply"] = $response;
1583 LogSSOActivity($logParms);
1586 if (empty($response)) {
1587 $return[
"status"][
"response"]=
'false';
1588 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1589 $return[
"status"][
"message"]=
"No Response (" . __LINE__ .
")";
1590 $return[
"ipaydata"]=array();
1592 # call parse function to format response array 1593 $return=ipayGetXMLResponse($response,
'user/ipay:Response',
'Payee');
1598 function ipayGetShortcuts( $parms ) {
1599 $ipayhost = $parms[
'serviceurl'];
1600 #POST /Mobile/MobileService.asmx HTTP/1.1 1601 #Host: services.billpaysite.com 1602 #Content-Type: text/xml; charset=utf-8 1603 #Content-Length: length 1604 #SOAPAction: "http://mobile.billpaysite.com/GetShortcuts" 1606 $soapString=
'<?xml version="1.0" encoding="utf-8"?>';
1607 $soapString .=
"\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:MobileService=\"http://mobile.billpaysite.com/\" xmlns:s1=\"http://microsoft.com/wsdl/types/\" xsl:version=\"1.0\">";
1608 $soapString .=
"<soap:Body> 1609 <MobileService:GetShortcuts> 1610 <MobileService:user xsi:type=\"MobileService:User\"> 1611 <MobileService:Product>Consumer</MobileService:Product> 1612 <MobileService:Token>{$parms['Token']}</MobileService:Token> 1613 <MobileService:InstitutionId>{$parms['InstitutionId']}</MobileService:InstitutionId> 1614 <MobileService:Login>{$parms['BillpayId']}</MobileService:Login> 1615 </MobileService:user> 1616 </MobileService:GetShortcuts> 1618 </soap:Envelope>\n";
1620 $cmd=
"/usr/bin/curl --silent --data-binary '$soapString' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: \"http://mobile.billpaysite.com/GetShortcuts\"' $ipayhost";
1622 $response=getcurl($cmd);
1623 if ($parms[
"logging"] ==
"enabled") {
1624 $logParms = $parms[
"environment"];
1625 $logParms[
"token"] = $parms[
'Token'];
1626 $logParms[
"txnId"] = time();
1627 $logParms[
"logPoint"] =
"GetShortcuts";
1628 $logParms[
"request"] = $cmd;
1629 $logParms[
"reply"] = $response;
1630 LogSSOActivity($logParms);
1633 if (empty($response)) {
1634 $return[
"status"][
"response"]=
'false';
1635 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1636 $return[
"status"][
"message"]=
"No Response (" . __LINE__ .
")";
1637 $return[
"ipaydata"]=array();
1639 # call parse function to format response array 1640 $return=ipayGetXMLResponse($response,
'user/ipay:Response',
'Payment');
1645 function ipayGetScheduled( $parms ) {
1646 # tested OK 11/06/12 1647 # uses: $parms['InstitutionId'] 1649 # $parms['serviceurl'] 1650 # $parms['BillpayId']) 1652 if ( !isset($parms[
'InstitutionId']) || !isset($parms[
'Token']) ||
1653 !isset($parms[
'serviceurl']) || !isset($parms[
'BillpayId']) ){
1654 $return[
"status"][
"response"]=
'false';
1655 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1656 $return[
"status"][
"message"]=
'Missing Parameters (' . __LINE__ .
')';
1657 $return[
"ipaydata"]=array();
1660 $ipayhost = $parms[
'serviceurl'];
1661 #POST /Mobile/MobileService.asmx HTTP/1.1 1662 #Host: services.billpaysite.com 1663 #Content-Type: text/xml; charset=utf-8 1664 #Content-Length: length 1665 #SOAPAction: "http://mobile.billpaysite.com/GetScheduled" 1667 $soapString=
'<?xml version="1.0" encoding="utf-8"?>';
1668 $soapString .=
"\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:MobileService=\"http://mobile.billpaysite.com/\" xmlns:s1=\"http://microsoft.com/wsdl/types/\" xsl:version=\"1.0\">";
1669 $soapString .=
"<soap:Body> 1670 <MobileService:GetScheduled> 1671 <MobileService:user xsi:type=\"MobileService:User\"> 1672 <MobileService:Product>Consumer</MobileService:Product> 1673 <MobileService:Token>{$parms['Token']}</MobileService:Token> 1674 <MobileService:InstitutionId>{$parms['InstitutionId']}</MobileService:InstitutionId> 1675 <MobileService:Login>{$parms['BillpayId']}</MobileService:Login> 1676 </MobileService:user> 1677 </MobileService:GetScheduled> 1679 </soap:Envelope>\n";
1681 $cmd=
"/usr/bin/curl --silent --data-binary '$soapString' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: \"http://mobile.billpaysite.com/GetScheduled\"' $ipayhost";
1683 $response=getcurl($cmd);
1684 if ($parms[
"logging"] ==
"enabled") {
1685 $logParms = $parms[
"environment"];
1686 $logParms[
"token"] = $parms[
'Token'];
1687 $logParms[
"txnId"] = time();
1688 $logParms[
"logPoint"] =
"GetScheduled";
1689 $logParms[
"request"] = $cmd;
1690 $logParms[
"reply"] = $response;
1691 LogSSOActivity($logParms);
1694 if (empty($response)) {
1695 $return[
"status"][
"response"]=
'false';
1696 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1697 $return[
"status"][
"message"]=
"No Response (" . __LINE__ .
")";
1698 $return[
"ipaydata"]=array();
1700 # call parse function to format response array 1701 $return=ipayGetXMLResponse($response,
'user/ipay:Response',
'Payment');
1707 function ipayStopPayment( $parms ) {
1708 # uses: $parms['InstitutionId'] 1710 # $parms['serviceurl'] 1711 # $parms['BillpayId'] 1712 # $parms['Payment']['Id'] 1714 if ( !isset($parms[
'InstitutionId']) || !isset($parms[
'Token']) ||
1715 !isset($parms[
'serviceurl']) || !isset($parms[
'BillpayId']) ||
1716 !isset($parms[
'Payment'][
'Id']) ){
1717 $return[
"status"][
"response"]=
'false';
1718 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1719 $return[
"status"][
"message"]=
'Missing Parameters (' . __LINE__ .
')';
1720 $return[
"ipaydata"]=array();
1724 $ipayhost = $parms[
'serviceurl'];
1725 #POST /Mobile/MobileService.asmx HTTP/1.1 1726 #Host: services.billpaysite.com 1727 #Content-Type: text/xml; charset=utf-8 1728 #Content-Length: length 1729 #SOAPAction: "http://mobile.billpaysite.com/StopPayment" 1731 $soapString=
'<?xml version="1.0" encoding="utf-8"?>';
1732 $soapString .=
"\n<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:MobileService=\"http://mobile.billpaysite.com/\" xmlns:s1=\"http://microsoft.com/wsdl/types/\" xsl:version=\"1.0\">\n";
1733 $soapString .=
"<soap:Body> 1734 <MobileService:StopPayment> 1735 <MobileService:payment> 1736 <MobileService:Product>Consumer</MobileService:Product> 1737 <MobileService:Token>{$parms['Token']}</MobileService:Token> 1738 <MobileService:InstitutionId>{$parms['InstitutionId']}</MobileService:InstitutionId> 1739 <MobileService:Login>{$parms['BillpayId']}</MobileService:Login>\n";
1741 foreach($parms[
'Payment'] as $key =>$value) {
1742 if($key !=
'Token') {
1743 $soapString .=
"<MobileService:{$key}>$value</MobileService:{$key}>\n";
1747 $soapString .=
"</MobileService:payment> 1748 </MobileService:StopPayment> 1750 </soap:Envelope>\n";
1752 $cmd=
"/usr/bin/curl --silent --data-binary '$soapString' -H 'Content-Type: text/xml; charset=utf-8' -H 'SOAPAction: \"http://mobile.billpaysite.com/StopPayment\"' $ipayhost";
1754 $response=getcurl($cmd);
1755 if ($parms[
"logging"] ==
"enabled") {
1756 $logParms = $parms[
"environment"];
1757 $logParms[
"token"] = $parms[
'Token'];
1758 $logParms[
"txnId"] = time();
1759 $logParms[
"logPoint"] =
"StopPayment";
1760 $logParms[
"request"] = $cmd;
1761 $logParms[
"reply"] = $response;
1762 LogSSOActivity($logParms);
1765 if (empty($response)) {
1766 $return[
"status"][
"response"]=
'false';
1767 $return[
"status"][
"code"] = MP_IPAY_ERROR_CODE;
1768 $return[
"status"][
"message"]=
"No Response (" . __LINE__ .
")";
1769 $return[
"ipaydata"]=array();
1771 # call parse function to format response array 1772 $return=ipayGetXMLResponse($response,
'StopPaymentResult',
'payment');
1778 function ipayGetXMLResponse ($ipayXML,$XMLresp,$XMLdata) {
1780 $xml = simplexml_load_string($ipayXML);
1781 $xml->registerXPathNamespace(
'ipay',
'http://mobile.billpaysite.com/');
1783 $userresponse = $xml->xpath(
"//ipay:$XMLresp");
1784 $dataresponse = $xml->xpath(
"//ipay:$XMLdata");
1788 $resp_arr[
"status"][
"response"]=(string)$userresponse[0][0];
1790 $resp_arr[
"ipaydata"]=array();
1791 foreach($dataresponse as $key=>$details) {
1792 foreach($details as $dkey=>$dd) {
1793 $resp_arr[
"ipaydata"][$key][$dkey]=(string)($dd);
1800 function ipayGetXMLProcDates ($ipayXML,$XMLresp,$XMLdata) {
1802 $xml = simplexml_load_string($ipayXML);
1803 $xml->registerXPathNamespace(
'ipay',
'http://mobile.billpaysite.com/');
1805 $userresponse = $xml->xpath(
"//ipay:$XMLresp");
1806 $dataresponse = $xml->xpath(
"//ipay:$XMLdata");
1808 $resp_arr[
"status"][
"response"]=(string)$userresponse[0][0];
1810 $resp_arr[
"ipaydata"]=array();
1811 foreach($dataresponse as $key=>$details) {
1813 foreach($details as $dd) {
1814 $resp_arr[
"ipaydata"][$dkey]=array(
'ProcessDate' => (
string)($dd));
1822 function ipayGetXMLDueDates ($ipayXML,$XMLresp,$XMLdata) {
1824 $xml = simplexml_load_string($ipayXML);
1825 $xml->registerXPathNamespace(
'ipay',
'http://mobile.billpaysite.com/');
1827 $userresponse = $xml->xpath(
"//ipay:$XMLresp");
1828 # note! dates are returned as a dataset and NOT under the ipay namespace 1829 $dataresponse = $xml->xpath(
"//$XMLdata");
1832 $resp_arr[
"status"][
"response"]=(string)$userresponse[0][0];
1834 $resp_arr[
"ipaydata"]=array();
1836 foreach($dataresponse as $key=>$details) {
1837 foreach($details as $dkey=>$dd) {
1838 $resp_arr[
"ipaydata"][$key][$dkey]=(string)($dd);