You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by ad...@sandglass-software.com on 2013/12/03 22:00:05 UTC
Puzzled about payment capture implementation
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
Re: Puzzled about payment capture implementation
Posted by ad...@sandglass-software.com.
One more detail: This problem exists only when I try to Quick Ship the
order. If I click the Capture button and do a manual capture, it works
fine.
-Adrian
Quoting adrian.crum@sandglass-software.com:
> 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
>
>
>