Questions about Payment Form extension

Add extra fee when using PayPal

  • Pieter77
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 6 months ago #20225 by Pieter77
Add extra fee when using PayPal was created by Pieter77
Hi there,

I would like to add an extra fee (let say + €5) to the total amount when users pay with PayPal. I think i'll have to edit the os_paypal.php somewhere, but i'm not sure what to change...

Can you help me what tot edit?

Thanks!

Pieter

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
11 years 6 months ago #20375 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Add extra fee when using PayPal
Hi All

I replied to Pieter's questions via support ticket. Here is the answer again in case someone has the same need :

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

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

3. Change it to :
Code:
$this->setParam('amount', round($data['amount'] + 5, 2));

After that, it will work as expected.

Tuan

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

More
11 years 5 months ago #21457 by MyWorld
Replied by MyWorld on topic Re: Add extra fee when using PayPal
I would like this too but when I upgrade won't it override the change?

Can we not add a field in "Fields management" that can add an amount or percent to the amount the user enters in the form?

Thanks!!

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
11 years 5 months ago #21534 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Add extra fee when using PayPal
Hi

Yes. When you upgrade, the change will be lost. However, you can edit the code easily to add it back (just one or two minutes). I will consider adding support for this feature in future release (maybe there will be a new parameter in the Paypal plugin which allows you to specify the extra amount) .

Tuan

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

More
11 years 5 months ago #21579 by MyWorld
Replied by MyWorld on topic Re: Add extra fee when using PayPal

Yes. When you upgrade, the change will be lost. However, you can edit the code easily to add it back (just one or two minutes).

The time to update it is not an issue - but when you have many other things to do you may forget - that's what I'm afraid of.

I will consider adding support for this feature in future release (maybe there will be a new parameter in the Paypal plugin which allows you to specify the extra amount) .

This would be EXTREMELY appreciated.

Thanks!!

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

More
11 years 5 months ago #22398 by MyWorld
Replied by MyWorld on topic Re: Add extra fee when using PayPal
Any idea when this may be ready? I have a client who is interested in purchasing it but definately want to option to add the extra fee.

Thanks!!

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

More
10 years 10 months ago #31753 by MyWorld
Replied by MyWorld on topic Re: Add extra fee when using PayPal
I have a client who is interested in purchasing this but wants to know if the option to add the extra fee when using Paypal is included in the most current version.

Thank you!!

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

More
10 years 10 months ago #31761 by MyWorld
Replied by MyWorld on topic Re: Add extra fee when using PayPal
Hi Tuan,

If I want to add a percentage rather than an amount, how do I add that?
Code:
$this->setParam('amount', round($data['amount'] + 5, 2));

Thanks!

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

More
10 years 10 months ago #31853 by MyWorld
Replied by MyWorld on topic Re: Add extra fee when using PayPal
Can I get some help with this please? :( Do I just add it like this (2.5%) ? Will that work?
Code:
$this->setParam('amount', round($data['amount'] + 2.5%, 2));

Thanks!!

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
10 years 10 months ago #31960 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Add extra fee when using PayPal
Hi

You will need to use the code below:
Code:
$this->setParam('amount', round($data['amount']*(1 + 2.5/100), 2));

Tuan
The following user(s) said Thank You: nate covington

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

Moderators: Tuan Pham Ngoc