Commit 4962d490 authored by Xiaowu Zhang's avatar Xiaowu Zhang

slapos_subscription_request: change order confirmation url

parent 433987af
......@@ -34,14 +34,14 @@ person, person_is_new = context.SubscriptionRequest_createUser(email, user_input
# Check if user is already exist, otherwise redirect to ask confirmation
if confirmation_required and not person_is_new:
base_url = web_site.absolute_url()
redirect_url = "%s/#order_confirmation?name=%s&email=%s&amount=%s&subscription_reference=%s" % (
redirect_url = "%s/order_confirmation?field_your_reservation_name=%s&field_your_reservation_email=%s&field_your_reservation_number_of_machines=%s&field_your_reservation_network=%s" % (
base_url,
person.getTitle(),
person.getDefaultEmailText(),
user_input_dict["amount"],
subscription_reference)
if token:
redirect_url += "&token=%s" % token
redirect_url += "&field_your_reservation_invitation_token=%s" % token
return context.REQUEST.RESPONSE.redirect(redirect_url)
if target_language is None:
......
......@@ -353,8 +353,9 @@ class Test0SubscriptionRequestModule_requestSubscriptionProxy(TestSubscriptionSk
email=email, subscription_reference=subscription_reference,
confirmation_required=True, user_input_dict=user_input_dict)
self.assertTrue(response.endswith("#order_confirmation?name=Member Template&email=%s&amount=1&subscription_reference=test_subscription_reference" % email), response)
self.assertTrue(
response.endswith(
"order_confirmation?field_your_reservation_name=Member Template&field_your_reservation_email=%s&field_your_reservation_number_of_machines=1&field_your_reservation_network=test_subscription_reference" % email), response)
# Missing tests XXXX
class TestSubscriptionRequest_applyCondition(TestSubscriptionSkinsMixin):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment