News:

Looking for documentation? Take a look on our wiki

Main Menu

DPS Payment Module - NZ and Australia

Started by sampipe, February 08, 2006, 21:24:40 PM

Previous topic - Next topic

sampipe

Hi All,

DPS is a payment processor that run in NZ and Australia into most of the major banks (dps.co.nz). I've created a payment module that interfaces into their HTTPS POST gateway.  Thought someone might like to use it if they are building shops over this side of the world.  It's straight forward to install (README included).

It currently only supports the use of CURL (not fput) so CURL will need to be installed on the server (most have this now).

Let me know if anyone uses it (just for my own satisfaction!  ;D )

Good luck!
Sam

Added:
The payment module is used to integrate to the DPS PXPOST service.
http://www.paymentexpress.com/default.asp?id=p_pxpost
http://www.paymentexpress.com/blue.asp?id=d_pxpost


[attachment cleanup by admin]

lucion

#1
Excellent!  Glad to see someone has finally done this!! :)

Has anyone else applied this succesfully?  Any problems?

Also, why don't you submit this to be added to the downloads section of this site?

Bevan/
http://lucion.com.ar
--
the brain is like a computer · there really aren't any stupid people · just people running Windows

centralpulse

#2
Hi Sam,
There are a couple of minor bugs in the module.

There's an issue in regards with the 'Credit Card Code' as VirtueMart calls it. VirtueMart is demanding this field be entered so in the ps_dps.cfg.php file the line
define ('DPS_CHECK_CARD_CODE', 'NO'); I needed to change it to define ('DPS_CHECK_CARD_CODE', 'YES'); 

The other thing is in ps_dps.php, the path to DPS should be https://www.paymentexpress.com/pxpost.aspx, the line you have is https://www.payment.co.nz/pxpost.asp - it probably changed in the time you wrote the module.

Otherwise it seems to work well on my testing account... the only thing would be an easier merchant reference and optional reference field for the consumer but these aren't big issues.

Thanks heaps for this... It's going to make my life heaps easier rather then having to sell clients on moving from DPS to WorldPay or 2CO!

Cheers,
Ryan  8)

centralpulse

I just checked with DPS and there are a few other things that either need to be changed or can be changed.

DPS LOGO
This doesn't need to be linked back to the DPS website but can be if you wish. The logo can be altered slightly but it must be ledgible. You can also put text around the logo like 'Secure payment processing provided by'

DPS PRIVACY POLICY
There needs to be a clear link to the DPS privacy policy located at http://www.paymentexpress.com/privacypolicy.htm

VISA/MASTERCARD LOGOS
DPS does not have the requirement for these logos to be visable but your bank or merchant account provider may require this.

Cheers,
Ryan  8)

w_d_o_a

Please be aware, i have just found out that if your Merchant account is with Westpac, they will not accept you using pxpost for credit card processing, you must use PXAccess or PXPay. DPS are releasing some development php code for PXPay. The have given me a copy, and i intend doing some work on this as a virtuemart module. If anyone wants a copy of the DPS sample code please let me know.

Cheers


Stuart

w_d_o_a

Quote from: weasel on June 13, 2006, 13:37:49 PM
Hi Stuart,

I look forward to seeing your work for a PXPay module.
Keep us posted.

Cheers

Rick

As soon as they give me my development account user details, i will get on with it. I am not sure if you reallty want to see my work lol, i reckon it will be the base for someone else to create a good module  :D, please be aware, i will be bodging up DPS's code and your code horribly :o ;D

w_d_o_a

Ok i got my development details. I have managed to test and get working using their sample code (not integrated into VM) ok.
Then....
Using sampipe's excellent work above I have managed to get the configuration part working, i.e. it can be setup and added as a new payment module in the backend. The hard part at the moment is the actual credit card processing, sampipe's module uses a model which displays a form for the user to enter their credit card details and then posts this to DPS , the pxAccess method i am trying to use, takes you to a hosted payment page, after encrypting MY user details, payment amount etc. If anyone could help, or tell me which existing payment method to use as a model i would really appreciate it.

someone to collaborate would be great

p.s. i have 28 days before i have to pay DPS and go live  ;D

Joseph Bell

#7
Hey w_d_o_a ... got the same issue here! :-P

Spent the last week doing my own PxPost module...got it working then told client to set up DPS account for us to go live...then the bad news...

Yeah, you got it!... He is also a Westpac customer! |-(

Lost a whole weeks work 'cos of stupid dicks! DPS recons PxAccess should be easier to integrate...Yeah, right!

Got it semi working, as in the admin, and pxaceess_extrainfo stuff... but stuck on the notify file now, blah!  8-P 

Any help would be good...

Though I heard(?) somewhere that Geoff at Attitude would do the module and release under GPL for $500NZD?!

... at this stage, due to losing a week, and the prospect of spending another whole week on this I would love to split this cost with someone(or two) and just be done with it...any takers?

w_d_o_a

i have been collaberating with sampipe on a pxaccess mo0dule, he is doing most of the work, he may be willing to post whta he has already done here. It is at the notify stage too

Joseph Bell

Sampipe's PxPost module was a bit more elegant than mine...I'm just a code hacker ;-P

Love to see what you are up to sampipe...any posts and/or code would be great. It would be nice to get this completed so we can all get on with more constructive things.

i will help as I can... but as I said, I'm just a code hacker, and not very elegant.  ;-)   hey admin...no smilies on this board?!

sampipe

Hey Joe.. Stu...

Sorry.. been a bit quiet on this for a while... as Stu said we've been puting something together... I'll post the code tonight at a "as is" state for you to have a look at it... its allmost there.... (I would do it now but the ither job is calling  ;) )

Sam

sampipe

#11
Hey Joe, Stu,

As promised here is the 'as is' payment module for DPS PXAccess "hosterd page" solution.  There is still al little work to be done on it to get it finished...

  • Order status need to be made to update correctly throughout the purchase process.  i.e. once the VM order part is finished (just before you are forwarded to DPS) the order must be set to a status of 'pending (or whatever you set in the module), and in turn the appropriate email sent to the customer.  On return to VM after the payment, the order status is set to 'Confirmed' or 'cancelled' depending on what the response from the hosted payments page was... and then the appropriate 'order updated' email set to the customer to finalise the order...
  • The emails may need to be modified to fit the above scheme..
  • Debug removed from the results page...

I've put teh order status' stuff intop the payment module so tha they can be editied butI haven;t yet gone into the purchase process to verify that they are working or not working etc...

Keep me updated if you end up finishing this or getting it working as I probably won't get around to looking at it again until the weekend...

good luck!.
Sam


[attachment cleanup by admin]

w_d_o_a

sam could you please take my dev details out of the config file ;)

sampipe

Sorry... :o    my mistake .. done.. 

w_d_o_a

i have added a couple of lines to checkout.dpsax_result.php

after line 123
$query = "UPDATE jos_vm_order_payment SET order_payment_log = '".$responseTest."', ";
$query .= "order_payment_trans_id = '".$dpsTxnRef."' WHERE order_id = '".$order_id."'";

mysql_query($query);


and after about new line 162, just after the <?php

$query = "UPDATE jos_vm_order_payment SET order_payment_log = '".$responseTest."', ";
$query .= "order_payment_trans_id = '".$dpsTxnRef."' WHERE order_id = '".$order_id."'";

mysql_query($query);

This updates the jos_vm_order_payment table with the DPS transaction result, and the dpstxnref
if anyone would like to tidy that up, that would be cool  ;D