Skip to content

Commit

Permalink
Merge pull request #62 from paypay/feature/PP-67208
Browse files Browse the repository at this point in the history
Fix validation typo on pending payment refund
  • Loading branch information
Shreyansh Pandey committed Mar 24, 2021
2 parents 575a26c + 01d629b commit 724ed4f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions paypayopa/resources/pending.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ def cancel_payment(self, id, **kwargs):

def refund_payment(self, data={}, **kwargs):
url = "{}".format(URL.REFUNDS)
if "merchantPaymentId" not in data:
if "merchantRefundId" not in data:
raise ValueError("\x1b[31m MISSING REQUEST PARAMS "
"\x1b[0m for merchantPaymentId")
"\x1b[0m for merchantRefundId")
if "requestedAt" not in data:
data['requestedAt'] = datetime.datetime.now().second
if "paymentId" not in data:
raise ValueError("\x1b[31m MISSING REQUEST PARAMS "
"\x1b[0m for userAuthorizationId")
"\x1b[0m for paymentId")
if "amount" not in data["amount"]:
raise ValueError("\x1b[31m MISSING REQUEST PARAMS "
"\x1b[0m for amount")
Expand Down

0 comments on commit 724ed4f

Please sign in to comment.