PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

[MODULE UPDATE] Paypal v1.6 (from 1.12Beta) with Paypal Fees passed on to customer

50 replies to this topic
#1
Aaron @ Geocachestore

    PrestaShop Newbie

  • Members
  • Pip
  • 23 posts
I take no credit for this module, the original version was posted on this forum with a link to the Portugese Forum. After registering for that I was able to see the code! (Kind of frustrating!)

The original post was from Francisco Carlão - Thread

This is a modified version of the v1.6 (Prestashop 1.12Beta) paypal module that has the functionality to pass the paypal fees along to the customer in the Paypal Sales Tax field. I've translated the code to English and fixed a bug that prevented the order from correctly going through after processing. This occurred because the store was expecting the original value, not the modified value (hence causing a Payment Error).

Anyway, hopefully this will benefit someone. Thanks Francisco for the mod (or whoever wrote it).

I'm pretty sure this is my working version.. let me know if there are any problems.

(UPDATED download to version 2.0):
(Changed download link to forum based):

Installation
------------------------------
1) Backup your paypal module
2) Download the file from this post
3) Copy this into the paypal directory
4) Reinstall the Paypal module
5) Configure the module to add the new Paypal Fee..
6) That's it!

Attached Files


FOR HIRE - Aussie PHP/MySQL Developer - PM me for a quote

Stuff I've worked on
[MOD] Paypal Fees passed on to customer [thread]

[MOD] Added Group Functionality for CMS / Info block [thread]

[MOD] Display Shipping Fees/Carriers prior to Checkout / AJAX [thread]

#2
arowana

    PrestaShop Apprentice

  • Members
  • PipPip
  • 54 posts
Thanks Aaron, it seems like it added a Sales Tax to every transaction. In paypal, I can set which state need to pay taxes which state does not. I only need to fix the feedback error. Any idea how I should edit the code ?

#3
Martin Hansen

    PrestaShop Apprentice

  • Members
  • PipPip
  • 144 posts
so is it to fee modul only or is it with the paypal modul ?

#4
Aaron @ Geocachestore

    PrestaShop Newbie

  • Members
  • Pip
  • 23 posts
I'm going to update this because I'm not happy using the Sales Tax field. At the moment it applies the Paypal fee to the sales tax field. I'm going to modify it so it creates a new item called 'Paypal Surcharge'.
FOR HIRE - Aussie PHP/MySQL Developer - PM me for a quote

Stuff I've worked on
[MOD] Paypal Fees passed on to customer [thread]

[MOD] Added Group Functionality for CMS / Info block [thread]

[MOD] Display Shipping Fees/Carriers prior to Checkout / AJAX [thread]

#5
natngnear

    PrestaShop Newbie

  • Members
  • Pip
  • 21 posts
Cool, i'm looking forward to this~!

So far I've added paypal fees to all product prices :/

Thank you! it will benefit a lot of people!

#6
Aaron @ Geocachestore

    PrestaShop Newbie

  • Members
  • Pip
  • 23 posts
Okay, I've just finished updating this for my own store. Here's what it's got.

V2.0
-----------------------------------
Removed the item from the Sales Tax field
Adding a new item to the PayPal basket instead (much nicer)
Added configuration options for a surcharge percentage, a fixed amount or both. I presently use both (2.4% + 0.30).
Added notes in configuration to explain what's going on
Updated all code to allow a percentage, a fixed amount or both.
Updated validation code to reflect.
Shouldn't throw a payment error!

Still to be done
-----------------------------------

*At the moment the new item exists only in Paypal, so it doesn't reflect on their invoices or past invoices. I don't really have time for this at the moment unless I suddenly require it for my store.
*Code tidy up, I'm not presta-pro, so there's some quick and dirty PHP code.

Only tested in 1.12Beta (This is a modified version of the PayPal 1.6 module) shouldn't be too hard to mod for 1.1 Stable. This is well tested, but it's still a hack job of an existing module, if anyone has any ideas on how to make it more standalone, then please let me know.

I'd been looking for something like this for about a month now, as Presta is replacing a legacy store. Nothing supported it, so I rewrote it myself. Credit still go to the original author, though I've added about 30 other things since then. So let's just consider this a derivative/forked work ;)

New download link for V2: Here
FOR HIRE - Aussie PHP/MySQL Developer - PM me for a quote

