What happens after the user hits "Submit" on the Checkout Review Screen
This is more of a note taking page while I go through everything so it will be a little messy today.
The following URL is requested: <@ofbizUrl>processorder</@ofbizUrl>
String processPayment(HttpServletRequest request, HttpServletResponse response) |
This method calls:
private static boolean processPayment(HttpServletRequest request) |
public Map processPayment(GenericValue productStore, GenericValue userLogin, boolean faceToFace, boolean manualHold) |
request: processorder, invoke: java event: CheckOutEvents: createOrder, responses = sales_order|work_order|error, values = checkBlacklist|checkBlackList|checkoutreview
request: checkBlacklist, invoke java event: CheckOutEvents: checkOrderBlacklist, responses = success|failed|error, values = processpayment|failedBlacklist|checkoutreview
request: processpayment, invoke java event: CheckOutEvents:processPayment, responses = success|fail|error, values = clearcartfororder|checkouterror|checkoutreview
java: CheckOutEvents.processpayment
String processPayment(HttpServletRequest request, HttpServletResponse response)
3 return(failureCode) codes: "success = 0", "fail = 1", and "error = 2"
calls:if (!processPayment(request))
private static boolean processPayment(HttpServletRequest request)
calls:
public Map processPayment(GenericValue productStore, GenericValue userLogin, boolean faceToFace, boolean manualHold)
calls:
public static Map processPayment(String orderId, BigDecimal orderTotal, String currencyUomId, GenericValue productStore, GenericValue userLogin, boolean faceToFace, boolean manualHold, LocalDispatcher dispatcher, GenericDelegator delegator)
<service name="authOrderPayments" engine="java"
location="org.ofbiz.accounting.payment.PaymentGatewayServices" invoke="authOrderPayments" auth="true">
<description>Process (authorizes/re-authorizes) payments for an order</description>
<attribute name="orderId" type="String" mode="IN" optional="false"/>
<attribute name="processResult" type="String" mode="OUT" optional="false"/>
<attribute name="authResultMsgs" type="List" mode="OUT" optional="true"/>
<attribute name="reAuth" type="Boolean" mode="IN" optional="true"/>
</service>
public static Map authOrderPayments(DispatchContext dctx, Map context)
<service name="authOrderPaymentPreference" engine="java"
location="org.ofbiz.accounting.payment.PaymentGatewayServices" invoke="authOrderPaymentPreference" auth="true">
<description>Process (authorizes/re-authorizes) a single payment for an order with an optional overrideAmount</description>
<attribute name="orderPaymentPreferenceId" type="String" mode="IN" optional="false"/>
<attribute name="overrideAmount" type="BigDecimal" mode="IN" optional="true"/>
<attribute name="finished" type="Boolean" mode="OUT" optional="false"/>
<attribute name="errors" type="Boolean" mode="OUT" optional="false"/>
<attribute name="messages" type="List" mode="OUT" optional="true"/>
<attribute name="processAmount" type="BigDecimal" mode="OUT" optional="true"/>
</service>
public static Map authOrderPaymentPreference(DispatchContext dctx, Map context)
private static Map authPayment(LocalDispatcher dispatcher, GenericValue userLogin, OrderReadHelper orh, GenericValue paymentPreference, BigDecimal totalRemaining, boolean reauth, BigDecimal overrideAmount) throws GeneralException
private static GenericValue getPaymentSettings(GenericValue orderHeader, GenericValue paymentPreference, String paymentServiceType, boolean anyServiceType)
public static GenericValue getProductStorePaymentSetting(GenericDelegator delegator, String productStoreId, String paymentMethodTypeId, String paymentServiceTypeEnumId, boolean anyServiceType)
*back to authPayment*
private static String getBillingInformation(OrderReadHelper orh, GenericValue paymentPreference, Map toContext) throws GenericEntityException {
processorResult = dispatcher.runSync(serviceName, processContext, TX_TIME, true);