Support

Home Forums Event Espresso Premium Payment Error only when using a coupon code

Payment Error only when using a coupon code

Posted: December 10, 2024 at 12:13 pm

Viewing 10 reply threads


NWCEAI

December 10, 2024 at 12:13 pm

I have paypal commerce hooked up and it works fine but if you use a coupon code and try to pay it gives this error “Error response received: There was an error with this payment. See the logs for details.” I need this to work 🙂


Tony

  • Support Staff

December 10, 2024 at 3:20 pm

Hi there,

Can you please add some details on how the ticket pricing and promotion are both set up?


Garth

  • Support Staff

December 10, 2024 at 3:29 pm

Hi there,

Can you provide the log information for these transactions? The payment logs are in Event Espresso > Payment Methods > Logs tab.


NWCEAI

December 11, 2024 at 5:54 am

In the logs under “Payment Details” >> “Gateway Response” it says “missing_order”


NWCEAI

December 11, 2024 at 5:58 am

The coupon is 15% off select events. There are 6 events selected for this promotion.


Tony

  • Support Staff

December 11, 2024 at 6:33 am

What is the price structure of your tickets?

For example, fixed value with any price modifiers? How much?

I’m asking becuase I’m testing PayPal Commerce with Promotions and not running into issues so this could be related to whatever the line_item break down is for your specific set up.


NWCEAI

December 11, 2024 at 10:21 am

Fixed price with no modifiers. I created a new promotion for testing purposes and it still wouldn’t work. Not sure what the issue is


Tony

  • Support Staff

December 11, 2024 at 12:26 pm

Ok, so what price?

Can you link me to one of the events you’ve tested this on?

In the logs under “Payment Details” >> “Gateway Response” it says “missing_order”

These aren’t the correct logs, if you go to Event Espresso -> Payment Methods -> Logs (tabs across the top of the page).

You’ll see a list of log entries related to payments, those are the log entries that will shed some light on this.

Add a registration, use the 15% off promotion and test a payment.

Then in the able above you should see log entries for your transaction, check for any errors in those.


NWCEAI

December 11, 2024 at 1:07 pm

Here is one error:

https://api-m.paypal.com/v2/checkout/orders/
name INVALID_REQUEST
message Request is not well-formed, syntactically incorrect, or violates schema.
debug_id d82edbe1919a2
details
field /purchase_units/@reference_id==’default’/amount/value
value 169.15
location body
issue INVALID_STRING_LENGTH
description The value of a field is either too short or too long.
field /purchase_units/@reference_id==’default’/amount/breakdown/discount/value
value 29.85
location body
issue INVALID_STRING_LENGTH
description The value of a field is either too short or too long.
links
href https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_STRING_LENGTH
rel information_link
encType application/json


NWCEAI

December 11, 2024 at 1:08 pm

Another log error:

missing_order
error missing_order
message Request is not well-formed, syntactically incorrect, or violates schema.


Tony

  • Support Staff

December 11, 2024 at 2:00 pm

Ah, ok… I know what that error is likely from.

You’re running into issues with ‘float’ values, which are decimals such as 169.15, and that usually means your version of PHP has its serialize_precision values set to something high like 100.

That means 169.15 is actually represented as something like 169.15476885475522 and PayPal only accept 2 decimal places so throws INVALID_STRING_LENGTH

To confirm this go to Event Espresso -> Maintenance -> System information.

Search for ‘serialize precision’ on that page, what is the value set to?

I recommend setting it to be -1 and your host will often have a section for you to change PHP settings like this within your control panel. If they don’t just open up a ticket with them and have them set this for you, that should fix this.

Viewing 10 reply threads

You must be logged in to reply to this support post. Sign In or Register for an Account

Event Espresso