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
 /**
  * If an instance exists, this returns it.  If not, it creates one and
  * retuns it.
  *
  * @return wpPayPalFramework
  */
 public static function getInstance()
 {
     if (!self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }