question

seaton avatar image
seaton asked seaton commented

E-Commerce Service API - iframe integration - few issues on sandbox env

Dear,


we implement card acceptance using Ecommerce Service API and iframe integration.

For this implementation, we follow documentation/examples available on the Clover developer's community site.

We are able to create a charge with test cards, however, we have found a few issues.


1. Submitting empty payment form - when submitting an empty form, instead list of errors we got an unhandled js exception. Stack trace:

card-cvv_10.entry.js:1 Uncaught TypeError: Cannot read property 'replace' of undefined

at CardElement.getFieldData (card-cvv_10.entry.js:1)

at CardElement.postMessageHandler (card-cvv_10.entry.js:1)

at index-7b61f880.js:1


2. Tax amount - tax amount is calculated and sent to Clover API when creating charge together with the transaction amount. However, taxAmount is not visible in Clover dashboard Transactions/Payments. In both situations, when a capture flag is true and false.


3. Send receipt - would Clover automatically send the receipt to the provided email address when creating a charge, if not, is it possible to trigger to email with receipt detail to the cardholder email address.


Thank you for your feedback.

Seaton

e-commerce api
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

1) Thanks for the report, this was a bug and has been fixed. Please try again and let us know if you are still having issues.

2) I don't believe taxes are officially supported yet, but you need to set "tax_amount" not "taxAmount" on the charge request. Please note, you may see some discrepancies on the web receipt. We are aware of this issue and are tracking it internally.

3) We automatically send a receipt.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

gd213 avatar image
gd213 answered
{
  "CARD_NUMBER": "Card number is required.", 
  "CARD_DATE": "Card expiry is required.", 
  "CARD_CVV": "Card CVV is required.", 
  "CARD_POSTAL_CODE": "Card postal code is required."
}

createToken errors if any will be in the above format

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

seaton avatar image
seaton answered seaton commented

Dear David,


thank you very much for your prompt reaction, very appreciate it.

1st topic - now everything works as expected.

2nd topic - we have changed as suggested, now it works. Regards the tax amount, it is presented as expected in the transaction payment list, however, the receipt does not contain the tax amount, as indicated by you (example: https://sandbox.dev.clover.com/p/6186RM9E9S8XY).

3rd topic - we have received an email after successful payment.


Best,

SeatOn


4 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image David Marginian ♦♦ commented ·

2, weird. I can't reproduce that. It looks like the web receipt is subtracting the tax from the total, but not displaying the tax. I believe you are supposed to include the tax in the amount/total. So in your case the charge amount should be 1145 and the tax_amount should be 95. Can you try that and let me know what the receipt looks like?

0 Likes 0 ·
seaton avatar image seaton David Marginian ♦♦ commented ·

Hi David,

sharing more details on this test transaction below.

We will try your scenario and let you know the outcome.

Test transaction is defined in a fallowing way:

  • The total reservation fee is 10.5 USD, we charge card for this amount.
  • Tax is defined as 10% of the charged amount.


We would expect the following numbers in receipt:

  • Item 1 9.55 USD (this is correct for our example) Question: is it possible to change "Item 1" label somehow?
  • Total tax 0.95 USD (this is not shown)
  • Total 10.50 USD (which was the actual amount we charge card, this is wrong on receipt)


On the rest interface we send the following data when creating charge:

  • amount=1050
  • tax_amount=95


Please let me know if you need more details on this.


Best,

SeatOn

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ seaton commented ·

I already looked at your raw request in the logs. As I said in my original response:

Please note, you may see some discrepancies on the web receipt. We are aware of this issue and are tracking it internally.


0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community