VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Payment Modules => Topic started by: sampipe on February 08, 2006, 21:24:40 pm

Title: DPS Payment Module - NZ and Australia
Post by: sampipe on February 08, 2006, 21:24:40 pm
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]
Title: Re: DPS Payment Module - NZ and Australia
Post by: lucion on April 13, 2006, 04:18:32 am
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/
Title: Re: DPS Payment Module - NZ and Australia
Post by: w_d_o_a on May 03, 2006, 00:13:28 am
excellent, exactly what i have been looking for  :) :) :)
Title: Re: DPS Payment Module - NZ and Australia
Post by: centralpulse on May 15, 2006, 14:37:50 pm
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
Code: [Select]
define ('DPS_CHECK_CARD_CODE', 'NO'); I needed to change it to
Code: [Select]
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)
Title: Re: DPS Payment Module - NZ and Australia
Post by: centralpulse on May 16, 2006, 06:45:29 am
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)
Title: Re: DPS Payment Module - NZ and Australia
Post by: w_d_o_a on June 13, 2006, 08:28:42 am
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
Title: Re: DPS Payment Module - NZ and Australia
Post by: 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
Title: Re: DPS Payment Module - NZ and Australia
Post by: w_d_o_a on June 13, 2006, 13:48:45 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
Title: Re: DPS Payment Module - NZ and Australia
Post by: w_d_o_a on June 15, 2006, 12:11:32 pm
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
Title: Re: DPS Payment Module - NZ and Australia
Post by: Joseph Bell on June 19, 2006, 10:11:52 am
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?
Title: Re: DPS Payment Module - NZ and Australia
Post by: w_d_o_a on June 19, 2006, 22:02:56 pm
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
Title: Re: DPS Payment Module - NZ and Australia
Post by: Joseph Bell on June 19, 2006, 22:29:55 pm
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?!
Title: Re: DPS Payment Module - NZ and Australia
Post by: sampipe on June 20, 2006, 00:28:44 am
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
Title: Re: DPS Payment Module - NZ and Australia
Post by: sampipe on June 21, 2006, 00:03:07 am
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...

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]
Title: Re: DPS Payment Module - NZ and Australia
Post by: w_d_o_a on June 21, 2006, 00:05:43 am
sam could you please take my dev details out of the config file ;)
Title: Re: DPS Payment Module - NZ and Australia
Post by: sampipe on June 21, 2006, 00:19:03 am
Sorry... :o    my mistake .. done.. 
Title: Re: DPS Payment Module - NZ and Australia
Post by: w_d_o_a on June 21, 2006, 02:30:13 am
i have added a couple of lines to checkout.dpsax_result.php

after line 123
Code: [Select]
$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

Code: [Select]
$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
Title: Re: DPS Payment Module - NZ and Australia
Post by: Joseph Bell on June 21, 2006, 03:56:34 am
Hey sampipe

Thanks for the files. We seem to be on the same track, just a slightly different approach. (must be my sad coding skills ;-P)

What do you have in your extrainfo field in the payment module admin?...this is the only way I see to get the redirect from the confirmation page to the hosted payment page...
Title: Re: DPS Payment Module - NZ and Australia
Post by: w_d_o_a on June 21, 2006, 04:19:39 am
a quick bug fix from sampipe

in checkout.dpsax_result.php line somewhere after line 125 replace
Code: [Select]

else( $statusRequired=="1" )

with

Code: [Select]
else( $statusRequired=="1" || $success=="0" )

You also need to remove the break; around line 150 from
Code: [Select]
echo "Error: Transaction declined"; break;

now it works perfectly!!! ;) ;D ;D ;D ;D
Title: Re: DPS Payment Module - NZ and Australia
Post by: sampipe on June 21, 2006, 05:25:17 am
Hey Joe... its all in zip package that I uploaded... the README has the instructions on how to create the payemnt module in VM and the code to put in the extrainfo box...

Sam
Title: Re: DPS Payment Module - NZ and Australia
Post by: Joseph Bell on June 21, 2006, 07:18:09 am
WhooHooo!

Just didn't get a few things 8-P
Thanks for the fixes...almost had it myself but was still getting a handle on how you did things.

testing tonight...will update you is any issues.

