VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Payment Modules => Topic started by: buddha on March 16, 2006, 12:36:26 PM

Title: Paygate Payment module (South Africa)
Post by: buddha on March 16, 2006, 12:36:26 PM
Hey there peeps,

Ok, i'm needing a little help with the dev of a module for this... i'm sure i can work it out... but i just need to know from u guru's weather this is possible b4 i start an journey that has no end...

Its for a CC module (Duh) and yeah... let me know what u think. Attached is the documentation that they gave me...

(for virtumart ... haha)

-buddha

[attachment cleanup by admin]
Title: Re: Paygate Payment module (South Africa)
Post by: buddha on March 19, 2006, 09:22:46 AM
ok... erm... i'm struggling here a bit... they are now having the whole CC PIN system from visa/mastercard implimented...

so i'm going to have to create another field in the CC module so that they can add their CC details in.

is all this possible or am i wasting my time with virtumart? should i go back to osCommerce? Not trying to cause waves... but got a deadline to look forward to ;)

thanks for any help/advice/ideas/direction..

-buddha
Title: Re: Paygate Payment module (South Africa)
Post by: buddha on March 29, 2006, 12:21:31 PM
Hey,

ok i'm struggling through this 1... but making a bit of progress i think... Now i'm trying to make the MD5 checksum for the service.. and i'm stuck ... this is their req:

All fields are separated with a pipe (the | character) to form the source of the MD5 hash:
PAYGATE_ID|REFERENCE|AMOUNT|CURRENCY|RETURN_URL|TRANSACTION_DATE| KEY

So i'm trying to build a php function to make this ... and thats where i'm stumped...

<?php
$md5_code ="";

$str = '10011013800|<?php echo $ordernumber?>|<?php echo $without_full_decimal?>|ZAR|/index.php?page=account.order_details&order_id=<?php echo

$ordernumber?>&option=com_virtuemart&Itemid=1|<?php echo $current_time?>|RX_Iscool';

$md5_code = (md5($str)

?>

<form action="https://www.paygate.co.za/paywebv2/process.trans" method="post">
                    <input type="hidden" name="PAYGATE_ID" value="10011013800">
                    <input type="hidden" name="REFERENCE" value="<?php echo $db->f("order_id") ?>" />
                    <input type="hidden" name="AMOUNT" value="<?php echo $db->f("order_total") ?>" />
                    <input type="hidden" name="CURRENCY" value="<?php echo $_SESSION['vendor_currency'] ?>" />
                    <input type="hidden" name="RETURN_URL" value="/index.php?page=account.order_details&order_id=<?php echo $ordernumber?>&option=com_virtuemart&Itemid=1">
                    <input type="hidden" name="TRANSACTION_DATE" value="<?php echo $current_time?>">
                    <input type="hidden" name="CHECKSUM" value="<?php echo $md5_code?>">
                    <br />
                    <input type="submit" value ="PROCEED TO PAYMENT PAGE" />
                    </form>

would that work? would that generate the right thing?

thanks for any advice

-buddha
Title: Re: Paygate Payment module (South Africa)
Post by: buddha on April 04, 2006, 10:38:45 AM
Ok... i've worked it out that the payment modal opens up the CC page and submits the details safe and securly...

NOW how do i go about recieving the info from them? They send back the info like so:

<html>
<head>
<title>PayGate::PayWebv2 Response Sample</title>
</head>
<body>
<form action=" http://www.mywebsite.com/thanks.php" method="POST" >
<input type="hidden" name="PAYGATE_ID" value="10011013800">
<input type="hidden" name="REFERENCE" value="Customer1">
<input type="hidden" name="TRANSACTION_STATUS" value="1">
<input type="hidden" name="RESULT_CODE" value="990017">
<input type="hidden" name="AUTH_CODE" value="015867">
<input type="hidden" name="AMOUNT" value="3299">
<input type="hidden" name="RESULT_DESC" value="Auth Done">
<input type="hidden" name="TRANSACTION_ID" value="5975624">
<input type="hidden" name="CHECKSUM" value="252875624f8536b75de0a66e4b030b75">
</form>
</body>
</html>


How would i go about catching this and then using the data to chekc weather the order is authorised or not etc...

Thanks for any help...

-buddha
Title: Re: Paygate Payment module (South Africa)
Post by: buddha on April 18, 2006, 09:34:49 AM
Ok, i've got the joomla site connection with the payent provider, and they can read all the right data.... now i goto get their response...

here is what i was thinking... ok, do i modify the page that the payment provider sends me to (being the order details page) and then modify the php for that page to make the changes that i want? ie, change the db saying order is processed, failed.. .etc...

would that be the best way?

and where do i find this 'page' to edit?

Shots for the direction...

-buddha
Title: Re: Paygate Payment module (South Africa)
Post by: buddha on April 18, 2006, 14:38:08 PM
OK! i worked out the issue.. now i'm going to need to make these values change in the joomla db when the user lands back on the site... This is how the data looks from the Payment provider...

can ANY1 please hint me to the right direction to adding the info the db.... or atleast a little hint? ;)


