Merge pull request #8771 from edx/clintonb/currency-comparison-fix
Comparing currencies with same case
This commit is contained in:
@@ -33,7 +33,7 @@ class CourseApiViewTestMixin(object):
|
||||
""" Serialize a CourseMode to a dict. """
|
||||
return {
|
||||
u'name': course_mode.mode_slug,
|
||||
u'currency': course_mode.currency,
|
||||
u'currency': course_mode.currency.lower(),
|
||||
u'price': course_mode.min_price,
|
||||
u'sku': course_mode.sku
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ def _payment_accepted(order_id, auth_amount, currency, decision):
|
||||
raise CCProcessorDataException(_("The payment processor accepted an order whose number is not in our system."))
|
||||
|
||||
if decision == 'ACCEPT':
|
||||
if auth_amount == order.total_cost and currency == order.currency:
|
||||
if auth_amount == order.total_cost and currency.lower() == order.currency.lower():
|
||||
return {
|
||||
'accepted': True,
|
||||
'amt_charged': auth_amount,
|
||||
|
||||
Reference in New Issue
Block a user