I’ve tracked this down to the bundles setting a negative price to a cart item to achieve the bundle discount. Example:
Bundle product requires 4 products
Each product is $30, Bundle is set to have fixed discount of $20 ($100 total).
This is how AfterPay receives the information:
[items] => Array
(
[0] => Array
(
[name] => Product Bundle
[sku] =>
[quantity] => 1
[price] => Array
(
[amount] => -20.00
[currency] => AUD
)
)
[1] => Array
(
[name] => Product name 1
[sku] => AAA1
[quantity] => 2
[price] => Array
(
[amount] => 30.00
[currency] => AUD
)
)
[2] => Array
(
[name] => Product name 2
[sku] => AAA2
[quantity] => 1
[price] => Array
(
[amount] => 30.00
[currency] => AUD
)
)
[3] => Array
(
[name] => Product name 3
[sku] => AAA3
[quantity] => 1
[price] => Array
(
[amount] => 30.00
[currency] => AUD
)
)
)
As the first item has a negative value, the order fails.
This does not seem to be the case if a % discount is set on the bundle, or if you enable a fixed price for the bundle.
To resolve: can you make the ‘discount amount’ NOT a negatively priced item? Alternatively, what is the difference between setting a fixed price for the bundle vs setting a discount amount for the bundle (aside from a user interface perspective)?