Stuff I've worked on
[MOD] Paypal Fees passed on to customer [thread]

[MOD] Added Group Functionality for CMS / Info block [thread]

[MOD] Display Shipping Fees/Carriers prior to Checkout / AJAX [thread]

#7
Hoodgrown

    PrestaShop Apprentice

  • Members
  • PipPip
  • 370 posts
Tried to download your module, but all your link did was take me to your site.. with no download.
Can you please post a link where I can download your mod?
PetsRight.com
http://www.petsright.com
http://www.twitter.com/petsright

My Interview In Practical Ecommerce Magazine
http://www.practical...ime-s-The-Charm

#8
Aaron @ Geocachestore

    PrestaShop Newbie

  • Members
  • Pip
  • 23 posts
Thanks for picking up on the broken link. I've attached the file to the first post now.
FOR HIRE - Aussie PHP/MySQL Developer - PM me for a quote

Stuff I've worked on
[MOD] Paypal Fees passed on to customer [thread]

[MOD] Added Group Functionality for CMS / Info block [thread]

[MOD] Display Shipping Fees/Carriers prior to Checkout / AJAX [thread]

#9
Paul C

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 1004 posts
Sadly I think you'll find that charging any form of surcharge for PayPal is against their terms of service, and will likely get your PayPal account revoked.....
Free Prestashop modules and developer resources

Latest Prestashop Developer articles:
* 1.4 Plugins Revisited – Part 1
* 1.4 Plugins Revisited – Part 2

Latest News:
Prestashop Module and Theme Developers can now Advertise on eCartService.net

#10
Hoodgrown

    PrestaShop Apprentice

  • Members
  • PipPip
  • 370 posts
Thanks... it's up and running...
PetsRight.com
http://www.petsright.com
http://www.twitter.com/petsright

My Interview In Practical Ecommerce Magazine
http://www.practical...ime-s-The-Charm

#11
crisdo98

    PrestaShop Newbie

  • Members
  • Pip
  • 3 posts
