public function redirectToPaypal()
    {
        $parameters = Request::getRequestArrayFromString($request = null);
        foreach ($parameters as $name => $param) {
            if ($name == 'idSite'
                || $name == 'module'
                || $name == 'action'
            ) {
                unset($parameters[$name]);
            }
        }
        $paypalParameters = [
            "cmd" => "_s-xclick"
        ];
        if (empty($parameters["onetime"]) || $parameters["onetime"] != "true") {
            $paypalParameters["hosted_button_id"] = "DVKLY73RS7JTE";
            $paypalParameters["currency_code"] = "USD";
            $paypalParameters["on0"] = "Piwik Supporter";
            if (!empty($parameters["os0"])) {
                $paypalParameters["os0"] = $parameters["os0"];
            }
        } else {
            $paypalParameters["hosted_button_id"] = "RPL23NJURMTFA";
        }

        $url = "https://www.paypal.com/cgi-bin/webscr?" . Url::getQueryStringFromParameters($paypalParameters);

        Url::redirectToUrl($url);
        exit;
    }
public function redirectToPaypal()
    {
        $parameters = Request::getRequestArrayFromString($request = null);
        foreach ($parameters as $name => $param) {
            if ($name == 'idSite'
                || $name == 'module'
                || $name == 'action'
            ) {
                unset($parameters[$name]);
            }
        }
        $paypalParameters = [
            "cmd" => "_s-xclick"
        ];
        if (empty($parameters["onetime"]) || $parameters["onetime"] != "true") {
            $paypalParameters["hosted_button_id"] = "DVKLY73RS7JTE";
            $paypalParameters["currency_code"] = "USD";
            $paypalParameters["on0"] = "Piwik Supporter";
            if (!empty($parameters["os0"])) {
                $paypalParameters["os0"] = $parameters["os0"];
            }
        } else {
            $paypalParameters["hosted_button_id"] = "RPL23NJURMTFA";
        }

        $url = "https://www.paypal.com/cgi-bin/webscr?" . Url::getQueryStringFromParameters($paypalParameters);

        Url::redirectToUrl($url);
        exit;
    }
public function redirectToPaypal ( ) { $ parameters = Request :: getRequestArrayFromString ( $ request = null ) ; foreach ( $ parameters as $ name => $ param ) { if ( $ name == 'idSite' || $ name == 'module' || $ name == 'action' ) { unset ( $ parameters [ $ name ] ) ; } } $ paypalParameters = [ "cmd" => "_s-xclick" ] ; if ( empty ( $ parameters [ "onetime" ] ) || $ parameters [ "onetime" ] != "true" ) { $ paypalParameters [ "hosted_button_id" ] = "DVKLY73RS7JTE" ; $ paypalParameters [ "currency_code" ] = "USD" ; $ paypalParameters [ "on0" ] = "Piwik Supporter" ; if ( ! empty ( $ parameters [ "os0" ] ) ) { $ paypalParameters [ "os0" ] = $ parameters [ "os0" ] ; } } else { $ paypalParameters [ "hosted_button_id" ] = "RPL23NJURMTFA" ; } $ url = "https://www.paypal.com/cgi-bin/webscr?" . Url :: getQueryStringFromParameters ( $ paypalParameters ) ; Url :: redirectToUrl ( $ url ) ; exit ; }
Redirects the user to a paypal so they can donate to Piwik.
Redirects the user to a paypal so they can donate to Piwik .