<html>
<head>
<title>PayGate::PayWebv2 Response Sample</title>
</head>
<body>
<form action=" http://www.mywebsite.com/thanks.php" method="POST" >
<input type="hidden" name="PAYGATE_ID" value="10011013800">
<input type="hidden" name="REFERENCE" value="Customer1">
<input type="hidden" name="TRANSACTION_STATUS" value="1">
<input type="hidden" name="RESULT_CODE" value="990017">
<input type="hidden" name="AUTH_CODE" value="015867">
<input type="hidden" name="AMOUNT" value="3299">
<input type="hidden" name="RESULT_DESC" value="Auth Done">
<input type="hidden" name="TRANSACTION_ID" value="5975624">
<input type="hidden" name="CHECKSUM" value="252875624f8536b75de0a66e4b030b75">
</form>
</body>
</html>


Also.. how do you get the data out of the checksum again? to check that its right? or do you just create another checksum with the values sent, and then compare it to their checksum?

Thanks for any help

-buddha
Title: Re: Paygate Payment module (South Africa)
Post by: buddha on April 25, 2006, 12:54:55 PM
WOW... not 1 reply...

great stuff...

-buddha

(i'll try myself... but i'm needed some direction...)
Title: Re: Paygate Payment module (South Africa)
Post by: scud on May 03, 2006, 11:56:16 AM
buddha

I'm based in SA and looking to use a local payment module to develop local eccomerce sites. Do you know if there are any other modules available for other SA payment gateways?

i'll let you know how i get on

cheers
scud

Title: Re: Paygate Payment module (South Africa)
Post by: buddha on May 03, 2006, 12:19:35 PM
Quote from: scud on May 03, 2006, 11:56:16 AM
buddha

I'm based in SA and looking to use a local payment module to develop local eccomerce sites. Do you know if there are any other modules available for other SA payment gateways?

i'll let you know how i get on

cheers
scud



hey scud! nice 2 hear from a fellow SA on the forum....

well...u want a payment gateway for joomla? or for osCommerce? cos there is an oscommerce one for paygate... and some other gateways... but then u need to use oscommerce.. and i'm sick of it... virtumarts is WAY better... but i'm really struggling with it.. so when i 've finished i'll pm it 2 u... so if u want to mod it for your site u are more welcome....

l8ter..
Title: Re: Paygate Payment module (South Africa)
Post by: scud on May 03, 2006, 13:13:32 PM
hi buddha
that would be great, i'd really appreciate the mod - i can even help test it if you like?
joomla/virtuemart looks far beter to me, never liked oscommerce much!

scud
Title: Re: Paygate Payment module (South Africa)
Post by: buddha on May 10, 2006, 13:08:49 PM
Ok.. i've moved on andnow got the response from the payment provider to use...

i've got the data from them and now need to basically connect to the joomla db and effect the changes.

NOW ... my mySQL isnt as snappy as i would like... so can some1 tell me how the hell u would do this? i need to basically effect a query 2 the db that will go into order 33 (for example) and set its status to failed, processed... etc...

can some1 help please?

thansk!

-buddha
Title: Re: Paygate Payment module (South Africa)
Post by: gamma911 on May 11, 2006, 13:28:29 PM
Well looked like you were crazy the first few posts talking to yourself! Im also from SA but based in the UK.

need to implelemt VM with PROTX but when they send back the crypt or data It does not update the database.

So Basically looking for the same info as to what calls are made to the DB and where so it can change the Order status etc..
Title: Re: Paygate Payment module (South Africa)
Post by: ecddesigns on June 09, 2006, 13:38:48 PM
HI buddha,
Have you had any luck with the paygate system?
Is it possible to get a copy from you if you have or what you have done sofar maybe i cn finish it with you.

another payment processor avail for SA is setcom at www.setcom.com, work on a similar basis to paygate.
Title: Re: Paygate Payment module (South Africa)
Post by: duan on June 21, 2006, 08:27:16 AM
This is the form post for Setcom if anyone is interested...



