Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Sep 2014
    Location
    Indiana
    Posts
    123
    Plugin Contributions
    0

    Default Display Fee amount in admin order comment?

    Using 1.5.8a; Paypal Restful 1.0.4

    When capturing a paypal payment, the admin order comment (which we have flagged as hidden) looks like:
    FUNDS CAPTURED. Trans ID: 3SD357xxxxxxxxx582M
    Amount: 1.00 USD

    Thank you for your order.


    Is there a way to add the paypal discount amount into this comment? For instance,
    FUNDS CAPTURED. Trans ID: 3SD357xxxxxxxxx582M
    Amount: 1.00 USD
    Paypal fee: $0.32
    Thank you for your order.


    The comment is created in the \includes\modules\payment\paypal\PayPalRestful\Admin\DoCapture.php file, near line 93 but I was unable to find a variable containing the payment fee.

    Thanks for any ideas.
    Last edited by apollowilcox; 18 Feb 2025 at 05:25 PM.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,948
    Plugin Contributions
    96

    Default Re: Display Fee amount in admin order comment?

    Quote Originally Posted by apollowilcox View Post
    Using 1.5.8a; Paypal Restful 1.0.4

    When capturing a paypal payment, the admin order comment (which we have flagged as hidden) looks like:
    FUNDS CAPTURED. Trans ID: 3SD357xxxxxxxxx582M
    Amount: 1.00 USD

    Thank you for your order.


    Is there a way to add the paypal discount amount into this comment? For instance,
    FUNDS CAPTURED. Trans ID: 3SD357xxxxxxxxx582M
    Amount: 1.00 USD
    Paypal fee: $0.32
    Thank you for your order.


    The comment is created in the \includes\modules\payment\paypal\PayPalRestful\Admin\DoCapture.php file, near line 93 but I was unable to find a variable containing the payment fee.

    Thanks for any ideas.
    At the point in that class where the $comments are created (line 92), the paypal fee can be formatted as
    PHP Code:
    $capture_response['seller_receivable_breakdown']['platform_fee']['value'] . ' ' $capture_response['seller_receivable_breakdown']['platform_fee']['currency_code'
    See this PayPal API doc link for additional information: https://developer.paypal.com/docs/ap...ations_capture

  3. #3
    Join Date
    Sep 2014
    Location
    Indiana
    Posts
    123
    Plugin Contributions
    0

    Default Re: Display Fee amount in admin order comment?

    Thank you for that! I'm not much of a coder, so to be clear, should the comment creation starting at line 92 look like this?

    Code:
            $comments =
                'FUNDS CAPTURED. Trans ID: ' . $capture_response['id'] . "\n" .
                "Amount: $amount\n" .
    	    $capture_response['seller_receivable_breakdown']['platform_fee']['value'] . ' ' . $capture_response['seller_receivable_breakdown']['platform_fee']['currency_code'] . 
                $payer_note;
    Testing this did not result in an error, but also did not present the fee. I'm probably missing something obvious...

    Thanks.

 

 

Similar Threads

  1. Replies: 5
    Last Post: 22 Jun 2013, 02:57 AM
  2. Paypal amount diff from order amount
    By mmwilcox in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 28 Sep 2008, 08:45 PM
  3. Noticed Fee Amount was incorrect.
    By testuser in forum PayPal Express Checkout support
    Replies: 2
    Last Post: 22 Jan 2008, 07:45 AM
  4. How do I change Low Order Fee display?
    By dmungia in forum General Questions
    Replies: 1
    Last Post: 8 Nov 2007, 08:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg