• Resolved njgage

    (@njgage)


    Hi,

    I’m using this plugin to create gift cards – https://yithemes.com/themes/plugins/yith-woocommerce-gift-cards/.

    I have set up 2 gift cards for testing. 1 that has a fixed amount and one that has some pre-filled amounts and the option to add a manual amount.

    Only the gift card with the fixed amount is appearing on the invoice in Xero. The one with the variable amount is failing the API POST to /api.xro/2.0/Payments. The amount is coming through as 0 in all cases I’m getting this error:

    <ValidationError>
    <Message>Payment amounts must be positive amounts</Message>
    </ValidationError>

    There’s a chance that this is something that needs to be fixed in the gift card plugin. But it would be good to understand:
    1. what field value in which table is used to send the payment amount to Xero.
    2. the item is currently created as ‘git card’ but has an amount 0. Will Xero be able to handle the same item having different pricing every time it’s used?

    Thanks,
    Nick

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author palloyd

    (@palloyd)

    Dear Nick

    Thank you for your question.

    I don’t have any experience of using this plugin. My suggestions would be to:

    1. Check your Xeroom settings and try changing the Master setting from/to Xero from/to Woo to see if that makes a difference. I think the error is due to trying to send a payment of 0 to Xero which is getting rejected by the Xero API’s error trapping. Using Xero as the master might get around that as the prices in Xero are used instead of being sent from Woo. The question is why is a payment of 0 being passed?

    2. Try disabling the gift card plugin and doing the test.
    3. I will need to ask my developer what field is being used.

    Kind regards

    Pete

    Thread Starter njgage

    (@njgage)

    Hi,

    I’ve done a bit more investigation and because the gift card could in theory have any amount it’s not possible to define the sales price either in woocommerce or xero. I’ve decided to simplify this I’m just going to create multiple gift card for fixed amounts!

    Nick

    Plugin Author palloyd

    (@palloyd)

    Hi Nick

    I think that is a good idea as the handling of zero amounts can cause many unexpected problems for accounting systems.

    Glad you have sorted it.

    Pete

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Variable product price’ is closed to new replies.