From 3fd2666efddafd9b150479ed3faf1f193f2eb024 Mon Sep 17 00:00:00 2001 From: shehrozkapoor <59894229+shehrozkapoor@users.noreply.github.com> Date: Mon, 17 May 2021 17:14:24 +0500 Subject: [PATCH] Update use.rst get_form_action() and get_form_fields() does contain any parameter to pass when we initialise the class we have to pass the order_data in contractor --- docs/howto/use.rst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/howto/use.rst b/docs/howto/use.rst index c605742..4801116 100644 --- a/docs/howto/use.rst +++ b/docs/howto/use.rst @@ -18,7 +18,11 @@ Of course, one can use Oscar's ``get_class`` function instead:: >>> from oscar.core.loading import get_class >>> Scaffold = get_class('adyen.scaffold', 'Scaffold') - >>> sclaffold = Scaffold() + +#order_data default is None if you want to pass the order data you can initialize using constructor + + >>> scaffold = Scaffold(order_data=payment_data) + ``Scaffold`` should be the only class used in your application, and you can consider it as the public interface of the plugin. @@ -33,8 +37,8 @@ several fields as described in the Adyen HPP Documentation. You can get both from the scaffold:: >>> sclaffold = Scaffold() - >>> form_action_url = scaffold.get_form_action(request) - >>> form_fields = scaffold.get_form_fields(request, payment_data) + >>> form_action_url = scaffold.get_form_action() + >>> form_fields = scaffold.get_form_fields() This should be used in the last view of your checkout before the payment return view - for example, in ``get_context_data`` to add the form URL and form