thanks.
Title: Re: DPS Payment Module - NZ and Australia
Post by: Joseph Bell on June 21, 2006, 09:39:08 am
Success page layout needs some work to tie in with current VirtueMart layout...I will do that tomorrow.

Also need to address the email issue...too many for the customer...one missing for admin...will work on that tomorrow too.

J.

Admin: got smilies back!...cool  ;D
Title: Re: DPS Payment Module - NZ and Australia
Post by: w_d_o_a on June 21, 2006, 09:48:15 am
glad you got it going too.

Thats what i planned for tomorrow, removing unnecessary info on result page.

I get the correct number of emails for the customer, but am one short to admin when the card is approved and the order status is changed. Is this what you mean?

p.s. all i need now is westpac to give me my merchant number and pay dps and i go live :D
Title: Re: DPS Payment Module - NZ and Australia
Post by: Joseph Bell on June 21, 2006, 22:19:13 pm
Ditto...got the dev account so just need to have the other side approved and we're off.

Great work sampipe.  :-*

Now all I have to do is convert the entire 3 years of forum posts from NewBB (Xoops) to SimpleBoard... yuk.  :P
Title: Re: DPS Payment Module - NZ and Australia
Post by: Joseph Bell on June 21, 2006, 23:06:52 pm
Ooops!...

need to add this at the end of ps_dpsax_result.php
Code: [Select]
?>
    <br />
     <p><a href="index.php?option=com_virtuemart&page=account.order_details&order_id=<?php echo $order_id ?>">
     <?php echo $VM_LANG->_PHPSHOP_ORDER_LINK ?></a>
     </p>
<?php
?>
Title: Re: DPS Payment Module - NZ and Australia
Post by: Joseph Bell on June 22, 2006, 00:36:46 am
Decided this was a better way since they had already had the DPS success page...justa added it after line 127
Code: [Select]
mysql_query($query);
add:
Code: [Select]
?>
<script language="JavaScript" type="text/javascript">
location.replace('index.php?option=com_virtuemart&page=account.order_details&order_id=<?php echo $order_id ?>');
</script>
<?php

Added here to keep failure page.
Title: Re: DPS Payment Module - NZ and Australia
Post by: screamingweasel on July 14, 2006, 07:08:00 am
Hi,

I have just been directed to this forum topic by DPS after I stumbled on an earlier disscussion on this matter. I am only a few days away from having my DPS account open and being ready to test your module, so was wondering if any further work has been done since your last post. If not then I will happy download the file and make the recommended changes and see how things go.

Looks like I missed out on being of some use by a matter of weeks.

Thanks for making your work available.

Craig
Title: Re: DPS Payment Module - NZ and Australia
Post by: wildweasel007 on August 14, 2006, 05:31:00 am
Hi,

New to all this and trying to set up the DPS payment module via Joomla v1.0.10 and virtuemart v1.0.6.  Upon saving the new payment method in the virtuemart shop backend as described in the readme I get  the following errors:

Warning: add(/home/atecconz/www/administrator/components/com_virtuemart/classes/payment/ps_dps.php): failed to open stream: No such file or directory in /home/atecconz/www/administrator/components/com_virtuemart/classes/ps_payment_method.php on line 174

Warning: add(): Failed opening '/home/atecconz/www/administrator/components/com_virtuemart/classes/payment/ps_dps.php' for inclusion (include_path='.:/usr/share/pear') in /home/atecconz/www/administrator/components/com_virtuemart/classes/ps_payment_method.php on line 174

Does anyone have any ideas on why this may happen or are there any updated module files in existance?

Cheers
Title: Re: DPS Payment Module - NZ and Australia
Post by: adrianjwright on August 14, 2006, 06:49:55 am
Hi wildweasel,

longshot, but...

did you susccessfully copy up all the code / files to your server? I had a prob a while back because the owner of the directory was 'nobody', so ftp'ing the files failed (I must have been dozing at the time  ;) ) - and I ended up with an error that looked similar to the one you posted.

could be wrong though!

adrian
Title: Re: DPS Payment Module - NZ and Australia
Post by: wildweasel007 on August 14, 2006, 09:17:18 am
Thanks Adrian,

I must be dozing myself as my FTP wasn't getting the files there due to permissions.  I've installed JoomlaXplorer and uploaded the files that way.  The install went fine, now just to set up the DPS account and go.

