Hello,
When auto_capture_on_dispatch = true and we have more than one shipments. Shipping any shipment will capture the amount = shipment total. This does not work with Braintree payment gateway as it does not support partial payment. So if you have authorized $100 while checkout and try to capture $50 and $50 in two transaction than it will not work.
So capture! on second attempt will raise below error.
Gateway Error
--- !ruby/object:ActiveMerchant::Billing::Response
params:
braintree_transaction:
message: Cannot submit for settlement unless status is authorized. (91507)
success: false
test: false
authorization:
fraud_review:
avs_result:
code:
message:
street_match:
postal_match:
cvv_result:
code:
message:
I think shipment should be associated with the payments where payment amoumt = shipment total and should be authorized for each shipments. So when particular shipment is shipped its associated authorized payment will be captured.
Thanks,
Kunal