Jump to content
SCH_001

Show PayPal fee in order total

Recommended Posts

Hi all, PayPal in Australia will no longer be refunding the transaction fee if we refund a customer which we often do due to order changes etc.

So  what I would like to do is add a section to the check out confirmation page that shows the amount of the PayPal fee and have it read

PayPal non refundable component : $

And also have this on the email order confirmation email that the customer receives.
Maybe at the bottom under Total
Where and how can I do this
Version is Frozen BS CE

image.png.1ffa69b2c20efa2b9663992c28591f39.png


Also where and in what file can I add text here
image.png.f9d0bf57549a3c9c84fd9bcde2d683e7.png

 

Share this post


Link to post
Share on other sites

This has been discused on this forum before but unable to find the thread, but simple add comments to checkout_payments.php. This was done as a test using COD as did not have PayPal active on test site but same method can be used for PayPal.

image.png.cc613a20c7e187054b7d237999cb3725.png


 

Share this post


Link to post
Share on other sites
 Please check and backup before making changes. This is for CE BS4 so your files may not be the same so check placment

in checkout_confirmation.php find

<?php
  if (MODULE_ORDER_TOTAL_INSTALLED) {
    echo $order_total_modules->output();
     }
?>

and add below this ( change % to your requirment)

<?php
$newtotal = ($order->info['total']*0.05);
?>

Then find this,

</table>
  <hr>
 
  <table class="table">
    <thead>
      <tr>

and add below this ( mine is set up for "cod" so you need to change to paypal),

<?php if($payment == "cod"){?>
         
         <button id="pay" class="btn btn-danger">NOTE:- Dear customer if you cancel the order or return as unwanted after payment has been made by Cash on Delivery (COD) we will
          refund your payment less the Cash on Delivery payment fee, this is 5.0% of the total payment made using COD. For this order the retaind COD fee will be <?php echo $currencies->format($newtotal);?></button>
       
        <?php }?>

 

Now /public_html/checkout_payment.php find,

 </tbody>
  </table>

  <hr>

and add below this,

<?php
$newtotal = ($order->info['total']*0.05);
?>
        
          <button id="pay" class="btn btn-danger" disabled>NOTE:- Dear customer if you cancel the order or return as unwanted after payment has been made by Cash on Delivery (COD) we will
          refund your payment less the Cash on Delivery payment fee, this is 5.0% of the total payment made using COD. For this order the retaind COD fee will be <?php echo $currencies->format($newtotal);?></button>
        <br><br>

 

That's it just change your code to paypal insted of cod. Shoud just work remember backup first. 

Please check and test before using on live site. files attached are for Frozen BS4 so make any changes required for your site.

checkout_payment.php

checkout_confirmation.php

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites

Thankyou @JcMagpie yeah I brought it up ages while I was still running 2.3.1 but removed it all because PayPal never implemented the changes. But they are going to now.
I will most likely add your code but I want to add some code to the paypal files
See my thread here which I am getting some progress with

 

Share this post


Link to post
Share on other sites

Yes your right PayPal was a bit shady with this change. Aparently they had a big backlash from customers in the USA and put off the change for a while but I belive they are now sneeking in back into the terms.

It looks like another "because we can" move from PayPal. Still lots of option open to people only time will tell if customers are willing to put up with it.


 

Share this post


Link to post
Share on other sites

@JcMagpie Installing this at the moment but the text won't line wrap it just goes off the edge of the screen?

I am running Frozen BS3 I think - Installed Version: osCommerce Online Merchant v2.3.4.1 CE

 

          <button id="pay" class="btn btn-danger" disabled>NOTE:- Dear customer if you cancel the order or return as unwanted after payment has been made by Cash on Delivery (COD) we will
          refund your payment less the Cash on Delivery payment fee, this is 5.0% of the total payment made using COD. For this order the retaind COD fee will be <?php echo $currencies->format($newtotal);?></button>
        <br><br>

 

Share this post


Link to post
Share on other sites

Checkout payment.php commented at the moment

<?php
$newtotal = ($order->info['total']*0.05);
?>
<!--        
    <button id="pay" class="btn btn-danger" disabled>NOTE:- Dear customer if you cancel the order or return as unwanted after payment has been made by Cash on Delivery (COD) we will
          refund your payment less the Cash on Delivery payment fee, this is 5.0% of the total payment made using COD. For this order the retaind COD fee will be <?php echo $currencies->format($newtotal);?></button>
        <br><br>
        -->

image.thumb.png.80014efd88481b9669459e064af1cfa3.png

Share this post


Link to post
Share on other sites

Try checking your code as the code you posted here looks to be bad. See the silly red box at the end! Must use a clean editor when doing this.

image.thumb.png.694077f02cd4606569467b162cd05b3d.png

You code with error removed added below mine on my test site works fine.

