News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

a payment module - howto do total price

Started by ressel, November 23, 2007, 20:35:42 PM

Previous topic - Next topic

ressel

Hello everyone,

I was thinking, isn't it possible to do something like this:

I tried to make this "link" button that will auto fill a payment form at the site ewire, with price, and subject = orderid, shouldn't it be possible?

The only thing i need is the price to be correct.

So what i need is the total price in this format how can i make the at:
2123.25 = 2123,25 in form: = (TransactionEmail_Amount=2123%2C25&)
decimal = , = ( %2C )

<?
$subtotal = $db->f("order_subtotal");
$orderid = $db->f("order_id");
$email = $user->email;
?>

<a target="_blank" href="https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=shop%40ybmail%2Edk&amp;TransactionEmail_Name=minBNC&amp;TransactionEmail_Subject=<? print "$orderid"; ?>&amp;TransactionEmail_Message=<? print "$email"; ?>&amp;TransactionEmail_Amount=<? print "$subtotal"; ?>&amp;TransactionEmail_Currency=DKK&amp;TransactionEmail_AllowChange=30&amp;TransactionEmail_ViewEmail=1">
<img src=/images/stories/ewire.gif></a>

ressel

Doesn't anyone in here know how i can convert the price??

ressel

Its maybe not the best solution, but it works :D

<?
$subtotal = $db->f("order_subtotal");
$tax = $db->f("order_tax");
$discount = $db->f("order_discount");
$newsubtotal = $subtotal + $tax - $discount;
$orderid = $db->f("order_id");
$email = $user->email;
$newprice = str_replace(".","%2C",$newsubtotal);
?>
Husk at kontrollere at prisen er korrekt indtastet hos ewire!<br>
<a target="_blank" href="https://secure.ewire.dk/payment/email.asp?TransactionEmail_Emailaddress=shop%40ybmail%2Edk&amp;TransactionEmail_Name=minBNC&amp;TransactionEmail_Subject=<? print "$orderid"; ?>&amp;TransactionEmail_Message=<? print "$email"; ?>&amp;TransactionEmail_Amount=<? print "$newprice"; ?>&amp;TransactionEmail_Currency=DKK&amp;TransactionEmail_AllowChange=30&amp;TransactionEmail_ViewEmail=1">
<img src=http://www.ybnet.dk/images/stories/ewire.gif></a>