forked from rDrama/rDrama
1
0
Fork 0

fix one-time donations not getting registered

master
Aevann 2023-06-14 01:21:49 +03:00
parent 1b2475ffc6
commit a404210cc7
1 changed files with 6 additions and 2 deletions

View File

@ -1425,7 +1425,6 @@ if KOFI_TOKEN:
def gumroad():
data = request.values
ip = request.headers.get('CF-Connecting-IP')
print(ip, flush=True)
if ip != '34.193.146.117':
print(STARS, flush=True)
print(f'/gumroad fail: {ip}')
@ -1438,7 +1437,12 @@ def gumroad():
if existing: return ''
created_utc = int(time.mktime(time.strptime(data['sale_timestamp'].split('.')[0], "%Y-%m-%dT%H:%M:%SZ")))
type = data['recurrence']
if data.get('recurrenace'):
type = "monthly"
else:
type = "one-time"
amount = int(data['price']) / 100
email = data['email']