News:

Support the VirtueMart project and become a member

Main Menu

new payment modules

Started by infragreg, June 30, 2005, 14:57:00 PM

Previous topic - Next topic

infragreg

Hi all

Just a quick question. It would appear that there are not many payment modules for mambo-phpshop. Very few in fact when compared to other shopping carts.

Also when peopl try to build one, or integrate one, or try to get some help, there's not too many solutions or assistance.

I'm not pointing a finger at Soeren :) He's busy enough as it is with making the cart brilliant :)

Neither am I pointing the finger at anyone else. I'm just wondering how the people who are trying to get help, or are trying to build a new payment module, get to solve their problems. Or if they ever do? Or if they get paid help, etc, etc.

So. What do people do?

thanks all

qazazz

#1
*bump

actually I've searched the forum for help with retrieving cart items since my payment module "requires" the cart...

Soeren

Hello,

there's a wonderful Developer Manual available. I wonder if you have already consulted it?
See Downloads => VirtueMart => Documentation.
The future of eCommerce: VirtueMart & Joomla!
http://virtuemart.net

qazazz

#3
Actually yes! Though I do admit I haven't even tried to write the module yet.. The reason why is becuase I _know_ I'll need the cart content. That's why I've searched and searched the forum for how to extract/retrieve/get the cart items but nowhere it says how or what the correct variables look like, like $db->f("order_id") or $db->f("order_total").

In the manual I found this:
process_payment(String $order_number, Float $order_total, Array &$d)

And the array-part looks kind of interesting but I don't know what it is. Is "&$d" what I'm looking for? Is that the cart content?


My bad! I'm not implementing a direct connection so now I'm back to square one

Thank you!

qazazz

#4
ok, so here I'm again :)


$TellusPayID = 56xxxxxx;
$OrderNo = urlencode($db->f("order_id"));

$Data = "10:Glass:1:1000,14:Klubba:2:1500";

/* $Data should actually be something like this:

for($i=0;$i less_than count($cart);$i++) { I really don't understand why less_than_char f**ks the post up? really annoying

  $item = $cart[$i];

  $Data .= $i greater_than 0 ? "," : "";
  $Data .= urlencode($item['productCode']);
  $Data .= ":".urlencode($item['name']);
  $Data .= ":".urlencode($item['quantity']);
  $Data .= ":".urlencode($item['price']);

}
*/

$shipping = $db->f("order_shipping");
$tax = $db->f("order_tax");
//$tax_sats = "25";
$TotalSum = $db->f("order_total");

$ExtraData = '';
$TransactionType = "1";
$ISOLanguage = "SE";
$ISOCurrency = "752";
$DirectCapture = "0";

$Email = urlencode($user->email);
$FirstName = urlencode($user->first_name);
$LastName = urlencode($user->last_name);
$Address = urlencode($user->address_1." ".$user->address_2);
$ZipCode = urlencode($user->zip);
$City = urlencode($user->city);
$Country = urlencode($user->country);
$ID = "";
$IP = urlencode("127.0.0.1");

// Check the manual for additional data types / flags

$URL = "http://unix.telluspay.com/Add/?TP01=$DirectCapture&TP700=$TellusPayID&TP701=$OrderNo&TP740=$Data&TP901=$TransactionType&TP491=$ISOLanguage&TP490=$ISOCurrency&TP801=$Email&TP8021=$FirstName&TP8022=$LastName&TP803=$Address&TP804=$ZipCode&TP805=$City&TP806=$Country&TP8071=$ID&TP900=$IP&TP950=$ExtraData&TP5411=$shipping&TP5412=$tax&TP5413=$tax_sats&TP40=$TotalSum";

$handle = fopen ($URL, "r");
$TellusPay_Key = fread($handle, 1000000);

//print $TellusPay_Key;

header("Location: https://secure.telluspay.com/WebOrder/?$TellusPay_Key");


now the only thing that misses here is the cart info :<

simovina

Quote from: Soeren on December 02, 2005, 09:34:02 AM
Hello,
there's a wonderful Developer Manual available. I wonder if you have already consulted it?
See Downloads => VirtueMart => Documentation.

Hi there, I was looking on this manual and didn't make it cleary to understand lots of things.
Some of them like, what comes into ps_newname.php files and what comes to configuration boxes, it's really small explanations thats only scratch the surface, documentation for this part of dev should be improved, on the other hand it's really hard to find even payed support for this type of development.