Cheers
Title: Re: DPS Payment Module - NZ and Australia
Post by: wildweasel007 on August 25, 2006, 11:38:38 am
Hi,

I have installed the payment module, made the changes to the files listed on this forum and establsihed a test account via DPS with ID's etc.  I am using a hosted payments page from them.

However when trying to order a product via VirtueMart as a test it all goes fine up to the checkout.  Once it goes to the hosted dps page I get the following error.

This is an unexpected token. The expected token is 'EndElement'. Line 1, position 2.

Does anyone have any ideas as to what this is.  Unfortunalty I'm not a php coder, but in theory apart from the forum updates, nothing has changed to the zip files.

Any help would be appreciated.

Cheers
Title: Re: DPS Payment Module - NZ and Australia
Post by: sampipe on September 09, 2006, 12:39:37 pm
Hi All,

Sorry this has taken soo long but I've finally got around to tidying up the half finished code that I posted a while back.... judging by the number of people who I've helped out getting it the half finished version running it sure could have come sooner !  ;D

Therefore, please see the attached DPS PXAccess Virtuemart module.. This should be a working model now!..

Let me know if anyone has success.... or improvements that can be made.

thanks!
Sam

[attachment cleanup by admin]
Title: Re: DPS Payment Module - NZ and Australia
Post by: GollumX on September 10, 2006, 02:30:39 am
Sam

Jus downloaded this... if it works ... you're a bloody hero

**bows down in respect**

**scoots off to test new module**
Title: Re: DPS Payment Module - NZ and Australia
Post by: Don Gould on September 19, 2006, 01:58:15 am
This goes double for me!  You're a local hero!

I've got a client who's been stitched up with some propiratry asp crap that we can't even modifiy to look half decent!

This is going to let me swap him over to GPL platform with none of the crap!

Thank you very much!

Please let us know who we should be supporting?

Cheers Don

Title: Re: DPS Payment Module - NZ and Australia
Post by: Don Gould on September 21, 2006, 12:40:25 pm
TIP
---
To make VirtueMart accept a test 4111111111111111 credit card number change the following file:
   ps_checkout.php
   search for the words 'VISA Testnumber'
   
   Change the false to true
   Code:
   if (!$this->validate_payment_method($d, true)) { //Change false to true to Let the user play with the VISA Tes
   


The function validate_payment_method appears more than once in the file ps_checkout.php

I changed it as recommended and still had problems.

I then found the second use of validate_payment_method and changed that call as well and I was then able to use the DPS module just fine!

Thanks to all for a fantastic bit of work!!!

Cheers Don
Title: Re: DPS Payment Module - NZ and Australia
Post by: sampipe on September 21, 2006, 22:05:52 pm
Hey Don...

Glad to hear it worked!... I think that you actually have to change both instances of the validate_payment_method calls for it to accept the 411111111111111 number.. ... but its been a little while since I looked at it so I could be wrong...

Hope it helps you with your cart conversions!..

Cheers..
Sam
Title: Re: DPS Payment Module - NZ and Australia
Post by: Don Gould on September 22, 2006, 01:12:25 am
Hi Sam,

Yes you do have to change both instances.  I posted here to help the next person.  Your instructions in your download don't tell people to look for 2.  You actually have to search on the function name and not the info provided in your instructions. :)

It's all good!  My client was a little supprised when I called him at 10:30 last night to gloat that I got it going for him!

Cheers Don
Title: Re: DPS Payment Module - NZ and Australia
Post by: w_d_o_a on September 22, 2006, 04:47:54 am
Hey Don...

Glad to hear it worked!... I think that you actually have to change both instances of the validate_payment_method calls for it to accept the 411111111111111 number.. ... but its been a little while since I looked at it so I could be wrong...

Hope it helps you with your cart conversions!..

Cheers..
Sam


I still owe you a bottle of whisky  ;)
Title: Re: DPS Payment Module - NZ and Australia
Post by: Tyrone on February 07, 2007, 21:54:42 pm
Hi Guys,

Having a bit of a problem when returning from the DPS page using PXaccess module.

If the user is logged in when making the purchase the order confirmation page displays.

