Author Topic: DPS Payment Module - NZ and Australia  (Read 91690 times)

sampipe

  • Beginner
  • *
  • Posts: 14
Re: DPS Payment Module - NZ and Australia
« Reply #15 on: June 21, 2006, 00:19:03 am »
Sorry... :o    my mistake .. done.. 

w_d_o_a

  • Jr. Member
  • **
  • Posts: 75
Re: DPS Payment Module - NZ and Australia
« Reply #16 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

Joseph Bell

  • Beginner
  • *
  • Posts: 34
Re: DPS Payment Module - NZ and Australia
« Reply #17 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...

w_d_o_a

  • Jr. Member
  • **
  • Posts: 75
Re: DPS Payment Module - NZ and Australia
« Reply #18 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

sampipe

  • Beginner
  • *
  • Posts: 14
Re: DPS Payment Module - NZ and Australia
« Reply #19 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

Joseph Bell

  • Beginner
  • *
  • Posts: 34
Re: DPS Payment Module - NZ and Australia
« Reply #20 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.

Joseph Bell

  • Beginner
  • *
  • Posts: 34
Re: DPS Payment Module - NZ and Australia
« Reply #21 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

w_d_o_a

  • Jr. Member
  • **
  • Posts: 75
Re: DPS Payment Module - NZ and Australia
« Reply #22 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

Joseph Bell

  • Beginner
  • *
  • Posts: 34
Re: DPS Payment Module - NZ and Australia
« Reply #23 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

Joseph Bell

  • Beginner
  • *
  • Posts: 34
Re: DPS Payment Module - NZ and Australia
« Reply #24 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
?>

Joseph Bell

  • Beginner
  • *
  • Posts: 34
Re: DPS Payment Module - NZ and Australia
« Reply #25 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.

screamingweasel

  • Beginner
  • *
  • Posts: 2
Re: DPS Payment Module - NZ and Australia
« Reply #26 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

wildweasel007

  • Beginner
  • *
  • Posts: 4
Re: DPS Payment Module - NZ and Australia
« Reply #27 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

adrianjwright

  • Beginner
  • *
  • Posts: 6
Re: DPS Payment Module - NZ and Australia
« Reply #28 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

wildweasel007

  • Beginner
  • *
  • Posts: 4
Re: DPS Payment Module - NZ and Australia
« Reply #29 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