Developer forum

Forum » Development » Error with PaymentFee on custom made CheckoutHandler

Error with PaymentFee on custom made CheckoutHandler

Rob Lohmann
Reply

For a customer we've got an custom made checkouthandler for afterpay.

The handler works just fine, but the customer wants to charge an paymentfee of 1,99 euros when customer us this method. As soon as we enable this we're getting a vague error saying "field.invalid". I can't figure out where the error is coming from and we don't have access to the source code, so unfortunately debugging is quite difficult.

Will it be an option to add a paymentfee programatically with a FeeProvider or OrderTemplateExtender so that it's added as an additional orderline?

I've also attached the dll. file i'm currently using.


Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Rob,

 

This error seems to originate in the ProcessCheckout method in the CheckoutHandler. There is a call to bestelProcesServicesNewClient.validateEnterAndCheckOrderShort which produces a result. The following checks determine that this result contains an error. So I think the error comes from AfterPay in the result according to the code, I can decompile from your .dll.

 

How do you add the fee to the order?

 

- Jeppe

 
Rob Lohmann
Reply

Hi Jeppe,

Thanks for the quick response.

Currently the fee is just added through Dynamicweb, but since this is giving the previously described error i'm looking for another way around. I've added it through Management Center > eCommerce Settings > Orders > Payment. Here i have filled the Comission and the Country specific costs.

 

- Rob

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply
Do you have a link to the site where I can test this? If you don't want links and credentials floating on the forums, you can email them directly to me jea_@_dynamicweb.dk (remove the "_").
 
Rob Lohmann
Reply

Hi Jeppe,

Thanks for your help! Will drop you an email with the urls.
The urls reffer to an staging environment, so you should be able to test there.

- Rob

 

You must be logged in to post in the forum