function ProjectTheme_get_show_price($price, $cents = 2) { $ProjectTheme_currency_position = get_option('ProjectTheme_currency_position'); if ($ProjectTheme_currency_position == "front") { return ProjectTheme_get_currency() . "" . ProjectTheme_formats($price, $cents); } return ProjectTheme_formats($price, $cents) . "" . ProjectTheme_get_currency(); }
$action = 'process'; } switch ($action) { case 'process': // Process and order... $bid = projectTheme_get_winner_bid($pid); $total = $bid->bid; //------------------------------------------------------ $p->add_field('business', $paypal_email); $p->add_field('currency_code', get_option('ProjectTheme_currency')); $p->add_field('return', $this_script . '?action=success'); $p->add_field('cancel_return', $this_script . '&action=cancel'); $p->add_field('notify_url', $this_script . '&action=ipn'); $p->add_field('item_name', $post->post_title); $p->add_field('custom', $pid . '|' . current_time('timestamp', 0)); $p->add_field('amount', ProjectTheme_formats($total, 2)); $p->submit_paypal_post(); // submit the fields to paypal break; case 'success': // Order was successful... // Order was successful... case 'ipn': if (isset($_POST['custom'])) { global $current_user; get_currentuserinfo(); $uid = $current_user->ID; $cust = $_POST['custom']; $cust = explode("|", $cust); $pid = $cust[0]; $datemade = $cust[1];