[
https://issues.apache.org/jira/browse/OFBIZ-5640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14047247#comment-14047247
]
Jacques Le Roux commented on OFBIZ-5640:
----------------------------------------
It would help to review if you could give the steps you used to create the order
> Order cancel is throwing error with FIN_ACCOUNT payment
> -------------------------------------------------------
>
> Key: OFBIZ-5640
> URL: https://issues.apache.org/jira/browse/OFBIZ-5640
> Project: OFBiz
> Issue Type: Bug
> Components: order
> Affects Versions: Release Branch 11.04, SVN trunk, Release Branch 12.04,
> Release Branch 13.07
> Reporter: Ritu Raj Lakhera
> Priority: Minor
> Fix For: SVN trunk
>
> Attachments: OFBIZ-5640.patch
>
>
> Generally if payment is PAYMENT_AUTHORIZED (authorized) then OOTB services
> process the release and if payment is PAYMENT_SETTLED
> (captured) then process the refund.
> Service 'releaseOrderPayments' is called by SECA service engine after the
> 'changeOrderStatus' service at the time of canceling the order. This service
> checks the authorized
> payment for release and if does not find any payment then return success with
> out processing. And If this service found any authorized payment
> then release the amount and change the status from PAYMENT_AUTHORIZED to
> PAYMENT_CANCELLED (canceled) by calling the service 'setPaymentStatus'
> But in case of GIFT_CARD, EFT_ACCOUNT and FIN_ACCOUNT this service is not
> checking the authorized payment and trying to release the payment
> even payment has already been captured (See PaymentGatewayServices.java line
> 736 in trunk).
> And thus service 'setPaymentStatus'(See PaymentGatewayServices.java line
> 1060) is going to fail because status change from PAYMENT_SETTLED to
> PAYMENT_CANCELLED is not valid
> (see StatusValidChange entity)
--
This message was sent by Atlassian JIRA
(v6.2#6252)