Answers.Body: <p>ok - this has fixed for us and the reason was the incorrect param sent to the ProcessPayment operation. The correct way of sending the invoice params is -</p>
  
  <pre><code>$client = CRM_Core_Payment_EwayUtils::getClient($params['payment_processor_id']);
  $endPoint = 'https://www.eway.com.au/gateway/managedpayment/ProcessPayment';
  
  $paymentInfo = array(
    'man:managedCustomerID' =&gt; $params['managed_customer_id'],
    'man:amount' =&gt; $params['amount_in_cents'],
    'man:invoiceReference' =&gt; $params['invoice_id'],
    'man:invoiceDescription' =&gt; $params['description'],
  );
  $result = $client-&gt;call('man:ProcessPayment', $paymentInfo, '', $endPoint);
  </code></pre>
  
  <p>Note the correct usage of <code>man:invoiceReference</code> and <code>man:invoiceDescription</code>. It should be case-sensitive.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-28T10:23:13.260Z
Answers.LastActivityDate: 2018-11-28T10:23:13.260Z
Answers.UserDisplayName: jitendra - fuzion
Body: <p>Eway provides a way to add invoice ref and description by adding params like <code>InvoiceDescription</code> and <code>InvoiceReference</code> in <a href="https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_alterPaymentProcessorParams/" rel="nofollow noreferrer"><code>alterPaymentProcessorParams</code> hook</a> provided by civicrm.</p>
  <p>Unfortunately this does not work for recurring payments.</p>
  <p>Eway does not seem to provide any flexibility to set <code>Invoice reference</code> or <code>Invoice Description</code> for a recurring payment. See the parameter that could be set - <a href="https://eway.io/api-v3/#recurring-payments" rel="nofollow noreferrer">https://eway.io/api-v3/#recurring-payments</a>.</p>
  <p>Any thoughts for an alternative way to set these field values?</p>
  <p>We are using Eway recurring extension to record payments in civi - <a href="https://civicrm.org/extensions/eway-recurring-payment-processor" rel="nofollow noreferrer">https://civicrm.org/extensions/eway-recurring-payment-processor</a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-22T00:39:29.983Z
Comments.Text: Have you had a look at the 'other' eWAY Recurring extension? https://github.com/agileware/au.com.agileware.ewayrecurring
  I haven't tried it but the code at least seems to use `InvoiceDescription` and `InvoiceReference`.
Comments.UserDisplayName: Andrew Thompson
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-22T03:57:08.030Z
Comments.Text: The above extension also seems to be providing invoice description and reference for one-off payments only.
Comments.UserDisplayName: jitendra - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-23T20:30:16.483Z
Comments.Text: what about the Omnipay option?
Comments.UserDisplayName: petednz - fuzion
Tags: <recurring-contributions><eway>
Title: Eway recurring - Any method to record invoice reference and description?
ThreadText: # Eway recurring - Any method to record invoice reference and description?
  
  (Asked by: username_0 on 2018-11-21)
  
  Eway provides a way to add invoice ref and description by adding params like `InvoiceDescription` and `InvoiceReference` in [`alterPaymentProcessorParams` hook](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_alterPaymentProcessorParams/) provided by civicrm.
  
  Unfortunately this does not work for recurring payments.
  
  Eway does not seem to provide any flexibility to set `Invoice reference` or `Invoice Description` for a recurring payment. See the parameter that could be set - <https://eway.io/api-v3/#recurring-payments>.
  
  Any thoughts for an alternative way to set these field values?
  
  We are using Eway recurring extension to record payments in civi - <https://civicrm.org/extensions/eway-recurring-payment-processor>
  
  **Tags:** recurring-contributions, eway
  
  > **Comments:**
  > **username_1**: Have you had a look at the 'other' eWAY Recurring extension? https://github.com/agileware/au.com.agileware.ewayrecurring I haven't tried it but the code at least seems to use `InvoiceDescription` and `InvoiceReference`.  
  > **username_0**: The above extension also seems to be providing invoice description and reference for one-off payments only.  
  > **username_2**: what about the Omnipay option?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-11-28. Score: 2 | Accepted answer
  
  ok - this has fixed for us and the reason was the incorrect param sent to the ProcessPayment operation. The correct way of sending the invoice params is -
  
  ```
  $client = CRM_Core_Payment_EwayUtils::getClient($params['payment_processor_id']);
  $endPoint = 'https://www.eway.com.au/gateway/managedpayment/ProcessPayment';
  
  $paymentInfo = array(
    'man:managedCustomerID' => $params['managed_customer_id'],
    'man:amount' => $params['amount_in_cents'],
    'man:invoiceReference' => $params['invoice_id'],
    'man:invoiceDescription' => $params['description'],
  );
  $result = $client->call('man:ProcessPayment', $paymentInfo, '', $endPoint);
  
  ```
  
  Note the correct usage of `man:invoiceReference` and `man:invoiceDescription`. It should be case-sensitive.
  
  
  ---
  
  