Merge pull request #6463 from edx/hotfix/ecom-872

Fix ECOM-872
This commit is contained in:
Will Daly
2015-01-06 09:25:27 -05:00
2 changed files with 8 additions and 1 deletions

View File

@@ -1217,7 +1217,14 @@ class ReceiptRedirectTest(UrlResetMixin, ModuleStoreTestCase):
@patch.dict(settings.FEATURES, {'SEPARATE_VERIFICATION_FROM_PAYMENT': True})
def test_show_receipt_redirect_to_verify_student(self):
# Create other carts first
# This ensures that the order ID and order item IDs do not match
Order.get_cart_for_user(self.user).start_purchase()
Order.get_cart_for_user(self.user).start_purchase()
Order.get_cart_for_user(self.user).start_purchase()
# Purchase a verified certificate
self.cart = Order.get_cart_for_user(self.user)
CertificateItem.add_to_order(
self.cart,
self.course_key,

View File

@@ -818,7 +818,7 @@ def _show_receipt_html(request, order):
# Add a query string param for the order ID
# This allows the view to query for the receipt information later.
url += '?payment-order-num={order_num}'.format(
order_num=order_items[0].id
order_num=order_items[0].order.id
)
return HttpResponseRedirect(url)