image.png.3fdbf48fb28fc9dee8030bea715b2263.png

 

 


 

Share this post


Link to post
Share on other sites

pm or post link to your site. clearly the commeting is not working as the note is still showing?

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites

When you get an error like this it's a clear sign that your code is broken. You are missing a closing tag at some point causing your site to scroll in width.

image.thumb.png.efc1ef13a8d6687f0938b6b6c7efa704.png


 

Share this post


Link to post
Share on other sites

@SCH_001

To avoid being plucked by PayPal, between fixed fees, commissions and now no refund of commission fees in case of cancellation, I suggest you install paypal_standard and use my module that increments "processing fees" in case of payment by PayPal.

Like this, in case of refund or not, you will never concede money on your sales to PayPal. :)
 

paypal_fee_order_total.jpg


Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

@JcMagpie Googling the issue seems to say yes you do, but not sure it worked for me, I recall @Heatherbell having a similar issue

 

@milerwan I don't want to charge a fee on every PayPal payment as the fee can be quite high on some of my sales and I could lose the sale. Instead I have changed to authorize first and once the customer accepts the order ie accepts that there is an extended wait time or a substitute item we will capture the funds. I am working on making the customer aware that an order paid by PayPal if canceled after this stage that the PayPal transaction fee will not be refunded

 

Share this post


Link to post
Share on other sites

Please remember this was done just to show it could be done. You should if using this on a live site make some changes, move the text to a languge file and use user.css to add any styling you need.

 <button id="pay" class="btn btn-danger" disabled><?php echo TEXT_CONTINUE_CHECKOUT_PROCEDURE_WARNING?> <?php echo $currencies->format($newtotal);?></button>

 

1 minute ago, SCH_001 said:

Googling the issue seems to say yes you do

hey no problem you do what you need to in geting your site working... all good..:thumbsup:


 

Share this post


Link to post
Share on other sites
1 hour ago, milerwan said:

@SCH_001

To avoid being plucked by PayPal, between fixed fees, commissions and now no refund of commission fees in case of cancellation, I suggest you install paypal_standard and use my module that increments "processing fees" in case of payment by PayPal.

Like this, in case of refund or not, you will never concede money on your sales to PayPal. :)

This is not allowed by the paypal rules and the french laws ...

Edited by bonbec

Get the latest Responsive osCommerce CE (community edition) here .

(Live   : OsC 2.2, php 5.4 & UTF-8  |  Local : OsC 234BS php7.2 Edge for future shop)

Share this post


Link to post
Share on other sites
Just now, bonbec said:

This is not allowed by the paypal rules and the french laws ...

Sorry to say that but you can apply any fees you want in order total. ^^


Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

The rules here in Australia allow the seller to charge a fee as long as it's not more than the fee charged by the payment gateway.
PayPal rules also allow for it.

Share this post


Link to post
Share on other sites
3 hours ago, SCH_001 said:

@milerwan can you point me towards your module so I can have a look.

I have just uploaded at the moment (2 times by mistake ^^) my module.
Here are the links :

- https://apps.oscommerce.com/6aWHK&paypal-fee-v2

- https://apps.oscommerce.com/Uyola&paypal-fee-v2

Edited by milerwan

Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites

@milerwan Using your PayPal fee module if I commented out line 84
          $order->info['total'] += $paypal_fee;

Will this still show the PayPal fee but not add it to the total?
I am hoping I can set the sort order high enough that it will appear under the Total.
and then changing the language file to something like Non Refundable PayPal Fee

If line 84 is the incorrect line to comment out / change can you please point me in the right direction

Share this post


Link to post
Share on other sites
Posted (edited)
On 9/21/2019 at 2:19 PM, milerwan said:

Sorry to say that but you can apply any fees you want in order total. ^^

No Gwenn :

Appelé le surcharging“, cette pratique est interdite par le code Monétaire et financier dans son article L 112-12. « Le bénéficiaire ne peut appliquer de frais pour l’utilisation d’un instrument de paiement donné. Il ne peut être dérogé à cette interdiction que dans des conditions définies par décret, pris après avis de l’Autorité de la concurrence, compte tenu de la nécessité d’encourager la concurrence et de favoriser l’utilisation de moyens de paiement efficaces ».

In english :

Called overcharging ", this practice is prohibited by the Monetary and Financial Code in its article L 112-12. "The beneficiary may not charge a fee for the use of a particular payment instrument. This prohibition can be waived only under conditions defined by decree, taken after the opinion of the Competition Authority, taking into account the need to encourage competition and promote the use of efficient means of payment.

 

PS : On the other hand nothing forbids to grant a reduction with another means of payment ...

Edited by bonbec

Get the latest Responsive osCommerce CE (community edition) here .

(Live   : OsC 2.2, php 5.4 & UTF-8  |  Local : OsC 234BS php7.2 Edge for future shop)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×