Answers.Body: <p>I would save the response to an incognito field (or fields) on your order (probably both the entire response and also just the fee separate out).</p>
  
  <p><a href="https://github.com/mmikkel/IncognitoField-Craft" rel="nofollow">https://github.com/mmikkel/IncognitoField-Craft</a></p>
  
  <p>The <code>readonly</code> incognito field is particularly good for this sort of thing - I use a bunch of these fields in a debug tab on my order layout to save useful things.</p>
  
  <p>Just create the fields, add the fields to your order, and you update the values with the usual <code>&lt;input name="fields[fieldName]"&gt;</code> syntax with any cart operation, or use <code>setContentFromPost</code> if you're in a plugin:</p>
  
  <pre><code>    $order-&gt;setContentFromPost(array(
          'fieldName' =&gt; $creditCardFee,
      ));
      craft()-&gt;commerce_orders-&gt;saveOrder($order);
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-27T00:20:05.890Z
Answers.LastActivityDate: 2016-10-27T00:20:05.890Z
Answers.UserDisplayName: Jeremy Daalder
Body: <p>I need to add the credit card fee to the order in the CP. I get a response from the gateway with a custom txnfee variable and would like to view it in the CP. Just like an custom adjuster. Does anyone have any experience with that?</p>
  
  <p>Example:</p>
  
  <p>Order = $100
  Tax = $5
  Credit card fee = $1
  Total = $106</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-10-26T17:42:07.947Z
Comments.Text: Isn't this identical to your other question? https://craftcms.stackexchange.com/questions/17371/save-and-show-card-fee-for-commerce-plugin
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-10-26T17:44:34.557Z
Comments.Text: Yes I guess it is. But this is more general in terms of an overall solution for saving all the gateway response data for easy readability in the CP.
Comments.UserDisplayName: Beuschau
Tags: <plugin-craftcommerce>
Title: Credit card fee to the final order in CP
ThreadText: # Credit card fee to the final order in CP
  
  (Asked by: username_0 on 2016-10-26)
  
  I need to add the credit card fee to the order in the CP. I get a response from the gateway with a custom txnfee variable and would like to view it in the CP. Just like an custom adjuster. Does anyone have any experience with that?
  
  Example:
  
  Order = $100
  Tax = $5
  Credit card fee = $1
  Total = $106
  
  **Tags:** plugin-craftcommerce
  
  > **Comments:**
  > **username_1**: Isn't this identical to your other question? https://craftcms.stackexchange.com/questions/17371/save-and-show-card-fee-for-commerce-plugin  
  > **username_0**: Yes I guess it is. But this is more general in terms of an overall solution for saving all the gateway response data for easy readability in the CP.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2016-10-27. Score: 1
  
  I would save the response to an incognito field (or fields) on your order (probably both the entire response and also just the fee separate out).
  
  <https://github.com/mmikkel/IncognitoField-Craft>
  
  The `readonly` incognito field is particularly good for this sort of thing - I use a bunch of these fields in a debug tab on my order layout to save useful things.
  
  Just create the fields, add the fields to your order, and you update the values with the usual `<input name="fields[fieldName]">` syntax with any cart operation, or use `setContentFromPost` if you're in a plugin:
  
  ```
      $order->setContentFromPost(array(
          'fieldName' => $creditCardFee,
      ));
      craft()->commerce_orders->saveOrder($order);
  
  ```
  
  
  ---
  
  