I love this module and wanted to use this to encourage customers to use their debit card but it does look like it violates the terms and conditions :(

Paypal customer support is useless but I think I found the answer in their terms in conditions.

4.5 No Surcharges. You agree that you will not impose a surcharge or any other fee for accepting PayPal as a payment method. You may charge a handling fee in connection with the sale of goods or services, as long as the handling fee does not operate as a surcharge and is not higher than the handling fee you charge for non-PayPal transactions. Nothing in this Agreement is intended to affect the legal right of a merchant in the UK to impose a surcharge for a debit or credit card transaction under the Credit Cards (Price Discrimination) Order 1990.

So it appears you can charge however if you have other payment methods then you also have to charge those non-paypal customers the same fee.

For paypal only sites this module doesn't violate paypal T&C;.

#12
Hoodgrown

    PrestaShop Apprentice

  • Members
  • PipPip
  • 370 posts
I'm using it.. but i'm not charging a fee...
PetsRight.com
http://www.petsright.com
http://www.twitter.com/petsright

My Interview In Practical Ecommerce Magazine
http://www.practical...ime-s-The-Charm

#13
crisdo98

    PrestaShop Newbie

  • Members
  • Pip
  • 3 posts

From 1246633617:

I'm using it.. but i'm not charging a fee...


I don't see how you could be using this module but not charging a fee??

If an item cost £10 and you're charging total of £10.64 regardless of whether your itemising it or not I'm pretty sure you're in breach of T&Cs;as per above.

If not please explain how you're using this module?

#14
Hoodgrown

    PrestaShop Apprentice

  • Members
  • PipPip
  • 370 posts
I'm using it to replace the Paypal 1.4 module...
and in the configuration you can choose whether to add on the fee or not!!!
I choose not too...
PetsRight.com
http://www.petsright.com
http://www.twitter.com/petsright

My Interview In Practical Ecommerce Magazine
http://www.practical...ime-s-The-Charm

#15
Aaron @ Geocachestore

    PrestaShop Newbie

  • Members
  • Pip
  • 23 posts
Regardless of the T&C;'s, charging a 'surcharge' is a common place occurance here in Australia. You can't even buy fuel anymore without the store owner charging you a 2 - 3% credit card surcharge. Amex always has a surcharge of at least 3% everywhere you go. If it's good enough for the major retailers in Australia, it's good enought for my little store, or yours.

Even Aldi (budget food chain) charge a 2.5% fee for credit cart purchases.

Use this at your own risk.
FOR HIRE - Aussie PHP/MySQL Developer - PM me for a quote

Stuff I've worked on
[MOD] Paypal Fees passed on to customer [thread]

[MOD] Added Group Functionality for CMS / Info block [thread]

[MOD] Display Shipping Fees/Carriers prior to Checkout / AJAX [thread]

#16
crisdo98

    PrestaShop Newbie

  • Members
  • Pip
  • 3 posts
I completely agree that you should be able to charge what you like. Is it possible to maybe modify the module so that you can also charge an additional 3% for people that choose credit card as payment (ie/ HSBC module) ?

#17
sperio

    PrestaShop Apprentice

  • Members
  • PipPip
  • 75 posts
why do u need to charge extra fee? just charge it into the price from the very beginning... from a customer perspective... it will piss me off to be levied a charge at the end...
----------------------------------------
http://www.zuigeling.com
http://www.iputa.com
http://www.alfredtay.com
----------------------------------------

#18
Paul C

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 1004 posts

From 1247800570:

why do u need to charge extra fee? just charge it into the price from the very beginning... from a customer perspective... it will piss me off to be levied a charge at the end...


Bingo. Unless you guys are also accepting cash (with no fee) then just charge everyone the same. Simple - although I understand why someone wouldn't want to use the default PayPal module.

It is extremely naive to do otherwise, and my fear would be that you are encouraging folks into implementing something that could potentially destroy their business. It was for that reason that I pointed out the potential for breaking the T&Cs;. You are allowed to levy a surcharge for credit card transactions - but you have to apply it across the board - for all credit card transactions. If someone pays via PayPal but doesn't fund the transaction with a credit card then you're charging a fee for a non credit card transaction - which is against their TOS.

The point has been made in this very thread that there IS a purpose to adding a fee at least for some, and that is to manipulate the payment methods selected by your customers in order to favour one in particular. This is what will get you into trouble.

If any of you were to use Adwords or a pay-per-click advertising system would you consider adding the cost of the click on to all sales you made via that system? After all, by the same logic it was a more expensive sale for you than just a click from an organic search, so that customer should pay more? No?

If you don't want people to use PayPal, then don't offer it as a payment method.

If you do want the additional sales that you may get by offering a wider choice of payments methods, then use it and absorb the fee.

You need to account for the cost of sales in your overall profitability for your store whether that be via advertising or via payment charges. The bottom line is that if PayPal doesn't gain you enough sales to justify the additional cost of the sales, then stop using them. If you are getting sales through offering PayPal, then consider the impact on your store if you no longer/were unable to accept payment that way.

Rant over.

Paul
Free Prestashop modules and developer resources

Latest Prestashop Developer articles:
* 1.4 Plugins Revisited – Part 1
* 1.4 Plugins Revisited – Part 2

Latest News:
Prestashop Module and Theme Developers can now Advertise on eCartService.net

#19
Aaron @ Geocachestore

    PrestaShop Newbie

  • Members
  • Pip
  • 23 posts
Thanks everyone for your varied opinions of this, however the purpose of this thread was never to discuss the implications of said module, but to show that it is possible.

Some businesses like it, some don't. End of story.

Just because you don't agree with something, doesn't mean the code shouldn't be written and/or made available to the people who want it.

Please feel free to start another thread to discuss the pros & cons of this module, don't start a general/ethical discussion in a module post. It's been written, it's a module, take the discussion else where.
FOR HIRE - Aussie PHP/MySQL Developer - PM me for a quote

Stuff I've worked on
[MOD] Paypal Fees passed on to customer [thread]

[MOD] Added Group Functionality for CMS / Info block [thread]

[MOD] Display Shipping Fees/Carriers prior to Checkout / AJAX [thread]

#20
Paul C

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 1004 posts
With respect this is an open forum to facilitate discussion. If you want editorial control of the content of this thread then move the discussion to your own web site.
Free Prestashop modules and developer resources

Latest Prestashop Developer articles:
* 1.4 Plugins Revisited – Part 1
* 1.4 Plugins Revisited – Part 2

Latest News:
Prestashop Module and Theme Developers can now Advertise on eCartService.net