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

Paygate Payment module (South Africa)

Started by buddha, March 16, 2006, 12:36:26 PM

Previous topic - Next topic

buddha

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]

buddha

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

buddha

#2
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

buddha

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

buddha

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

buddha

#5
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

buddha

WOW... not 1 reply...

great stuff...

-buddha

(i'll try myself... but i'm needed some direction...)

scud

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


buddha

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..

scud

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

buddha

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

gamma911

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..

ecddesigns

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.

duan

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>

Firestar

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...