If the user is not logged in i.e the user for my shop does not have to validate user registration. Once they return from the DPS they get the following error "Failure in Processing the Payment (Order not found)"
I have tried all sorts and searched through the forum, nothing found. It's still in testing mode so please feel free to test it with the testing credit card number 4111111111111111. url http://www.bagsandluggage.co.nz/index.php (http://www.bagsandluggage.co.nz/index.php)

Cheers Guys
Title: Re: DPS Payment Module - NZ and Australia
Post by: Haylee on August 29, 2007, 05:16:32 am
Hi - just wondering if anyone knows how to set up the DPS transaction status notification to send to both the customer and the vendor? It currently just sends this notification to the customer, but my client wants a copy of this too.

Thanks so much :-)
Great module!!!
Title: Re: DPS Payment Module - NZ and Australia
Post by: w_d_o_a on December 05, 2007, 04:19:22 am
I will have a look first chance i get :-)
Title: Re: DPS Payment Module - NZ and Australia
Post by: Moofaster on February 27, 2008, 06:22:10 am
Hey Guys just changed server and have had client say when the make payment and it goes through no problem but when the click next to take them back to the site , which tells virtual mart that the order is a yes or nor it is give them a server error please contact server administrator and the email .  have had no problem up till changing , is there something the server is missing or a write directory problem happen
Title: Re: DPS Payment Module - NZ and Australia
Post by: Kaela on December 19, 2008, 22:39:24 pm
Hi everyone,

I realise this is an old thread but I am wondering if anyone can shed some light on a DPS issue.

I have just tested our website and it worked fine until I clicked to go back to my website after making a successful payment with DPS's Payment site. 

I then received this error message "Failure  Failure in Processing the Payment (Order not found)".

I logged into DPS and noticed that both my failed and successful URL's are http://ourwebsite.co.nz/administrator/components/com_virtuemart/classes/payment/ps_dpsax_notify.php and both bring up the same error.  I checked and the payment was made with DPS!

Before this happended I had logged into Virtuemart and picked the item I wanted to purchase, when I clicked my shopping cart it had unlogged me.  I logged back on and the item was then in my shopping cart and I could proceed with my purchase. 

Any help given would be greatly appreciated!
Michaela
Title: Re: DPS Payment Module - NZ and Australia
Post by: AndyNZL on March 07, 2009, 11:41:32 am
Is this script OK to use (its been 2 years since it was written) and was wondering if Westpac or DPS, or VM had changed stuff since then?
When I tried creating the payment type with these files I got ... Direct Access to this location is not allowed .. error, so I assume VM is alot tighter than it used to be?? Any Help greatly appreciated.
Title: Re: DPS Payment Module - NZ and Australia
Post by: JonathanNZ on March 07, 2009, 23:46:44 pm
Is this script OK to use (its been 2 years since it was written) and was wondering if Westpac or DPS, or VM had changed stuff since then?
When I tried creating the payment type with these files I got ... Direct Access to this location is not allowed .. error, so I assume VM is alot tighter than it used to be?? Any Help greatly appreciated.
How funny that two Kiwis are looking into this somewhat old payment module today.
I am also wondering if this still works?
A status update would be great. A few people above mentioned issues with returning to the VM site after a successful payment with DPS.

DPS refer people from their website to this thread for VM payment module... hence my suggestion that a status update would be a good idea.

