[ https://issues.apache.org/jira/browse/OFBIZ-5640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14594579#comment-14594579 ]
Arun Patidar commented on OFBIZ-5640: ------------------------------------- Hi Vyom, Can you please share the steps for capturing payment manually after order creation? As we are not seeing OPP status 'PAYMENT_SETTLED' after capturing payment from order detail page. > 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, Release Branch 12.04, Release > Branch 13.07, Trunk > Reporter: Ritu Raj Lakhera > Assignee: Ashish Vijaywargiya > Priority: Minor > 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.3.4#6332)