Answers.Body: <p>Luke very helpfully got back to me to sort the problem, but in case it helps anyone else.</p>
  
  <p>The immediate fix is to disable sending the item bag (cart information to PayPal) and using it purely to change the payment amount. But I will attempt to explain in full below.</p>
  
  <p>You disable the cart info being sent to PayPal in your commerce.php settings with:</p>
  
  <pre><code>'sendCartInfoToGateways' =&gt; false
  </code></pre>
  
  <p>Strangely this is the first time we have seen this issue. But it is due to the following in Commerce:</p>
  
  <p>Commerce stores all values in the system in a single base store currency. This means the cart, the discounts, shipping, and anywhere a currency amount is stored is stored as the default base currency.</p>
  
  <p>The payment currency feature is purely designed to allow the charging of the order price in a different currency. The feature allows the customer to know the exact amount to be charged to their card in the currency of their card - without any surprise conversion rate determined by their bank.</p>
  
  <p>Paypal, when it receives the cart information (line item prices etc) is being supplied amounts in that base currency from commerce. Paypal adds up the cart amounts and compares it to the amount that we want to charge the customer in the chosen payment currency. Obviously, the amount we are changing is in the other currency differs from this total.</p>
  
  <p>At first the thought might come as a solution to convert the line items amounts to the other currency for PayPal, but this doesn't work; we do the conversion of the totalPrice of the order for the payment currency feature, and converting each line item and adding them up would usually come up with a different total due to rounding.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-05T19:42:20.247Z
Answers.LastActivityDate: 2018-06-05T19:42:20.247Z
Answers.UserDisplayName: Green17
Body: <p>We are using PayPal standard as an option for payments which works in the main currency (GBP) but not in any of the others eg (CAD). We're seeing in the plugin logs for craft commerce:</p>
  
  <pre><code>[Forced] Item bag total price does not equal the orders totalPrice, some payment gateways will complain.
  </code></pre>
  
  <p>Any ideas on what could be wrong? It seems that this is a problem with PayPal adding up the totals and seeing they are wrong? but this is all done on craft side so not too sure.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-08T08:27:37.943Z
Comments.Text: It looks like at the post to PayPal stage it sends GBP items and CAD total. If I force it to GBP by setting 'paymentCurrency' to GBP it works. Any ideas on how to set the right currency for line items too?
Comments.UserDisplayName: Green17
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-14T08:28:42.277Z
Comments.Text: Is this commerce 1 or 2-beta?
Comments.UserDisplayName: Luke Holder
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-16T09:07:09.587Z
Comments.Text: Hi Luck, sorry did not see this comment come in. its commerce 1, craft cms 2.
Comments.UserDisplayName: Green17
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-21T02:29:27.453Z
Comments.Text: Please send your DB backup to support@craftcommerce.com and I will take a look.
Comments.UserDisplayName: Luke Holder
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-29T19:29:09.210Z
Comments.Text: Hi Luke, not sure if you're getting the emails ok, with the DB back up etc can you let us know asap.
Comments.UserDisplayName: Green17
Tags: <plugin-craftcommerce>
Title: PayPal Currency - Item bag total price does not equal the orders totalPrice, some payment gateways will complain
ThreadText: # PayPal Currency - Item bag total price does not equal the orders totalPrice, some payment gateways will complain
  
  (Asked by: username_0 on 2018-05-07)
  
  We are using PayPal standard as an option for payments which works in the main currency (GBP) but not in any of the others eg (CAD). We're seeing in the plugin logs for craft commerce:
  
  ```
  [Forced] Item bag total price does not equal the orders totalPrice, some payment gateways will complain.
  
  ```
  
  Any ideas on what could be wrong? It seems that this is a problem with PayPal adding up the totals and seeing they are wrong? but this is all done on craft side so not too sure.
  
  **Tags:** plugin-craftcommerce
  
  > **Comments:**
  > **username_0**: It looks like at the post to PayPal stage it sends GBP items and CAD total. If I force it to GBP by setting 'paymentCurrency' to GBP it works. Any ideas on how to set the right currency for line items too?  
  > **username_1**: Is this commerce 1 or 2-beta?  
  > **username_0**: Hi Luck, sorry did not see this comment come in. its commerce 1, craft cms 2.  
  > **username_1**: Please send your DB backup to support@craftcommerce.com and I will take a look.  
  > **username_0**: Hi username_1, not sure if you're getting the emails ok, with the DB back up etc can you let us know asap.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-06-05. Score: 0 | Accepted answer
  
  username_1 very helpfully got back to me to sort the problem, but in case it helps anyone else.
  
  The immediate fix is to disable sending the item bag (cart information to PayPal) and using it purely to change the payment amount. But I will attempt to explain in full below.
  
  You disable the cart info being sent to PayPal in your commerce.php settings with:
  
  ```
  'sendCartInfoToGateways' => false
  
  ```
  
  Strangely this is the first time we have seen this issue. But it is due to the following in Commerce:
  
  Commerce stores all values in the system in a single base store currency. This means the cart, the discounts, shipping, and anywhere a currency amount is stored is stored as the default base currency.
  
  The payment currency feature is purely designed to allow the charging of the order price in a different currency. The feature allows the customer to know the exact amount to be charged to their card in the currency of their card - without any surprise conversion rate determined by their bank.
  
  Paypal, when it receives the cart information (line item prices etc) is being supplied amounts in that base currency from commerce. Paypal adds up the cart amounts and compares it to the amount that we want to charge the customer in the chosen payment currency. Obviously, the amount we are changing is in the other currency differs from this total.
  
  At first the thought might come as a solution to convert the line items amounts to the other currency for PayPal, but this doesn't work; we do the conversion of the totalPrice of the order for the payment currency feature, and converting each line item and adding them up would usually come up with a different total due to rounding.
  
  
  ---
  
  