Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update use.rst #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions docs/howto/use.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down