Cheers,
Jonathan
Title: Re: DPS Payment Module - NZ and Australia
Post by: dl_mj12 on March 17, 2009, 04:03:51 am
Make that three kiwis...  :D How did you get on with this? Could you please let me know.
Title: Re: DPS Payment Module - NZ and Australia
Post by: AndyNZL on March 17, 2009, 04:44:13 am
Still waiting for a reply as well mate. Would be really handy to have this payment module, or someone who can update the old one with their knowledge of VM changes.  :-[
Title: Re: DPS Payment Module - NZ and Australia
Post by: dl_mj12 on March 17, 2009, 05:08:40 am
I have a site that needs this running by April. I'll keep in touch and let you know what I find :)
Title: Re: DPS Payment Module - NZ and Australia
Post by: dl_mj12 on April 15, 2009, 01:37:53 am
The original PXAccess code supplied by SamPipe along time ago is still working nicely, it required a few small changes but its working great...

I wanted to attach the module with my changes but the forum won't allow uploads atm (folder full? sort it out :P )

I have a zip file for anyone who wants it, contact me and I'll email it though. Once the forum is sorted I'll post it here.

I have included the original README file, follow this and you can't go wrong. :)
Title: Re: DPS Payment Module - NZ and Australia
Post by: krazeguy on April 16, 2009, 07:56:36 am
Have been following this thread for a long time, would appreciate if someone could send me a copy of the updates :)
Title: Re: DPS Payment Module - NZ and Australia
Post by: dl_mj12 on April 20, 2009, 23:59:35 pm
Like I said, PM me your contact details and I'll sent it through...
Title: Re: DPS Payment Module - NZ and Australia
Post by: shaughan on April 23, 2009, 01:36:34 am
Hiya, just PMed you, a copy of your work would be great, thanks  ;D
Title: Re: DPS Payment Module - NZ and Australia
Post by: dl_mj12 on April 23, 2009, 01:41:01 am
The forum is allowing uploads now, so here it is :) Enjoy...  :)

Follow the README file to get this working...
if for some reason its not working ???... follow the README file  ;D
If you still have issues then I may be able to help, PM me.

[attachment cleanup by admin]
Title: Re: DPS Payment Module - NZ and Australia
Post by: shaughan on April 23, 2009, 02:31:08 am
Hey, cheers for this, very much appreciated, will let you know how I get on.....
Title: Re: DPS Payment Module - NZ and Australia
Post by: dl_mj12 on April 27, 2009, 01:50:26 am
No news is good news? Is everyone getting on ok?
Title: Re: DPS Payment Module - NZ and Australia
Post by: johntod02 on May 13, 2009, 15:46:56 pm
Can anyone tell me about DPS issue?????




