Author: arunpatidar
Date: Sat Jul 8 23:21:13 2017
New Revision: 1801340
URL:
http://svn.apache.org/viewvc?rev=1801340&view=revLog:
Fixed: Insufficient checking of checkOutPaymentId in CheckOutEvents.getSelectedPaymentMethods. (OFBIZ-9404)
Applied slightly modified patch. Thanks Martin for your contribution.
Modified:
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutEvents.java
Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutEvents.java?rev=1801340&r1=1801339&r2=1801340&view=diff==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutEvents.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutEvents.java Sat Jul 8 23:21:13 2017
@@ -289,6 +289,11 @@ public class CheckOutEvents {
ShoppingCart cart = (ShoppingCart) request.getSession().getAttribute("shoppingCart");
Map<String, Map<String, Object>> selectedPaymentMethods = new HashMap<String, Map<String, Object>>();
String[] paymentMethods = request.getParameterValues("checkOutPaymentId");
+
+ String checkOutPaymentId = (String) request.getAttribute("checkOutPaymentId");
+ if ((paymentMethods == null || paymentMethods.length <= 0) && UtilValidate.isNotEmpty(checkOutPaymentId)) {
+ paymentMethods = new String[] {checkOutPaymentId};
+ }
if (UtilValidate.isNotEmpty(request.getParameter("issuerId"))) {
request.setAttribute("issuerId", request.getParameter("issuerId"));