Get Campaign Selection Page context
Returns the context for the Campaign Selection Page, which presents the list of campaigns fetched from the payment gateway in the preceding CampaignListPage step. The user selects one campaign from this list to apply to the order.
Preconditions:
Campaign data must have been fetched (i.e.,
campaignsmust not benullin the current pre-order state; an empty list[]is accepted)
Skip Conditions:
Page is skipped if a campaign has already been selected (i.e.,
selected_campaignis notnullin the current pre-order state)
available_for_post_order: true
Next Pages (determined dynamically):
Proceeds to the next applicable checkout step once a campaign is selected
Required header for AJAX requests. Must be set to XMLHttpRequest for all checkout requests.
XMLHttpRequestPossible values: Session cookie header (e.g. sessionid=abc123 or osessionid=<session_id>)
Campaign Selection Page context retrieved
GET /orders/checkout/?page=CampaignSelectionPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Accept: */*
Campaign Selection Page context retrieved
{
"context_list": [
{
"page_name": "CampaignSelectionPage",
"page_slug": "campaignselectionpage",
"page_context": {
"campaigns": [
{
"code": "CAMP001",
"name": "3 Installments Campaign"
},
{
"code": "CAMP002",
"name": "6 Installments Campaign"
}
]
}
}
],
"pre_order": {
"user_email": "user@akinon.com",
"payment_option": {
"pk": 3,
"name": "Credit Card",
"slug": "credit-card",
"payment_type": "credit_card",
"payment_type_label": "Credit Card"
},
"campaigns": [
{
"code": "CAMP001",
"name": "3 Installments Campaign"
},
{
"code": "CAMP002",
"name": "6 Installments Campaign"
}
],
"selected_campaign": null
},
"errors": [],
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

