def _show_receipt_json(order):
 order_info = {'orderNum': order.id, 'currency': order.currency, 'status': order.status, 'purchase_datetime': (get_default_time_display(order.purchase_time) if order.purchase_time else None), 'billed_to': {'first_name': order.bill_to_first, 'last_name': order.bill_to_last, 'street1': order.bill_to_street1, 'street2': order.bill_to_street2, 'city': order.bill_to_city, 'state': order.bill_to_state, 'postal_code': order.bill_to_postalcode, 'country': order.bill_to_country}, 'total_cost': order.total_cost, 'items': [{'quantity': item.qty, 'unit_cost': item.unit_cost, 'line_cost': item.line_cost, 'line_desc': item.line_desc, 'course_key': unicode(item.course_id)} for item in OrderItem.objects.filter(order=order).select_subclasses()]}
 return JsonResponse(order_info)

def _show_receipt_json ( order ) : order_info = { 'orderNum' : order . id , 'currency' : order . currency , 'status' : order . status , 'purchase_datetime' : ( get_default_time_display ( order . purchase_time ) if order . purchase_time else None ) , 'billed_to' : { 'first_name' : order . bill_to_first , 'last_name' : order . bill_to_last , 'street1' : order . bill_to_street1 , 'street2' : order . bill_to_street2 , 'city' : order . bill_to_city , 'state' : order . bill_to_state , 'postal_code' : order . bill_to_postalcode , 'country' : order . bill_to_country } , 'total_cost' : order . total_cost , 'items' : [ { 'quantity' : item . qty , 'unit_cost' : item . unit_cost , 'line_cost' : item . line_cost , 'line_desc' : item . line_desc , 'course_key' : unicode ( item . course_id ) } for item in OrderItem . objects . filter ( order = order ) . select_subclasses ( ) ] } return JsonResponse ( order_info )
render the receipt page as json .