|
@@ -74,8 +74,12 @@ class Paypal:
|
|
|
return False
|
|
|
|
|
|
now_time = int(time.time())
|
|
|
- start_date_timestamp = CommonService.calcMonthLater(1, now_time) - (5 * 86400) #下次扣款为下个月提前5天扣款
|
|
|
- start_date_str = CommonService.timestamp_to_str(start_date_timestamp, "%Y-%m-%dT%H:%M:%SZ")
|
|
|
+ if cycle_config[0]['frequency'] == "DAY":
|
|
|
+ start_date_timestamp = now_time + 86400 - 3600 # 下次扣款为明天,提前1个小时扣款
|
|
|
+ start_date_str = CommonService.timestamp_to_str(start_date_timestamp, "%Y-%m-%dT%H:%M:%SZ")
|
|
|
+ elif cycle_config[0]['frequency'] == "MONTH":
|
|
|
+ start_date_timestamp = CommonService.calcMonthLater(1, now_time) - (5 * 86400) #下次扣款为下个月提前5天扣款
|
|
|
+ start_date_str = CommonService.timestamp_to_str(start_date_timestamp, "%Y-%m-%dT%H:%M:%SZ")
|
|
|
#订阅
|
|
|
billingAgreement = {
|
|
|
"name": store_info['lang__content'],
|