Developer forum

Forum » Dynamicweb 10 » Post & error template from payment provider

Post & error template from payment provider

Caro De Weze
Reply

Hi,

I am configuring the payment provider Stripe, but where can I add the post and error template so that they appear in the dropdown? I can't select anything other than 'Nothing selected'.
I use Swift and I have already tried to add it here: Swift/Files/Templates/Designs/Swift/eCom7/CheckoutHandler/Stripe/Error/ErrorTemplate.cshtml and Swift/Files/Templates/Designs/Swift/eCom7/CheckoutHandler/Stripe/Post/PostTemplate.cshtml, but without success. 

Kind regards,
Caro De Weze


Replies

 
Soe Moe Tun
Reply

Hi 

Could you pls try to put "PostTemplate.cshtml" under this location "Templates/eCom7/CheckoutHandler/Stripe/Post" and "ErrorTemplate.cshtml" under this location "Templates/eCom7/CheckoutHandler/Stripe/Error".

Best Regards,

Oliver

 

 
Caro De Weze
Reply

Hi Oliver,

Thanks, that works, so I can't use Swift?

Kind regards,
Caro De Weze

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Caro,

 

You should be able to:

  • Put empty/dummy templates in Templates/eCom7/CheckoutHandler/Stripe/Post and Templates/eCom7/CheckoutHandler/Stripe/Error
    • ​That's needed there because when you configure a payment method in DW it's not within the context of a website
  • Then by making use of how Design and templates work
    • Place the actual Swift templates with the exact same name under the Design folder structure

 

This will allow Dynamicweb to

  • Have the default set of templates configured properly
  • Override the templates based on the Design of the website being rendered
    • Which is why the actual files configured in the payment method can literally be empty

 

Best Regards,

Nuno Aguiar

 
Caro De Weze
Reply

Hi Nuno,

Thanks for the clear explanation.

Kind regards,
Caro De Weze

 

You must be logged in to post in the forum