Refactor code #5935

```python
# Case 1: Gift card available amount(150) > amount(50) to be paid
```