<?php global $wp_query; $pid = $wp_query->query_vars['jobid']; $pstn = get_option('PricerrTheme_pay_for_posting_job_page_id'); $cancel_url = get_bloginfo("siteurl") . '/?page_id=' . $pstn . '&jobid=' . $pid; $response_url = get_bloginfo('siteurl') . '/?payment_response_listing=moneybookers'; $ccnt_url = get_permalink(get_option('PricerrTheme_my_account_page_id')); //---------------------------------------------------------------------------------- $price = PricerrTheme_formats(get_option('PricerrTheme_new_job_feat_listing_fee')); if (get_post_meta($pid, 'featured', true) != "1") { $price = 0; } $PricerrTheme_new_job_listing_fee = get_option('PricerrTheme_new_job_listing_fee'); $price += $PricerrTheme_new_job_listing_fee; $currency = get_option('PricerrTheme_currency'); $tm = current_time('timestamp', 0); $post = get_post($pid); ?> <html> <head><title>MoneyBookers</title></head> <body onLoad="document.form_mb.submit();"> <center><h3><?php _e('Please wait, your order is being processed...', 'PricerrTheme'); ?> </h3></center> <form name="form_mb" action="https://www.moneybookers.com/app/payment.pl"> <input type="hidden" name="pay_to_email" value="<?php echo get_option('PricerrTheme_moneybookers_email');
function PricerrTheme_payok_main_listing_submit_payment() { global $wp_query, $wpdb, $current_user; $pid = $_GET['jobid']; get_currentuserinfo(); $uid = $current_user->ID; $post = get_post($pid); //---------------------------------------------- if ($current_user->ID == $post->post_author) { echo 'DEBUG_INFO: You cannot buy your own stuff.'; exit; } $tm = time(); $nts = nl2br(strip_tags($_POST['notes_to_seller'])); update_option("purchase_notes_" . $tm . $uid, base64_encode($nts)); $price = get_post_meta($pid, 'price', true); if (empty($price)) { $price = get_option('PricerrTheme_job_fixed_amount'); } $job_title = get_post_meta($pid, 'job_title', true); if (empty($job_title)) { $job_title = $post->post_title; } //--------------------------------------------------- $extr_ttl = 0; $xtra_stuff = ''; $extras = $_GET['extras']; $extras = explode("|", $extras); if (count($extras)) { foreach ($extras as $myitem) { if (!empty($myitem)) { $extra_price = get_post_meta($pid, 'extra' . $myitem . '_price', true); $extr_ttl += $extra_price; $xtra_stuff .= '|' . $myitem; } } } $shipping = get_post_meta($pid, 'shipping', true); if (empty($shipping)) { $shipping = 0; } //--------------------------------- $title_post = $post->post_title; //--------------------------------- $tm = current_time('timestamp', 0); $cancel_url = get_bloginfo("siteurl") . '/?p_action=payok_listing_response&pid=' . $pid; $response_url = get_bloginfo('siteurl') . '/?p_action=payok_listing_response'; $ccnt_url = get_permalink(get_option('PricerrTheme_my_account_shopping_page_id')); //get_bloginfo('siteurl').'/?p_action=edit_project&paid=ok&pid=' . $pid; $currency = get_option('PricerrTheme_currency'); //https://www.payfast.co.za/eng/process ?> <html> <head><title>Processing OKPay Payment...</title></head> <body onLoad="document.frmPay.submit();" > <center><h3><?php _e('Please wait, your order is being processed...', 'PricerrTheme'); ?> </h3></center> <form method="post" action="https://www.okpay.com/process.html" name="frmPay" id="frmPay"> <input type="hidden" name="ok_receiver" value="<?php echo get_option('PricerrTheme_okpay_id'); ?> " /> <input type="hidden" name="ok_item_1_name" value="<?php echo $title_post; ?> " /> <input type="hidden" name="ok_currency" value="<?php echo $currency; ?> " /> <input type="hidden" name="ok_invoice" value="<?php echo $pid . '|' . $uid . '|' . $tm . $xtra_stuff; ?> " /> <input type="hidden" name="ok_item_1_type" value="service" /> <input type="hidden" name="ok_return_success" value="<?php echo $ccnt_url; ?> " /> <input type="hidden" name="ok_ipn" value="<?php echo $response_url; ?> " /> <input type="hidden" name="ok_item_1_price" value="<?php echo PricerrTheme_formats($price + $extr_ttl + $shipping, 2); ?> " /> </form> </body> </html> <?php }
"> <input type="hidden" name="status_url" value="<?php echo $response_url; ?> "> <input type="hidden" name="language" value="EN"> <input type="hidden" name="merchant_fields" value="field1"> <input type="hidden" name="field1" value="<?php echo $pid . '|' . $uid . '|' . $tm . $xtra_stuff; ?> "> <input type="hidden" name="amount" value="<?php echo PricerrTheme_formats($price + $extr_ttl + $shipping, 2); ?> "> <input type="hidden" name="currency" value="<?php echo $currency; ?> "> <input type="hidden" name="detail1_description" value="Product: "> <input type="hidden" name="detail1_text" value="<?php echo $job_title; ?> "> <input type="hidden" name="return_url" value="<?php echo $ccnt_url;
function PricerrTheme_formats_mm($number, $cents = 1) { if (is_float($number)) { return PricerrTheme_formats($number, $cents); } return $number; }
function PricerrTheme_dwolla_main_listing_submit_payment() { global $wp_query, $wpdb, $current_user; $pid = $_GET['jobid']; get_currentuserinfo(); $uid = $current_user->ID; $post = get_post($pid); //---------------------------------------------- if ($current_user->ID == $post->post_author) { echo 'DEBUG_INFO: You cannot buy your own stuff.'; exit; } $tm = time(); $nts = nl2br(strip_tags($_POST['notes_to_seller'])); update_option("purchase_notes_" . $tm . $uid, base64_encode($nts)); $price = get_post_meta($pid, 'price', true); if (empty($price)) { $price = get_option('PricerrTheme_job_fixed_amount'); } $job_title = get_post_meta($pid, 'job_title', true); if (empty($job_title)) { $job_title = $post->post_title; } //--------------------------------------------------- $extr_ttl = 0; $xtra_stuff = ''; $extras = $_GET['extras']; $extras = explode("|", $extras); if (count($extras)) { foreach ($extras as $myitem) { if (!empty($myitem)) { $extra_price = get_post_meta($pid, 'extra' . $myitem . '_price', true); $extr_ttl += $extra_price; $xtra_stuff .= '|' . $myitem; } } } $shipping = get_post_meta($pid, 'shipping', true); if (empty($shipping)) { $shipping = 0; } //--------------------------------- $title_post = $post->post_title; //--------------------------------- $tm = current_time('timestamp', 0); $cancel_url = get_bloginfo("siteurl") . '/?p_action=pay_by_dwolla&pid=' . $pid; $response_url = get_bloginfo('siteurl') . '/?p_action=pay_by_dwolla'; $ccnt_url = get_permalink(get_option('PricerrTheme_my_account_shopping_page_id')); //get_bloginfo('siteurl').'/?p_action=edit_project&paid=ok&pid=' . $pid; $currency = get_option('PricerrTheme_currency'); //https://www.payfast.co.za/eng/process $tm = current_time('timestamp', 0); $ordid = $tm . $pid . $uid; update_option('extras_dw_' . $ordid, $pid . '|' . $uid . '|' . $tm . $xtra_stuff); $key = get_option('PricerrTheme_dwolla_key'); $secret = get_option('PricerrTheme_dwolla_secret'); $timestamp = $tm; $order_id = $ordid; $signature = hash_hmac('sha1', "{$key}&{$timestamp}&{$order_id}", $secret); ?> <html> <head><title>Processing PayFast Payment...</title></head> <body onLoad="document.frmPay.submit();" > <center><h3><?php _e('Please wait, your order is being processed...', 'PricerrTheme'); ?> </h3></center> <form accept-charset="UTF-8" action="https://www.dwolla.com/payment/pay" name="frmPay" id="frmPay" method="post"> <input id="key" name="key" type="hidden" value="<?php echo $key; ?> " /> <input id="signature" name="signature" type="hidden" value="<?php echo $signature; ?> " /> <input id="callback" name="callback" type="hidden" value="<?php echo $response_url; ?> " /> <input id="redirect" name="redirect" type="hidden" value="<?php echo $ccnt_url; ?> " /> <input id="test" name="test" type="hidden" value="false" /> <input id="name" name="name" type="hidden" value="<?php echo $title_post; ?> " /> <input id="description" name="description" type="hidden" value="<?php echo $title_post; ?> " /> <input id="destinationid" name="destinationid" type="hidden"value="<?php echo get_option('PricerrTheme_dwolla_destid'); ?> " /> <input id="amount" name="amount" type="hidden" value="<?php echo PricerrTheme_formats($price + $extr_ttl + $shipping, 2); ?> " /> <input id="shipping" name="shipping" type="hidden" value="0.00" /> <input id="tax" name="tax" type="hidden" value="0.00" /> <input id="orderid" name="orderid" type="hidden" value="<?php echo $ordid; ?> " /> <input id="timestamp" name="timestamp" type="hidden" value="<?php echo $tm; ?> " /> </form> </body> </html> <?php }
function PricerrTheme_egopay_main_listing_submit_payment() { global $wp_query, $wpdb, $current_user; $pid = $_GET['jobid']; get_currentuserinfo(); $uid = $current_user->ID; $post = get_post($pid); //---------------------------------------------- if ($current_user->ID == $post->post_author) { echo 'DEBUG_INFO: You cannot buy your own stuff.'; exit; } $tm = time(); $nts = nl2br(strip_tags($_POST['notes_to_seller'])); update_option("purchase_notes_" . $tm . $uid, base64_encode($nts)); $price = get_post_meta($pid, 'price', true); if (empty($price)) { $price = get_option('PricerrTheme_job_fixed_amount'); } $job_title = get_post_meta($pid, 'job_title', true); if (empty($job_title)) { $job_title = $post->post_title; } //--------------------------------------------------- $extr_ttl = 0; $xtra_stuff = ''; $extras = $_GET['extras']; $extras = explode("|", $extras); if (count($extras)) { foreach ($extras as $myitem) { if (!empty($myitem)) { $extra_price = get_post_meta($pid, 'extra' . $myitem . '_price', true); $extr_ttl += $extra_price; $xtra_stuff .= '|' . $myitem; } } } $shipping = get_post_meta($pid, 'shipping', true); if (empty($shipping)) { $shipping = 0; } //--------------------------------- $title_post = $post->post_title; //--------------------------------- $tm = current_time('timestamp', 0); $cancel_url = get_bloginfo("siteurl") . '/?p_action=payfast_listing_response&pid=' . $pid; $response_url = get_bloginfo('siteurl') . '/?p_action=payfast_listing_response'; $ccnt_url = get_permalink(get_option('PricerrTheme_my_account_shopping_page_id')); //get_bloginfo('siteurl').'/?p_action=edit_project&paid=ok&pid=' . $pid; $currency = get_option('PricerrTheme_currency'); //https://www.payfast.co.za/eng/process ?> <html> <head><title>Processing PayFast Payment...</title></head> <body onLoad="document.frmPay.submit();" > <center><h3><?php _e('Please wait, your order is being processed...', 'PricerrTheme'); ?> </h3></center> <?php include 'EgoPaySci.php'; try { $oEgopay = new EgoPaySci(array('store_id' => get_option('PricerrTheme_egopay_id'), 'store_password' => get_option('PricerrTheme_egopay_pass'))); $sPaymentHash = $oEgopay->createHash(array('amount' => PricerrTheme_formats($price + $extr_ttl + $shipping, 2), 'currency' => $currency, 'description' => $title_post, 'fail_url' => $cancel_url, 'success_url' => $ccnt_url, 'calback_url' => $response_url, 'cf_1' => $pid . '|' . $uid . '|' . $tm . $xtra_stuff)); } catch (EgoPayException $e) { die($e->getMessage()); } ?> <form action="<?php echo EgoPaySci::EGOPAY_PAYMENT_URL; ?> " method="post" name="frmPay" id="frmPay"> <input type="hidden" name="hash" value="<?php echo $sPaymentHash; ?> " /> </form> </body> </html> <?php }