Exemplo n.º 1
0
function gjb_obteVistaUsuariPerPagar($year, $token)
{
    global $gjb_cost;
    global $lang;
    global $gjb_online_discount_percent;
    $discount = $gjb_cost * $gjb_online_discount_percent * 0.01;
    $total_cost = $gjb_cost - $discount;
    $discount = gjb_fl2str($discount);
    $total_cost = gjb_fl2str($total_cost);
    $locale = get_locale();
    $wpPayPalFramework = wpPayPalFramework::getInstance();
    $currency = $wpPayPalFramework->getSetting('currency');
    if (GJB_PAY_ON_PAYPAL) {
        $useraction = "<input type='hidden' name='useraction' value='commit'>";
    } else {
        $useraction = "";
    }
    return $lang['FORM_TOPAY'] . "<hr/>\n<div class='clearfix' style='margin:3px'>\n<div class='gjb_costdiv'>{$gjb_cost} {$currency}</div>\n<div class='gjb_costdiv'>{$lang['COST']}:</div>\n</div>\n<div class='clearfix' style='margin:3px'>\n<div class='gjb_costdiv'>- {$discount} {$currency}</div>\n<div class='gjb_costdiv'>{$lang['DISCOUNT']}:</div>\n</div>\n<div class='clearfix' style='margin:3px'>\n<div class='gjb_costdiv'><b>{$total_cost} {$currency}</b></div>\n<div class='gjb_costdiv'><b>{$lang['TOTAL_COST']}:</b></div>\n</div>\n<div class='clearfix'>\n\t<div style='float:right;margin: 10px'>\n\t\t<form action='{$wpPayPalFramework->getUrl()}' method='get'>\n\t\t\t<input type='hidden' name='cmd' value='_express-checkout'>\n\t\t\t<input type='hidden' name='token' value='{$token}'>\n\t\t\t{$useraction}\n\t\t\t<input type='image' src='https://fpdbs.paypal.com/dynamicimageweb?cmd=_dynamic-image&locale={$locale}' border='0' name='submit' alt='PayPal Checkout.'>\n\t\t</form>\n\t</div>\n</div>";
}
Exemplo n.º 2
0
 /**
  * Support the old method of using hash_call
  */
 function hash_call($methodName, $nvpStr)
 {
     _deprecated_function(__FUNCTION__, '0.1', 'wpPayPalFramework::hashCall()');
     $nvpStr = wp_parse_args($nvpStr);
     $nvpStr['METHOD'] = $methodName;
     $nvpStr = array_map('urldecode', $nvpStr);
     $wpPayPalFramework = wpPayPalFramework::getInstance();
     return $wpPayPalFramework->hashCall($nvpStr);
 }