Re: Users - Ecommerce: Using BillingAccountfor checkoutreturns "Please select a method of payment"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Users - Ecommerce: Using BillingAccountfor checkoutreturns "Please select a method of payment"

Si Chen-2
So was there a bug?  If so, what should we do to fix it?

Vinay Agarwal wrote:
David,
You are right. No change will be made to this function.
Vinay

-----Original Message-----
From: [hidden email] [[hidden email]]
On Behalf Of David E. Jones
Sent: Wednesday, April 12, 2006 3:16 PM
To: OFBiz Users / Usage Discussion
Subject: Re: [OFBiz] Users - Ecommerce: Using BillingAccountfor
checkoutreturns "Please select a method of payment"


This isn't quite correct. Other payment types can have an amount associated,
and in fact for payments split among various payment methods this is
necessary.

If you aren't seeing these options then it is probably because you are
looking at the one-page checkout screen. It doesn't have some of the details
that are on the split out payment screen, for example.

-David


Vinay Agarwal wrote:
  
Si,

Well, the amount should be replaced with null since it is null for all 
payment types as far as I can tell. No payment type, except for billing 
account, has amount string, therefore, amount is null for them. For 
billing account, it's looking at amount_EXT_BILLACT field which is also 
null.

Vinay

 

-----Original Message-----
*From:* [hidden email] 
[[hidden email]] *On Behalf Of *Si Chen
*Sent:* Wednesday, April 12, 2006 2:07 PM
*<a class="moz-txt-link-freetext" href="To:*">To:* OFBiz Users / Usage Discussion
*Subject:* Re: [OFBiz] Users - Ecommerce: Using BillingAccountfor 
checkoutreturns "Please select a method of payment"

 

Are you sure? Where would amount come  from?

Vinay Agarwal wrote:

Si,

On second thought, we should simply delete the stuff to get amount and

change this

----------------

                String amountStr = request.getParameter("amount_" +

paymentMethods[i]);

                }

                Double amount = null;

                if (amountStr != null && amountStr.length() > 0 &&

!"REMAINING".equals(amountStr)) {

                    try {

                        amount = new

Double(formatter.parse(amountStr).doubleValue());

                    } catch (ParseException e) {

                        Debug.logError(e, module);

                        errMsg = UtilProperties.getMessage(resource,

"checkevents.invalid_amount_set_for_payment_method", (cart != null ?

cart.getLocale() : Locale.getDefault()));

                        request.setAttribute("_ERROR_MESSAGE_", errMsg);

                        return null;

                    }

                }

                if (amount != null)

selectedPaymentMethods.put(paymentMethods[i], amount);

------------------

 

to 

 

------------------

selectedPaymentMethods.put(paymentMethods[i], amount);

-------------------

 

Vinay

 

-----Original Message-----

From: [hidden email] [hidden email]
    
[[hidden email]]
  
On Behalf Of Vinay Agarwal

Sent: Wednesday, April 12, 2006 12:43 PM

To: 'OFBiz Users / Usage Discussion'

Subject: Re: [OFBiz] Users - Ecommerce: Using BillingAccountfor

checkoutreturns "Please select a method of payment"

 

Si,

If you have reverted the change, then there is no point in making this

change either since the amount is null in all cases but the payment is
    
still
  
added to payment methods. I will double check that it works.

Vinay

 

-----Original Message-----

From: [hidden email] [hidden email]
    
[[hidden email]]
  
On Behalf Of Si Chen

Sent: Wednesday, April 12, 2006 12:40 PM

To: OFBiz Users / Usage Discussion

Subject: Re: [OFBiz] Users - Ecommerce: Using BillingAccount for

checkoutreturns "Please select a method of payment"

 

Vinay,

 

I reverted the change yesterday.  Sorry about that.

 

Should I make the change you suggested to the SVN?

 

Si

 

Vinay Agarwal wrote:

  

    
David, Chris, and Si,
 
On further investigation CheckOutEvents.getSelectedPaymentMethods wants a
billingAccountId in checkOutPaymentId input field but checkoutoptions.ftl
provides "EXT_BILLACT".
 
In CheckOutEvents.getSelectedPaymentMethods, by changing this line
----
  String amountStr = request.getParameter("amount_" + paymentMethods[i]);
----
To 
----
  String amountStr = null;
  if ("EXT_BILLACT".equals(paymentMethods[i])) {
     amountStr = request.getParameter("amount_" +
request.getParameter("billingAccountId"));
  } else {
     amountStr = request.getParameter("amount_" + paymentMethods[i]);
  }
----
makes the billingAccount work. 
 
Si, you added yesterday 
   if (amount != null)
before adding a payment method to selectedPaymentMethods map, but it
    
      
breaks

  

    
the credit card payment method since there isn't a corresponding amount
string in checkoutoptions.ftl.
 
Regards,
Vinay Agarwal
 
 
 
_______________________________________________
Users mailing list
[hidden email] [hidden email]
http://lists.ofbizorg/mailman/listinfo/users
      
<http://lists.ofbiz.org/mailman/listinfo/users>
  
 
 
  
    
      
 

 

_______________________________________________

Users mailing list

[hidden email] [hidden email]

http://lists.ofbizorg/mailman/listinfo/users
    
<http://lists.ofbiz.org/mailman/listinfo/users>
  
 

_______________________________________________

Users mailing list

[hidden email] [hidden email]

http://lists.ofbizorg/mailman/listinfo/users
    
<http://lists.ofbiz.org/mailman/listinfo/users>
  
 

_______________________________________________

Users mailing list

[hidden email] [hidden email]

http://lists.ofbizorg/mailman/listinfo/users
    
<http://lists.ofbiz.org/mailman/listinfo/users>
  
 

 

  


------------------------------------------------------------------------

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
    
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users


  

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Ecommerce:Using BillingAccountfor checkoutreturns "Please select a method of payment"

Vinay Agarwal

Part of the problem I observed was caused by the “if (amount != null)” change. For single page checkout, no change is needed. I haven’t looked at the multi-page checkout with split payments whether the following change is needed or not.

Vinay

 

  String amountStr = null;

  if ("EXT_BILLACT".equals(paymentMethods[i])) {
     amountStr = request.getParameter("amount_" +
request.getParameter("billingAccountId"));
  } else {
     amountStr = request.getParameter("amount_" + paymentMethods[i]);
  }

 

 

 


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users