| Line 68... |
Line 68... |
| 68 |
refundDate = refund[1]
|
68 |
refundDate = refund[1]
|
| 69 |
order = RechargeOrder.get_by(spiceTID = key)
|
69 |
order = RechargeOrder.get_by(spiceTID = key)
|
| 70 |
if order.status == RechargeOrderStatus.RECHARGE_FAILED_REFUNDED:
|
70 |
if order.status == RechargeOrderStatus.RECHARGE_FAILED_REFUNDED:
|
| 71 |
print "Refund is already processed."
|
71 |
print "Refund is already processed."
|
| 72 |
continue
|
72 |
continue
|
| 73 |
if order.status != RechargeOrderStatus.RECHARGE_SUCCESSFUL:
|
73 |
if order.status not in (RechargeOrderStatus.RECHARGE_SUCCESSFUL, RechargeOrderStatus.PAYMENT_SUCCESSFUL):
|
| 74 |
print "Recharge is not successful. There is something wrong."
|
74 |
print "Recharge/Payment is not successful. There is something wrong."
|
| 75 |
continue
|
75 |
continue
|
| 76 |
if order.totalAmount != refundAmount:
|
76 |
if order.totalAmount != refundAmount:
|
| 77 |
print "Refund amount is not same as transaction amount"
|
77 |
print "Refund amount is not same as transaction amount"
|
| 78 |
continue
|
78 |
continue
|
| 79 |
update_recharge_order_status(order.id, RechargeOrderStatus.RECHARGE_FAILED_REFUNDED, refundDate)
|
79 |
update_recharge_order_status(order.id, RechargeOrderStatus.RECHARGE_FAILED_REFUNDED, refundDate)
|