Re-factor PaymentGatewayServices processCaptureResult
----------------------------------------------------- Key: OFBIZ-104 URL: http://issues.apache.org/jira/browse/OFBIZ-104 Project: OFBiz (The Open for Business Project) Issue Type: Improvement Components: accounting Reporter: Si Chen Priority: Minor Re-factor the processCaptureResult method which gets the invoiceId to use the Invoice for the parties on the Payment, instead of looking up OrderRole itself like this: String orderId = paymentPreference.getString("orderId"); List orl = null; try { orl = delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "BILL_TO_CUSTOMER")); } catch (GenericEntityException e) { Debug.logError(e, module); } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
[ http://issues.apache.org/jira/browse/OFBIZ-104?page=all ]
Si Chen reassigned OFBIZ-104: ----------------------------- Assignee: Si Chen > Re-factor PaymentGatewayServices processCaptureResult > ----------------------------------------------------- > > Key: OFBIZ-104 > URL: http://issues.apache.org/jira/browse/OFBIZ-104 > Project: OFBiz (The Open for Business Project) > Issue Type: Improvement > Components: accounting > Reporter: Si Chen > Assigned To: Si Chen > Priority: Minor > > Re-factor the processCaptureResult method which gets the invoiceId to use the Invoice for the parties on the Payment, instead of looking up OrderRole itself like this: > String orderId = paymentPreference.getString("orderId"); > List orl = null; > try { > orl = delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "BILL_TO_CUSTOMER")); > } catch (GenericEntityException e) { > Debug.logError(e, module); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-104?page=comments#action_12422801 ]
Si Chen commented on OFBIZ-104: ------------------------------- Also change if (UtilValidate.isEmpty(payTo)) { payTo = "Company"; Debug.logWarning("Using default value of [Company] for payTo on invoice [" + invoiceId + "] and orderPaymentPreference [" + paymentPreference.getString("orderPaymentPreferenceId") + "]", module); } to look for an Invoice party, then use the "Company" default > Re-factor PaymentGatewayServices processCaptureResult > ----------------------------------------------------- > > Key: OFBIZ-104 > URL: http://issues.apache.org/jira/browse/OFBIZ-104 > Project: OFBiz (The Open for Business Project) > Issue Type: Improvement > Components: accounting > Reporter: Si Chen > Assigned To: Si Chen > Priority: Minor > > Re-factor the processCaptureResult method which gets the invoiceId to use the Invoice for the parties on the Payment, instead of looking up OrderRole itself like this: > String orderId = paymentPreference.getString("orderId"); > List orl = null; > try { > orl = delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "BILL_TO_CUSTOMER")); > } catch (GenericEntityException e) { > Debug.logError(e, module); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-104?page=comments#action_12423467 ]
Leon Torres commented on OFBIZ-104: ----------------------------------- I'm assuming the answer to the first part is to use the invoiceId passed in to get the Invoice, and then one of the parties in the invoice is the payment partyIdFrom. This replaces the OrderRole code. The problem is that the invoiceId can be null, which requires some kind of fall-back case... do we use OrderRole as the fall back? > Re-factor PaymentGatewayServices processCaptureResult > ----------------------------------------------------- > > Key: OFBIZ-104 > URL: http://issues.apache.org/jira/browse/OFBIZ-104 > Project: OFBiz (The Open for Business Project) > Issue Type: Improvement > Components: accounting > Reporter: Si Chen > Assigned To: Si Chen > Priority: Minor > > Re-factor the processCaptureResult method which gets the invoiceId to use the Invoice for the parties on the Payment, instead of looking up OrderRole itself like this: > String orderId = paymentPreference.getString("orderId"); > List orl = null; > try { > orl = delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "BILL_TO_CUSTOMER")); > } catch (GenericEntityException e) { > Debug.logError(e, module); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-104?page=all ]
Si Chen resolved OFBIZ-104. --------------------------- Resolution: Fixed > Re-factor PaymentGatewayServices processCaptureResult > ----------------------------------------------------- > > Key: OFBIZ-104 > URL: http://issues.apache.org/jira/browse/OFBIZ-104 > Project: OFBiz (The Open for Business Project) > Issue Type: Improvement > Components: accounting > Reporter: Si Chen > Assigned To: Si Chen > Priority: Minor > > Re-factor the processCaptureResult method which gets the invoiceId to use the Invoice for the parties on the Payment, instead of looking up OrderRole itself like this: > String orderId = paymentPreference.getString("orderId"); > List orl = null; > try { > orl = delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "BILL_TO_CUSTOMER")); > } catch (GenericEntityException e) { > Debug.logError(e, module); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
Free forum by Nabble | Edit this page |