File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ export class StripeHelper {
22
22
const subscriptionData : any = {
23
23
customer,
24
24
metadata,
25
- billing_cycle_anchor : ( billing_cycle_anchor && billing_cycle_anchor > new Date ( ) . getTime ( ) ) ? billing_cycle_anchor / 1000 : "now" ,
26
25
items : [ {
27
26
price_data : {
28
27
currency : 'usd' ,
@@ -33,6 +32,8 @@ export class StripeHelper {
33
32
} ] ,
34
33
proration_behavior : 'none' ,
35
34
} ;
35
+ //billing_cycle_anchor: (billing_cycle_anchor && billing_cycle_anchor > new Date().getTime()) ? billing_cycle_anchor / 1000 : "now",
36
+ if ( billing_cycle_anchor && billing_cycle_anchor > new Date ( ) . getTime ( ) ) subscriptionData . billing_cycle_anchor = billing_cycle_anchor / 1000 ;
36
37
if ( type === 'card' ) subscriptionData . default_payment_method = payment_method_id ;
37
38
if ( type === 'bank' ) subscriptionData . default_source = payment_method_id ;
38
39
return await stripe . subscriptions . create ( subscriptionData ) ;
You can’t perform that action at this time.
0 commit comments