Questions about Payment Form extension

Adding % Surcharge to Worldpay Payments only

  • Darren Whiteman
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
12 years 6 months ago #18503 by Darren Whiteman
Adding % Surcharge to Worldpay Payments only was created by Darren Whiteman
Hi

My client wants to add a 2.5% surcharge to all worldpay, to cover admin charges payments but not to offline payments.
Can't see any easy way of doing this.

Please Log in or Create an account to join the conversation.

More
12 years 6 months ago #18523 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Adding % Surcharge to Worldpay Payments only
Hi

You will need to edit code alitle to do that. Please follow the steps below :

1. Open the file components/com_pmform/payments/os_worldpay.php

2. Find the code below :
Code:
$this->setParam('amount', round($row->amount, 2));

3. Change it to :
Code:
$this->setParam('amount', round($row->amount*1.025, 2));

After that, it should work as expected.

Tuan

Please Log in or Create an account to join the conversation.

  • Darren Whiteman
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
12 years 6 months ago #18535 by Darren Whiteman
Replied by Darren Whiteman on topic Re: Adding % Surcharge to Worldpay Payments only
Many thanks Tuan, that worked a treat!

Please Log in or Create an account to join the conversation.

More
12 years 6 months ago #18536 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Adding % Surcharge to Worldpay Payments only
Great, thanks for confirming Darren. If you have few minutes, could you please help me by giving Payment Form a 5 stars rating and a nice review at extensions.joomla.org/extensions/e-comme...ing-a-invoices/12458 to support my development ? One client left it a low rating with title "bad support" because we only provide free upgrade for one year for each purchase (He wants a free lifetime upgrade), so if you can spend some minutes to help me, that would be great !

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc