weareswat / invoicexpress-gem

InvoiceXpress ruby gem
www.invoicexpress.com
12 stars 22 forks source link

On Invoicexpress.create_invoice, mb_reference is serialized twice #17

Closed jmnsf closed 8 years ago

jmnsf commented 8 years ago

Code is Invoicexpress.create_invoice invoice_data.

Where invoice_data includes mb_reference = true.

Output is:

<?xml version="1.0" encoding="UTF-8"?>
<invoice>
  <date>20/02/2016</date>
  <due_date>20/02/2016</due_date>
  <retention>0</retention>
  <mb_reference>true</mb_reference>
  <client>
    (...)
  </client>
  <items type="array">
    (...)
  </items>
  <mb_reference>true</mb_reference>
</invoice>

So, two mb_references.

paulosilva86 commented 8 years ago

@jmnsf Is this the xml generated before making the request to invoices/create? Are you having any errors because of the mb_reference duplication?

jmnsf commented 8 years ago

It's the XML that gets sent to the API, as recorded by VCR. Don't know if this has any practical implications because the feature isn't active and a reference isn't generated. I can get back to you once I retry and generate one.

paulosilva86 commented 8 years ago

@jmnsf OK. But if the account doesn't have any payment provider configured the mb_reference params will just be ignored.