---------------------
Search Engine Optimisation (http://www.alkemi.co.nz)
SEO Services (http://www.alkemi.com.au/search-engine-optimisation-services.asp)
Title: Re: DPS Payment Module - NZ and Australia
Post by: dl_mj12 on May 13, 2009, 22:38:19 pm
Could you be a little more descriptive? What problem are you having?
Title: Re: DPS Payment Module - NZ and Australia
Post by: Andrew on July 29, 2009, 04:05:50 am
Hi Someone asked a while back about sending the confirmed email both to the vendor address and the customer (currently it just goes to customer) Any ideas on that?
Title: Re: DPS Payment Module - NZ and Australia
Post by: bubaphex on August 21, 2009, 02:51:21 am
Hey guys

I'm getting this error:

Error: connect() timed out!
Error: Failure in Processing the Payment (ps_dps)

I'm using Virtuemart_DPS_Payment_module_1.0.2.zip Found on the first page using the PX POST service from DPS

Any one know how to fix?
Title: Re: DPS Payment Module - NZ and Australia
Post by: John2400 on January 19, 2010, 11:27:32 am
Right at this moment I'm trying to get the DPS working on my site- I found a bank IT guy from direct payments and he is trying to get it going for me on my site - I agreed that IF he got it going with no bugs then ID try it and publish any findings here. I do notice that at the site they have this site : http://www.paymentexpress.com/technical_resources/ecommerce_hosted/pxaccess.html

and then click on PHP at the bottom - this download the latest set up for php. or virtuemart. They rang me - they are desperate to have sites linked to them.
I wait in hope too- the hardest thing is to test trial it because they don't have easy test sites like paypal.

I go so annoyed with the testing set site up I sent him a test web site - so he could play - I'll let you know what happens -
Title: Re: DPS Payment Module - NZ and Australia
Post by: Andrew on January 19, 2010, 11:43:44 am
I got it going no probs in Joomla 1.5 and an old 1.0 site just using the instructions in this thread. I get a security cert though. Don't bother using a shared one. That created all sorts of probs.
Title: Re: DPS Payment Module - NZ and Australia
Post by: Spionred on June 09, 2010, 12:22:31 pm
Hi,

I am a bit confused. Module I assume is targeted to work on Joomla which is PHP/My SQL based. Your documentation says it uses PX Access but the DPS site says PX Access is for Windows based systems and PX Pay should be used for non windows based platforms.

Can you clarify if I can use this in Joomla. I have tried to set it up with my PX Pay information but I get the following error:

pxaccess.aspx: Error. This page accepts only HTTP POST's.

Any help would be wonderful

Kind Regards,
Kevin.
Title: Re: DPS Payment Module - NZ and Australia
Post by: jp-30 on June 23, 2010, 00:12:41 am
Thanks for this, it's great.

Title: Re: DPS Payment Module - NZ and Australia
Post by: jp-30 on June 23, 2010, 01:34:58 am
OK, ignore the above. I didn't need to add that extra code.

Anyone else using these files, you also need to change the text 'SCOTTS TEST' in checkout.dpsax_result.php to 'Successful transaction' or similar.

Title: Re: DPS Payment Module - NZ and Australia
Post by: webuser on September 01, 2010, 02:49:30 am
Made some changes to this including putting in a hack in components/com_virtuemart/themes/templates/list_payment_methods.tpl.php to force CVV code - would be good if this was an option in the config to select it there - mastercard was complaining that no CVV was entered. No time to update the proper module.

Also we were getting an error saying Error: Unknown SSL protocol error in connection to www.paymentexpress.com:443 the guys at DPS advised it was because of SSL version and advised the following change.

Open file "ps_dps.php" and edit around 224
 
curl_setopt($CR, CURLOPT_SSLVERSION, 2);
 
Change the value '2' to '3'
 
i.e.
curl_setopt($CR, CURLOPT_SSLVERSION, 2); to curl_setopt($CR, CURLOPT_SSLVERSION, 3);

Still got more issues I'll report back on anything I find
Title: Re: DPS Payment Module - NZ and Australia
Post by: brendonm on September 07, 2010, 07:16:44 am
any tips welcome with this I have followed the instructions, can get the money drawing from the credit card just fine but get this error instead of a confirmation page:

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/virtual/mydomain.co.nz/public_html/administrator/components/com_virtuemart/classes/payment/../../../../../../../configuration.php) is not within the allowed path(s): (/virtual/mydomain.co.nz:/tmp:/usr/share/php) in /virtual/mydomain.co.nz/public_html/administrator/components/com_virtuemart/classes/payment/ps_dpsax_notify.php on line 15

Warning: Cannot modify header information - headers already sent by (output started at /virtual/mydomain.co.nz/public_html/administrator/components/com_virtuemart/classes/payment/ps_dpsax_notify.php:15) in /virtual/mydomain.co.nz/public_html/administrator/components/com_virtuemart/classes/payment/ps_dpsax_notify.php on line 48


any help much appreciated.
Title: Re: DPS Payment Module - NZ and Australia
Post by: webuser on September 08, 2010, 05:45:54 am
Further to my email above I also had to put this line of code in at around 235 where it builds the XML because it doesn't pick up the currency - and DPS seems to assume its NZD.

                     "<InputCurrency>".$vendor_currency."</InputCurrency>\n".
Title: Re: DPS Payment Module - NZ and Australia
Post by: jp-30 on September 22, 2010, 00:13:21 am
On my other payment methods as soon as the cart is submitted, the customer and the site admin get the standard virtuemart  invoice/purchase order type email.

But using this module that email is not generated - though the customer does get an order status change email upon completion of the transaction.

Anyone else encountered this an fixed it?

Title: Re: DPS Payment Module - NZ and Australia
Post by: saucery on September 22, 2010, 09:22:50 am
Hi Dude,

I have come across this before. Try and send the emails as plain text instead of HTML..

Also has anyone figured out how to make the status change the order status in Virtuemart once the DPS payment has been completed?

Mine is staying as 'Pending'. need it to change to confirmed or Declined depending on the result....
Title: Re: DPS Payment Module - NZ and Australia
Post by: saucery on September 22, 2010, 23:55:41 pm
im using DPS PXPAY system. Currently all is working as per the orders going through. however it looks like nothing is being decrypted in the _result.php file. I put in an update query to see what variables are being returned and from what i can see its only getting the $request variable and is not decrypting correctly....

anyone come accross this... basically all is working, im just trying to send the result of the transaction back to the site... and nothing is coming through...

need to update order_status depending on outcome.

anyone got working php files for PXPay system?
Title: Re: DPS Payment Module - NZ and Australia
Post by: jp-30 on September 23, 2010, 07:11:47 am
Yeah, I found out it works for plain text emails - though the client wants HTML emails. Argh!

As for changing pending etc - I overlooked this for a while, maybe you have too. On the configuration tab of the payment module, ensure "Order Status for successful transactions" is set to Confirmed.
Title: Re: DPS Payment Module - NZ and Australia
Post by: kiwigal on January 27, 2011, 04:41:36 am
HI guys, I'm trying to use this but I get a Direct Access to this location is not allowed. when trying to set up the file.

Any ideas ?
Title: Re: DPS Payment Module - NZ and Australia
Post by: kiwigal on January 27, 2011, 05:01:48 am
for anyone else that has encountered the "Direct Access to this location is not allowed" and are running 1.5 you have to enable legacy mode in Plugins to be able to access it.
Title: Re: DPS Payment Module - NZ and Australia
Post by: jesses_mum on January 29, 2011, 02:29:48 am
Quote
Hi,

I am a bit confused. Module I assume is targeted to work on Joomla which is PHP/My SQL based. Your documentation says it uses PX Access but the DPS site says PX Access is for Windows based systems and PX Pay should be used for non windows based platforms.

Can you clarify if I can use this in Joomla. I have tried to set it up with my PX Pay information but I get the following error:

pxaccess.aspx: Error. This page accepts only HTTP POST's.

Any help would be wonderful

Kind Regards,
Kevin.

This question by Kevin some time ago doesn't appear to have been answered, and I am having the exact same problem. Can anybody help please??
Title: Re: DPS Payment Module - NZ and Australia
Post by: jesses_mum on February 03, 2011, 04:21:53 am
Ok I fixed that by putting url https://sec2.paymentexpress.com/pxpay/pxpay.aspx in the configuration. Now it redirects fine to DPS, and approves a transaction using the test credit card number, but when I return to my site it says "Failure (Order not found)" - any clues anyone?
Title: Re: DPS Payment Module - NZ and Australia
Post by: jesses_mum on February 06, 2011, 06:48:40 am
Ok, looks like nobody is here  :)

