Error in Service [releaseOrderPaymentPreference]: Problem releasing payment

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

Error in Service [releaseOrderPaymentPreference]: Problem releasing payment

Jacques Le Roux
Administrator
While trying to edit DEMO10090 order items I got an NPE in

releaseOrderPaymentPreference[917]
releaseContext.put("releaseAmount", authTransaction.getBigDecimal("amount"));

I fixed it using
        if (UtilValidate.isNotEmpty(authTransaction)) {
            releaseContext.put("releaseAmount", authTransaction.getBigDecimal("amount"));
        } else {
            releaseContext.put("releaseAmount", null);
        }

But then  I got Error in Service [releaseOrderPaymentPreference]: Problem releasing payment
I gave up at this stage. What could be the reason ?

Thanks

Jacques

Reply | Threaded
Open this post in threaded view
|

Re: Error in Service [releaseOrderPaymentPreference]: Problem releasing payment

Scott Gray-2
Your fix probably failed because releaseAmount is required by the  
service that is being called.  If no authTransaction is found I guess  
there isn't much point in trying to release it anyway.
But from there a couple of question arise as to what the actual bug is:
- Is the authTransaction present and just not being correctly searched  
for?
- Should releaseOrderPaymentPreference be called if there is no  
authorized transaction?  The code appears to assume the payment pref  
is in an authorized state so the check must be taking place earlier.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 16/11/2009, at 11:49 AM, Jacques Le Roux wrote:

> While trying to edit DEMO10090 order items I got an NPE in
> releaseOrderPaymentPreference[917]  
> releaseContext.put("releaseAmount",  
> authTransaction.getBigDecimal("amount"));
>
> I fixed it using
>       if (UtilValidate.isNotEmpty(authTransaction)) {
>           releaseContext.put("releaseAmount",  
> authTransaction.getBigDecimal("amount"));
>       } else {
>           releaseContext.put("releaseAmount", null);
>       }
>
> But then  I got Error in Service [releaseOrderPaymentPreference]:  
> Problem releasing payment
> I gave up at this stage. What could be the reason ?
>
> Thanks
>
> Jacques
>


smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Error in Service [releaseOrderPaymentPreference]: Problem releasing payment

Jacques Le Roux
Administrator
Hi Scott,

Forget it (at least for now) I'm not able to reproduce after an ant clean-all run-install

Thanks

Jacques

From: "Scott Gray" <[hidden email]>

> Your fix probably failed because releaseAmount is required by the  
> service that is being called.  If no authTransaction is found I guess  
> there isn't much point in trying to release it anyway.
> But from there a couple of question arise as to what the actual bug is:
> - Is the authTransaction present and just not being correctly searched  
> for?
> - Should releaseOrderPaymentPreference be called if there is no  
> authorized transaction?  The code appears to assume the payment pref  
> is in an authorized state so the check must be taking place earlier.
>
> Regards
> Scott
>
> HotWax Media
> http://www.hotwaxmedia.com
>
> On 16/11/2009, at 11:49 AM, Jacques Le Roux wrote:
>
>> While trying to edit DEMO10090 order items I got an NPE in
>> releaseOrderPaymentPreference[917]  
>> releaseContext.put("releaseAmount",  
>> authTransaction.getBigDecimal("amount"));
>>
>> I fixed it using
>>       if (UtilValidate.isNotEmpty(authTransaction)) {
>>           releaseContext.put("releaseAmount",  
>> authTransaction.getBigDecimal("amount"));
>>       } else {
>>           releaseContext.put("releaseAmount", null);
>>       }
>>
>> But then  I got Error in Service [releaseOrderPaymentPreference]:  
>> Problem releasing payment
>> I gave up at this stage. What could be the reason ?
>>
>> Thanks
>>
>> Jacques
>>
>
>