I'm trying to get payment capture to work on R13. I'm using OFBiz OOTB
with demo data.
If I configure the demo store to use a payment processor, I can get an
order authorized okay, but I can't capture the payment - because the
amount to capture is always zero.
I spent some time tracing through the payment processing code and I
see the capture amount is calculated in PaymentGatewayServies.java,
around line 1209.
The basic logic is:
1. Get the order grand total.
2. Sum all payments (including authorizations).
3. Subtract the payment sum from the grand total to get the capture amount.
Okay, so I have an order total of $10. The credit card was authorized
for the full order amount - $10. PaymentGatewayServies.java calculates
as so:
1. Order grand total is $10.
2. Total payments is $10.
3. Amount to capture = $10 minus $10.
I can't imagine no one else is having this problem, so I assume I'm
doing something wrong. Any ideas?
-Adrian