I finally figured it out, by checking my mac key (I had a typo in it).

Hopefully this post may help someone else.

Trying to figure out now why its redirecting from DPS to my website in the "Administrator" folder and therefore none of the links in my footer menu are working, but I guess theres no point asking the question here!
Title: Re: DPS Payment Module - NZ and Australia
Post by: camillaconz on February 18, 2011, 01:32:35 am
Hi,
can't believe it's started such a long time ago and there is still no proper plugin available... But thanks to all who shared all the experiences for the future "generations" lol
I have followed the forum and installed all the files and updated the files and did some tweaking but having problem with the redirection page, too. Access Forbidden...
Did any good soul got it working? Will you share, please?
Title: Re: DPS Payment Module - NZ and Australia
Post by: jesses_mum on February 18, 2011, 07:32:45 am
Are you using url https://sec2.paymentexpress.com/pxpay/pxpay.aspx in the config for DPS website? Also, check legacy plugin is enabled, I think I saw somewhere it needs to be turned on!

I finally have my site going and have submitted to the PCI Compliance team to get a merchant account approved so fingers crossed!
Title: Re: DPS Payment Module - NZ and Australia
Post by: camillaconz on February 21, 2011, 06:12:21 am
Hi,

thanks for reminder, of course i forgot to enable the legacy plugin...
Now i got to the DPS website but now it says "An error has occurred. Please try again."

Any idea why?

I am also wondering about the pxaccess kit, did you install this? i have no idea how to run the DoGenerateRequest.

Good luck with your account and if you successful, please let me know how did you make it work!
Title: Re: DPS Payment Module - NZ and Australia
Post by: jesses_mum on February 21, 2011, 07:09:36 am
Hmm.. not sure, where is it that you are receiving the error? (i.e. is it on the DPS website, or are you getting past the bit where you put your credit card details in and then getting the error when returning to your own website?)

I haven't heard of the pxaccess kit, so didn't install this. I only installed 5 files: pxaccess.inc, ps_dpsax_notify.php, ps_dpsax.php, ps_dpsax_config.php and checkout.dpsax_result.php which I got in a zip file somewhere further back along in this forum.

