Author Topic: : [PAYMENT METHOD] Alertpay - Currency Converter  (Read 7090 times)

mehdoush

  • Beginner
  • *
  • Posts: 4
: [PAYMENT METHOD] Alertpay - Currency Converter
« on: January 14, 2012, 09:41:13 am »
hello i ' m using Alertpay payment module ,i find it for free in this website :http://www.joellipman.com.

 my issue is that my shop is base on tunisian dinar currency code is TND.  Alertpay don't accept this currency code.

my installed currency conversion plugin is oandaCONVERT. could you help me . you can find the extra info bellow :

Code: [Select]
<?php  $payment_url="https://www.alertpay.com/PayProcess.aspx";


  
$post_variables=Array(  "ap_purchasetype"=>AP_PURCHASETYPE
   
"ap_merchant"=>AP_MERCHANT,  
   
"ap_additionalcharges"=>"0.00",
     
"ap_shippingcharges"=>$db->f("order_shipping"),
   "ap_taxamount"=>$db->f("order_tax")+$db->f("order_shipping_tax"),
     "ap_discountamount"=>$db->f("coupon_discount")+$db->f("order_discount"),
   "ap_currency"=>$_SESSION["vendor_currency"], 
    "ap_returnurl"=>AP_RETURNURL."?option=com_virtuemart&page=checkout.result&order_id=".$db->f("order_id"),
  "ap_cancelurl"=>AP_CANCELURL
   "apc_1"=>$order_num_display ); 
    $db1 = new ps_DB(); 




 $q "SELECT order_item_sku,order_item_name,product_quantity,product_final_price,product_attribute FROM #__vm_order_item WHERE order_id='".$db->f("order_id")."' ORDER BY order_item_id ASC"
  $rows $db1->query($q);
    $i=0;
  $order_num_display=$db->f("order_id"); 
   while ($db1->next_record())
    {  $this_item_name=trim($db1->f("order_item_name")); 
 $this_item_qty=$db1->f("product_quantity"); 
  $this_item_sku=trim($db1->f("order_item_sku"));
    $this_item_price=round($db1->f("product_final_price"),2); 
 $this_item_desc=strip_tags(str_replace("<br/>"" "str_replace("<br />"" "$db1->f("product_attribute"))));  
  $temp_item_name_varname=($i==0)?"ap_itemname":"ap_itemname_".$i;
    $temp_item_qty_varname=($i==0)?"ap_quantity":"ap_quantity_".$i
 $temp_item_sku_varname=($i==0)?"ap_itemcode":"ap_itemcode_".$i;
   $temp_item_price_varname=($i==0)?"ap_amount":"ap_amount_".$i
    $temp_item_desc_varname=($i==0)?"ap_description":"ap_description_".$i;  
 $post_variables[$temp_item_name_varname]=($i==0)?"Order #".$order_num_display.": ".$this_item_name:$this_item_name;  $post_variables[$temp_item_qty_varname]=$this_item_qty
  $post_variables[$temp_item_sku_varname]=$this_item_sku
  $post_variables[$temp_item_price_varname]=$this_item_price
  $post_variables[$temp_item_desc_varname]=$this_item_desc;   $i++;  }  
  
  
  $ap_currency "USD";
global $vendor_currency;
$amt_a $post_variables["amount"];
$amt_s $post_variables["shipping"];
  
if (!$vendor_currency){
$vendor_currency $_SESSION['vendor_currency'];
}

if (file_existsCLASSPATH.'currency/convertOANDA.php')) {
$traznet = new convertOANDA();
}
$convert true;
require_once(CLASSPATH.'currency/convertOANDA.php');
$tmp_a $traznet->convert$amt_a$vendor_currency$paypal_currency );
$tmp_s $traznet->convert$amt_s$vendor_currency$paypal_currency );
if( !empty($tmp_a) && !empty($tmp_s)) {
$convert 1;
$post_variables["amount"] = round$tmp_a2);
$post_variables["shipping"] = round$tmp_s2);
$post_variables["currency_code"] = $paypal_currency;
$update_post 1;
}

  
  
   if($page=="checkout.thankyou")
   { 
    $query_string="?";
  foreach($post_variables as $name=>$value)
  { 
   $query_string.=$name."=".urlencode($value)."&"
    } 
 vmRedirect($payment_url.$query_string); 
  }
   else 
   {
    echo '<form action="https://www.alertpay.com/PayProcess.aspx" enctype="application/x-www-form-urlencoded" method="post">';
 foreach($post_variables as $name=>$value)
 { 
 echo '<input type="hidden" name="'.$name.'" value="'.htmlspecialchars($value).'" />';
  } echo '</form>';
   } ?>

jameel

  • Beginner
  • *
  • Posts: 45
Re: : [PAYMENT METHOD] Alertpay - Currency Converter
« Reply #1 on: May 17, 2012, 11:50:55 am »
Dear mehdoush

here is alertpay (Now payza) module for vm 1.x.x that let you convert your currency..

