Skip to content

Commit 4ba69eb

Browse files
Merge pull request #70 from paypay/fix/PP-89103
Proper requested at seconds is passed to refund apis
2 parents 215f028 + 3395d73 commit 4ba69eb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

paypayopa/resources/payment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def cancel_payment(self, id, **kwargs):
4444
def refund_payment(self, data={}, **kwargs):
4545
url = "{}/".format('/v2/refunds')
4646
if "requestedAt" not in data:
47-
data['requestedAt'] = datetime.datetime.now().second
47+
data['requestedAt'] = int(datetime.datetime.now().timestamp())
4848
if "merchantRefundId" not in data:
4949
raise ValueError("\x1b[31m MISSING REQUEST PARAMS "
5050
"\x1b[0m for merchantRefundId")

paypayopa/resources/pending.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def refund_payment(self, data={}, **kwargs):
5050
raise ValueError("\x1b[31m MISSING REQUEST PARAMS "
5151
"\x1b[0m for merchantRefundId")
5252
if "requestedAt" not in data:
53-
data['requestedAt'] = datetime.datetime.now().second
53+
data['requestedAt'] = int(datetime.datetime.now().timestamp())
5454
if "paymentId" not in data:
5555
raise ValueError("\x1b[31m MISSING REQUEST PARAMS "
5656
"\x1b[0m for paymentId")

0 commit comments

Comments
 (0)