@@ -132,6 +132,7 @@ pub async fn form_payment_link_data(
132
132
background_image : None ,
133
133
details_layout : None ,
134
134
branding_visibility : None ,
135
+ payment_button_text : None ,
135
136
}
136
137
} ;
137
138
@@ -277,6 +278,7 @@ pub async fn form_payment_link_data(
277
278
background_image : payment_link_config. background_image . clone ( ) ,
278
279
details_layout : payment_link_config. details_layout ,
279
280
branding_visibility : payment_link_config. branding_visibility ,
281
+ payment_button_text : payment_link_config. payment_button_text . clone ( ) ,
280
282
} ;
281
283
282
284
Ok ( (
@@ -335,6 +337,7 @@ pub async fn initiate_secure_payment_link_flow(
335
337
hide_card_nickname_field : payment_link_config. hide_card_nickname_field ,
336
338
show_card_form_by_default : payment_link_config. show_card_form_by_default ,
337
339
payment_link_details : * link_details. to_owned ( ) ,
340
+ payment_button_text : payment_link_config. payment_button_text ,
338
341
} ;
339
342
let js_script = format ! (
340
343
"window.__PAYMENT_DETAILS = {}" ,
@@ -680,6 +683,18 @@ pub fn get_payment_link_config_based_on_priority(
680
683
. map ( |background_image| background_image. clone ( ) . foreign_into ( ) )
681
684
} )
682
685
} ) ,
686
+ payment_button_text : payment_create_link_config
687
+ . as_ref ( )
688
+ . and_then ( |payment_link_config| {
689
+ payment_link_config. theme_config . payment_button_text . clone ( )
690
+ } )
691
+ . or_else ( || {
692
+ business_theme_configs
693
+ . as_ref ( )
694
+ . and_then ( |business_theme_config| {
695
+ business_theme_config. payment_button_text . clone ( )
696
+ } )
697
+ } ) ,
683
698
} ;
684
699
685
700
Ok ( ( payment_link_config, domain_name) )
@@ -786,6 +801,7 @@ pub async fn get_payment_link_status(
786
801
background_image : None ,
787
802
details_layout : None ,
788
803
branding_visibility : None ,
804
+ payment_button_text : None ,
789
805
}
790
806
} ;
791
807
0 commit comments