I'm cancelling orders via the API, and refunding by setting the amount field.
The order is always refunded but sometimes it's not cancelled (not in UI, and the cancelled_at field is still null)
Using the PHP SDK
Did anyone experience this before?
Are the orders you are trying to cancel already fulfilled? If they are, you would first need to cancel the fulfillment, and then you will be able to cancel the order.