Пример #1
0
function RunAdaptivePaymentSamples()
{
    echo "Running AdaptivePayment Samples...\n";
    try {
        //Pay - create,set,execute
        $token = CreatePay();
        SetPaymentOption($token);
        ExecutePay($token);
        //GetPaymentOption
        GetPaymentOption($token);
        //Pay
        $token = Pay();
        //Payment Details
        PaymentDetails($token);
        //Refund
        Refund($token);
        //Preapproval
        $token = Preapproval();
        //Preapproval Details
        PreapprovalDetails($token);
        //Cancel Preapproval
        CancelPreapproval($token);
        //Convert Currency
        ConvertCurrency();
    } catch (Exception $ex) {
        echo $ex->getMessage();
    }
    echo "\n\n *****  Done. *****\n\n";
    //Reads enter key
    fread(STDIN, 1);
}
Пример #2
0
function converter_call($post_data = true, $data = array())
{
    global $system;
    include $include_path . 'converter.inc.php';
    // get convertion data
    if ($post_data) {
        global $_REQUEST;
        $amount = $_REQUEST['amount'];
        $from = $_REQUEST['from'];
        $to = $_REQUEST['to'];
    } else {
        $amount = $data['amount'];
        $from = $data['from'];
        $to = $data['to'];
    }
    $amount = $system->input_money($amount);
    $CURRENCIES = CurrenciesList();
    $conversion = ConvertCurrency($from, $to, $amount);
    // construct string
    echo $amount . ' ' . $CURRENCIES[$from] . ' = ' . $system->print_money_nosymbol($conversion, true) . ' ' . $CURRENCIES[$to];
}
Пример #3
0
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version. Although none of the code may be
 *   sold. If you have been sold this script, get a refund.
 ***************************************************************************/
include 'common.php';
include $include_path . 'converter.inc.php';
$CURRENCIES = CurrenciesList();
$conversion = ' ';
if (isset($_POST['action']) && $_POST['action'] == 'convert') {
    // Convert
    $from = is_numeric($_POST['from']) ? $_POST['from'] : 0;
    $to = is_numeric($_POST['to']) ? $_POST['to'] : 0;
    $amount = is_numeric($_POST['amount']) ? $_POST['amount'] : 0;
    $conversion = ConvertCurrency($from, $to, $amount);
    // construct string
    $conversion = $system->print_money_nosymbol($amount) . ' ' . $CURRENCIES[$from] . ' = ' . $system->print_money_nosymbol($conversion, true) . ' |' . $CURRENCIES[$to];
}
foreach ($CURRENCIES as $k => $v) {
    $fromselected = false;
    $toselected = false;
    if ($k == $system->SETTINGS['currency']) {
        $fromselected = true;
    } elseif (isset($_POST['from']) && $_POST['from'] == $k) {
        $fromselected = true;
    }
    if (isset($_POST['to']) && $_POST['to'] == $k) {
        $toselected = true;
    }
    $template->assign_block_vars('from', array('VALUE' => $k, 'NAME' => $v, 'B_SELECTED' => $fromselected));
Пример #4
0
 *   copyright				: (C) 2008 WeBid
 *   site					: http://www.webidsupport.com/
 ***************************************************************************/
/***************************************************************************
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version. Although none of the code may be
 *   sold. If you have been sold this script, get a refund.
 ***************************************************************************/
include "../includes/config.inc.php";
include $include_path . "converter.inc.php";
$CURRENCIES = CurrenciesList();
if (isset($_POST['action']) && $_POST['action'] == "convert") {
    #// Convert
    $CONVERTED = ConvertCurrency($_POST['from'], $_POST['to'], $_POST['amount']);
}
?>
<HTML>
<HEAD>
<TITLE>::: PHPAUCTION :::</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="4">
  <TR>
    <TD BGCOLOR="<?php 
echo $system->SETTINGS['bordercolor'];
?>
"><FONT FACE="Tahoma, Verdana" SIZE="2" COLOR="#FFFFFF">
      <?php