Level 1

How to record if customer wrongly paid twice for the same invoice & I have to refund?

Scenario:

A customer paid me wrongly twice via PayPal & then I have refunded him using PayPal.

What I have done:

I have first recorded the 2nd payment from Quick icon button as receive payment by referring to that client.

Then, I have also recorded the refund using the refund receipts. 

Problems:

Customer balance still shows that there is a customer account in negative balance meaning I owe to customer & reason for that 2nd payment I have record is showing applied.
Mistake-
I have recorded the 2nd payment from the receive payment but in order to refund him,d I used refund receipts.
1st one has the double entry of Bank Dr & Accounts receivables Cr (Customer account) 
2nd one has the double entry of Sales Dr & Bank Cr.

It would be better if anyone tells me how to record if customer wrongly paid twice & I have to refund him.