/** * @param array $config * @param int $id_transaction * @param string $transaction_hash * @param array $options * @return array|string */ function presta_paypalexpress_payer_acte_dist($config, $id_transaction, $transaction_hash, $options = array()) { include_spip('presta/paypalexpress/inc/paypalexpress'); $contexte = array('id_transaction' => $id_transaction, 'transaction_hash' => $transaction_hash, 'url_confirm' => parametre_url(self(), 'confirm', 'oui'), 'sandbox' => paypalexpress_is_sandbox($config) ? ' ' : '', 'logo' => bank_trouver_logo('paypal', 'PAYPAL.gif'), 'config' => $config); $contexte = array_merge($options, $contexte); return recuperer_fond('presta/paypalexpress/payer/acte', $contexte); }
/** * @param array $config * @param int $id_transaction * @param string $transaction_hash * @param array $options * @return array|string */ function presta_paypal_payer_acte_dist($config, $id_transaction, $transaction_hash, $options = array()) { include_spip('presta/paypal/inc/paypal'); $contexte = array('action' => paypal_url_serveur($config), 'url_return' => bank_url_api_retour($config, "response"), 'url_notify' => bank_url_api_retour($config, "autoresponse"), 'url_cancel' => bank_url_api_retour($config, "cancel"), 'id_transaction' => $id_transaction, 'transaction_hash' => $transaction_hash, 'sandbox' => paypal_is_sandbox($config), 'logo' => bank_trouver_logo('paypal', 'PAYPAL.gif'), 'config' => $config); $contexte = array_merge($options, $contexte); return recuperer_fond('presta/paypal/payer/acte', $contexte); }
/** * @param array $config * @param int $id_transaction * @param string $transaction_hash * @param array $options * @return array|string */ function presta_cmcic_payer_acte_dist($config, $id_transaction, $transaction_hash, $options = array()) { $call_request = charger_fonction('request', 'presta/cmcic/call'); $contexte = $call_request($id_transaction, $transaction_hash, $config); if (!$contexte) { return ""; } include_spip('inc/cmcic'); $contexte['sandbox'] = cmcic_is_sandbox($config) ? ' ' : ''; $contexte['logo'] = bank_trouver_logo("cmcic", "cmcic.png"); $contexte = array_merge($options, $contexte); return recuperer_fond('presta/cmcic/payer/acte', $contexte); }
/** * Detecter le logo a afficher en fonction du FAI presume * @return bool|string */ function wha_logo_detecte_fai_visiteur() { $ip = $_SERVER['HTTP_X_FORWARDED_FOR'] ? $_SERVER['HTTP_X_FORWARDED_FOR'] : ($_SERVER['HTTP_CLIENT_IP'] ? $_SERVER['HTTP_CLIENT_IP'] : $_SERVER['REMOTE_ADDR']); $gethostbyaddr = gethostbyaddr($ip); $dyn = explode('.', $gethostbyaddr); $nombre_de_points = substr_count($gethostbyaddr, '.'); $fai = $dyn[$nombre_de_points - 1]; if ($fai == "wanadoo") { $fai = "orange"; } $fai_supporte = array("proxad", "orange", "bouygues"); if (in_array($fai, $fai_supporte)) { return bank_trouver_logo('internetplus', "{$fai}.png"); } else { #spip_log($fai."non supporte par internet+".$gethostbyaddr); return bank_trouver_logo('internetplus', "logo_wha_abo_sans_sfr.png"); } }