<FORM METHOD="POST" ACTION="HTTPS://www.setcom.com/secure/index.cfm">
<INPUT TYPE="HIDDEN" NAME="ButtonAction" VALUE="buynow">
<INPUT TYPE="HIDDEN" NAME="MerchantIdentifier" VALUE="xxxxxxxxxxxxxxxx">
<INPUT TYPE="HIDDEN" NAME="CurrencyAlphaCode" VALUE="ZAR">
<INPUT TYPE="HIDDEN" NAME="LIDSKU" VALUE="www.         .za"
<INPUT TYPE="HIDDEN" NAME="LIDDesc" VALUE="Online purchase"
<INPUT TYPE="HIDDEN" NAME="LIDPrice" VALUE="<?php echo $db->f("order_total") ?>">
<INPUT TYPE="HIDDEN" NAME="LIDQty" VALUE="1">
<INPUT TYPE="SUBMIT" VALUE="Make Payment Now">
</FORM>
Title: Re: Paygate Payment module (South Africa)
Post by: Firestar on July 04, 2006, 23:33:47 PM
Another SA'er here.

My advice is to stay away from Setcom. I've been using them for about 10 months now, and decided to switch them off before I could manage to implement a new payment gateway, due to the problems that they caused us. They change their system without notifying you and then all of a sudden your gateway doesn't work, and you don't know why. Then, when your customers ask them what the hell is going on, they say that it's your system that is at fault.

Nasty stuff. I've also looked at paygate. Not going with them, though. There are a few other options, actually. Iviri is one from Nedbank. There is Virtual Card Services (www.vcs.co.za) as well as a few others. Best is to speak to the banks (although it's a mission to get put through to the right department with them). Ask for the internet merchants department. That worked for me. They have their "approved" gateways. You really want to go with their preferred one, depending on which bank you're with. That's my advice. FNB uses Setcom, but I'll stay far away from Setcom...
Title: Re: Paygate Payment module (South Africa)
Post by: swacks on July 09, 2006, 16:19:19 PM
I'm hacking pricetag.co.za  for virtuemart

Dont know what to put in the url side of the merchant login to get it to update the vm cart

anyone done this one

Title: Re: Paygate Payment module (South Africa)
Post by: trek_mambo on July 12, 2006, 21:01:03 PM
Hi guys, thanks for the only VirtueMart support for South Africans because I myself am newbie and getting the payments processed is an headache. I don't even fully understand PHP, so I would grandly appretiate if you guys could post links to mods that maight make life easier for South African Merchants. Is there a SA forum that also discusses VirtueMart or are we alone? Yeah just getting the Clerks at SA Banks to set you up a Online Merchant Acount is a headache. Can someone please give one difinitive Bank to go with and then their payment gatway? I know that is asking alot but I really would do anything to get VirtueMart working so that I don't have to work with MWeb's SafeShop (keeping costs low).

Thanks 
Title: Re: Paygate Payment module (South Africa)
Post by: swacks on July 13, 2006, 00:26:49 AM
i'm looking  to integrate pricetag.co.za with virtuemart, its all working except for the return url back from the bank ,i dont quite know where this should be directed to so that it updates the cart properly.

currencies also worry me because virtuemart has no currency selector
Title: Re: Paygate Payment module (South Africa)
Post by: Uriel on December 12, 2006, 18:10:55 PM
Hi Budha did you ever completely succeed in the integration of Secom & Virtue Mart ?

Quote from: buddha on March 16, 2006, 12:36:26 PM
Hey there peeps,

Ok, i'm needing a little help with the dev of a module for this... i'm sure i can work it out... but i just need to know from u guru's weather this is possible b4 i start an journey that has no end...

Its for a CC module (Duh) and yeah... let me know what u think. Attached is the documentation that they gave me...

(for virtumart ... haha)

-buddha
Title: Re: Paygate Payment module (South Africa)
Post by: Uriel on December 12, 2006, 18:16:08 PM
Hi there people,

has anyone managed either of the 2 payment systems spoken about in here ? Setcom or Pricetag?
Could you please tell me how if you cracked it ? One more question, would Setcom & Paygate be the only 2 payment gateways where you dont need a Bank Merchant Account ? :-\
Title: Re: Paygate Payment module (South Africa)
Post by: Charl Fourie on April 19, 2007, 19:23:45 PM
Hi there

I have created and released a payment module for Paygate (a South African payment gateway) in February 2007 which works well.  The following link should take you to the right place... http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=25522.0