If all else fails you could try emailing the DPS team, and they were very helpful with my problems!

 
Title: Re: DPS Payment Module - NZ and Australia
Post by: bobby_38 on April 27, 2011, 05:37:07 am
all this subject is hard to follow...got some pxpost at the begining change to pxaccess, sometimes pxpay, with many hack and version...at the end what's the real clue....how the system work... like paypal go on the DPS site and back after, embedded form in the page or totally process from the virtuemart checkout...im a bit lost in all this subject and files....
Title: Re: DPS Payment Module - NZ and Australia
Post by: jesses_mum on April 27, 2011, 05:42:26 am
I agree, it has become is a long and convoluted subject.

Depending on whether you have your site hosted on a windows or unix server determines whether you use pxaccess or pxpay, pxacess is for unix, it is a "payment method" you install in virtuemart which takes the variables from the shopping cart across to the DPS website, which then accepts the buyers credit card and returns them to your website with a notification on whether payment was successful or not.
Title: Re: DPS Payment Module - NZ and Australia
Post by: bobby_38 on May 09, 2011, 06:22:22 am
my test is working ok but when transaction is accepted...go back to my site...
give me, thank for your purchase..and link to details...

if i click to link to detail it bring me back to paymenet express again....in the account maintenance too...in Order Information view lead me to payment express again..and my transaction still in process...

got that in my module extra info

Code: [Select]
<!-- *************** START CODE SNIPPET *************** -->

<?php

// code for module
include( CLASSPATH."payment/pxaccess.inc" );

$pxaccess = new PxAccessDPSAX_PXACCESS_URLDPSAX_USERIDDPSAX_KEYDPSAX_MAC_KEY );
$request = new PxPayRequest();

// CONFIG
$currency DPSAX_CURRENCY;
$txnType "Purchase";
// CONFIG


$order_total $db->f("order_total");
$order_id $db->f("order_id");
$script_url $mosConfig_live_site.'/administrator/components/com_virtuemart/classes/payment/ps_dpsax_notify.php';


#Set up PxPayRequest Object
$request->setAmountInput$order_total );
$request->setTxnType$txnType );
$request->setInputCurrency$currency );
$request->setMerchantReference$order_id );
$request->setUrlFail$script_url );
$request->setUrlSuccess$script_url );

#Call makeResponse of PxAccess object to obtain the 3-DES encrypted payment request 
$request_string $pxaccess->makeRequest$request );

if( 
DPSAX_DEBUG=='1' )
{
echo '<h3>DEBUG MODE ON</h3>';
echo '<table width="100%" border="1">';
echo '<tr><td colspan="2">The following shows the form fields that will be sumbitted to DPS in the request 
string. Turn debug off to be autoforward.</td></tr>'
;

echo '<tr><td>currency: </td><td>'.$currency.'</td></tr>';
echo '<tr><td>order_total: </td><td>'.$order_total.'</td></tr>';
echo '<tr><td>order_id: </td><td>'.$order_id.'</td></tr>';
echo '<tr><td>txnType: </td><td>'.$txnType.'</td></tr>';
echo '<tr><td colspan="3">&nbsp;</td></tr>';
echo '<tr><td>Created Request URL: </td><td>'.$request_string.'</td></tr>';
echo '</table>';

echo '<div style="text-align:left;"><a href="'.$request_string.'" title="CLICK HERE TO CONTINUE TO DPS">CLICK HERE TO CONTINUE TO DPS</a></div>';
}
else
header"Location: $request_string);


?>


<!-- *************** END CODE SNIPPET *************** -->


any idea....
Title: Re: DPS Payment Module - NZ and Australia
Post by: sampipe on May 28, 2011, 14:21:05 pm
Hey All...

Been about 6 years since I've played with this but due to the increasing number of queries I get I finally have got around to updating the DPS module for latest joomla/virtuemart and PXPay.

See new post at http://forum.virtuemart.net/index.php?topic=87063.msg285401#msg285401

Hope this helps some peeps out there.

Sam
Title: Re: DPS Payment Module - NZ and Australia
Post by: virtuemartaustralia on October 28, 2014, 23:03:07 pm
the recent dps pxpost pxfusion plugin is here
http://www.virtuemart.com.au/virtuemart-payment-plugins/dps-for-virtuemart.html