| Line 4555... |
Line 4555... |
| 4555 |
wallet.amount = wallet.amount - rechargeTransaction.amount
|
4555 |
wallet.amount = wallet.amount - rechargeTransaction.amount
|
| 4556 |
store.availableLimit = store.availableLimit - rechargeTransaction.amount
|
4556 |
store.availableLimit = store.availableLimit - rechargeTransaction.amount
|
| 4557 |
store.collectedAmount = store.collectedAmount + rechargeTransaction.amount - rechargeTransaction.discount
|
4557 |
store.collectedAmount = store.collectedAmount + rechargeTransaction.amount - rechargeTransaction.discount
|
| 4558 |
session.commit()
|
4558 |
session.commit()
|
| 4559 |
|
4559 |
|
| 4560 |
strProviderCode = get_provider_code(rechargeTransaction.operatorId)
|
4560 |
strProviderCode = get_provider_code(rechargeTransaction.operatorId)
|
| - |
|
4561 |
if rechargeTransaction.deviceType == 1:
|
| - |
|
4562 |
rtype = 'MTP'
|
| - |
|
4563 |
else:
|
| - |
|
4564 |
rtype = 'RCH'
|
| 4561 |
retStatus, retCode, spiceTID, description = RechargeService.rechargeDevice(rechargeTransaction.id, rechargeTransaction.deviceType, strProviderCode, rechargeTransaction.deviceNum, rechargeTransaction.amount, rechargeTransaction.plan)
|
4565 |
retStatus, retCode, spiceTID, description = RechargeService.rechargeDevice(rechargeTransaction.id, rtype, strProviderCode, rechargeTransaction.deviceNum, rechargeTransaction.amount, rechargeTransaction.plan)
|
| 4562 |
rechargeTransaction.spiceTID = spiceTID
|
4566 |
rechargeTransaction.spiceTID = spiceTID
|
| 4563 |
rechargeTransaction.responseTime = datetime.datetime.now()
|
4567 |
rechargeTransaction.responseTime = datetime.datetime.now()
|
| 4564 |
rechargeTransaction.description = description
|
4568 |
rechargeTransaction.description = description
|
| 4565 |
if retCode == '00' and retStatus == 'S':
|
4569 |
if retCode == '00' and retStatus == 'S':
|
| 4566 |
rechargeTransaction.status = RechargeOrderStatus.RECHARGE_SUCCESSFUL
|
4570 |
rechargeTransaction.status = RechargeOrderStatus.RECHARGE_SUCCESSFUL
|