http://www.itechshop.org/index.php?option=com_virtuemart&page=shop.product_details&flypage=flypage.tpl&product_id=25

it uses payza.com now..

it takes any payza unsupported currency from your store and convert it into payza supported one that you configured at back end using Google finance

Now you can use any of following currency on your virtuemart shop, this module will do its job and converted them to the any payza supported currencies you configure at backend.

Payza supported currencies you can accept using this module

Australian Dollar (AUD)
Bulgarian Lev (BGN)
Canadian Dollar (CAD)
Swiss Franc (CHF)
Czech Koruna (CZK)
Danish Krone (DKK)
Estonia Kroon (EEK)
Euro (EUR)
Pound Sterling (GBP)
Hong Kong Dollar (HKD)
Hungarian Forint (HUF)
Indian Rupee (INR)
Lithuanian Litas (LTL)Malaysian Ringgit (MYR)
Macedonian Denar (MKD)
Norwegian Krone (NOK)
New Zealand Dollar (NZD)
Polish Zloty (PLN)
Romanian New Leu (RON)
Swedish Krona (SEK)
Singapore Dollar (SGD)
U.S. Dollar (USD)
South African Rand (ZAR)

You can set any of following 98 currencies in virtuemart

United Arab Emirates Dirham (AED)
Netherlands Antillean Guilder (ANG)
Argentine Peso (ARS)
Australian Dollar (AUD)
Bangladeshi Taka (BDT)
Bulgarian Lev (BGN)
Bahraini Dinar (BHD)
Brunei Dollar (BND)
Bolivian Boliviano (BOB)
Brazilian Real (BRL)
Botswanan Pula (BWP)
Canadian Dollar (CAD)
Swiss Franc (CHF)
Chilean Peso (CLP)
Chinese Yuan (CNY)
Colombian Peso (COP)
Costa Rican Colón (CRC)
Czech Republic Koruna (CZK)
Danish Krone (DKK)
Dominican Peso (DOP)
Algerian Dinar (DZD)
Estonian Kroon (EEK)
Egyptian Pound (EGP)
Euro (EUR)
Fijian Dollar (FJD)
British Pound Sterling (GBP)
Hong Kong Dollar (HKD)
Honduran Lempira (HNL)
Croatian Kuna (HRK)
Hungarian Forint (HUF)
Indonesian Rupiah (IDR)
Israeli New Sheqel (ILS)
Indian Rupee (INR)
Jamaican Dollar (JMD)
Jordanian Dinar (JOD)
Japanese Yen (JPY)
Kenyan Shilling (KES)
South Korean Won (KRW)
Kuwaiti Dinar (KWD)
Cayman Islands Dollar (KYD)
Kazakhstani Tenge (KZT)
Lebanese Pound (LBP)
Sri Lankan Rupee (LKR)
Lithuanian Litas (LTL)
Latvian Lats (LVL)
Moroccan Dirham (MAD)
Moldovan Leu (MDL)
Macedonian Denar (MKD)
Mauritian Rupee (MUR)
Maldivian Rufiyaa (MVR)
Mexican Peso (MXN)
Malaysian Ringgit (MYR)
Namibian Dollar (NAD)
Nigerian Naira (NGN)
Nicaraguan Córdoba (NIO)
Norwegian Krone (NOK)
Nepalese Rupee (NPR)
New Zealand Dollar (NZD)
Omani Rial (OMR)
Peruvian Nuevo Sol (PEN)
Papua New Guinean Kina (PGK)
Philippine Peso (PHP)
Pakistani Rupee (PKR)
Polish Zloty (PLN)
Paraguayan Guarani (PYG)
Qatari Rial (QAR)
Romanian Leu (RON)
Serbian Dinar (RSD)
Russian Ruble (RUB)
Saudi Riyal (SAR)
Seychellois Rupee (SCR)
Swedish Krona (SEK)
Singapore Dollar (SGD)
Slovak Koruna (SKK)
Sierra Leonean Leone (SLL)
Salvadoran Colón (SVC)
Thai Baht (THB)
Tunisian Dinar (TND)
Turkish Lira (TRY)
Trinidad and Tobago Dollar (TTD)
New Taiwan Dollar (TWD)
Tanzanian Shilling (TZS)
Ukrainian Hryvnia (UAH)
Ugandan Shilling (UGX)
US Dollar (USD)
Uruguayan Peso (UYU)
Uzbekistan Som (UZS)
Venezuelan Bolívar (VEF)
Vietnamese Dong (VND)
CFA Franc BCEAO (XOF)
Yemeni Rial (YER)
South African Rand (ZAR)
Zambian Kwacha (ZMK)
Virtuemart + Joomla extensions www.itechshop.org
get Paypal extended, payza extended, moneybookers extended module that let you use 98  currencies nonsupported paypal/alertpay/mb currencies on VM 1.1.x and convert them to supported one at www.itechshop.org

220+ domain extensions www.industechnologies.co