@@ -132,6 +132,9 @@ pub async fn form_payment_link_data(
132
132
payment_button_text : None ,
133
133
custom_message_for_card_terms : None ,
134
134
payment_button_colour : None ,
135
+ skip_status_screen : None ,
136
+ background_colour : None ,
137
+ payment_button_text_colour : None ,
135
138
}
136
139
} ;
137
140
@@ -280,6 +283,9 @@ pub async fn form_payment_link_data(
280
283
payment_button_text : payment_link_config. payment_button_text . clone ( ) ,
281
284
custom_message_for_card_terms : payment_link_config. custom_message_for_card_terms . clone ( ) ,
282
285
payment_button_colour : payment_link_config. payment_button_colour . clone ( ) ,
286
+ skip_status_screen : payment_link_config. skip_status_screen ,
287
+ background_colour : payment_link_config. background_colour . clone ( ) ,
288
+ payment_button_text_colour : payment_link_config. payment_button_text_colour . clone ( ) ,
283
289
} ;
284
290
285
291
Ok ( (
@@ -333,6 +339,9 @@ pub async fn initiate_secure_payment_link_flow(
333
339
payment_button_text : payment_link_config. payment_button_text ,
334
340
custom_message_for_card_terms : payment_link_config. custom_message_for_card_terms ,
335
341
payment_button_colour : payment_link_config. payment_button_colour ,
342
+ skip_status_screen : payment_link_config. skip_status_screen ,
343
+ background_colour : payment_link_config. background_colour ,
344
+ payment_button_text_colour : payment_link_config. payment_button_text_colour ,
336
345
} ;
337
346
let js_script = format ! (
338
347
"window.__PAYMENT_DETAILS = {}" ,
@@ -444,7 +453,10 @@ fn get_js_script(payment_details: &PaymentLinkData) -> RouterResult<String> {
444
453
}
445
454
446
455
fn get_color_scheme_css ( payment_link_config : & PaymentLinkConfig ) -> String {
447
- let background_primary_color = payment_link_config. theme . clone ( ) ;
456
+ let background_primary_color = payment_link_config
457
+ . background_colour
458
+ . clone ( )
459
+ . unwrap_or ( payment_link_config. theme . clone ( ) ) ;
448
460
format ! (
449
461
":root {{
450
462
--primary-color: {background_primary_color};
@@ -638,6 +650,9 @@ pub fn get_payment_link_config_based_on_priority(
638
650
payment_button_text,
639
651
custom_message_for_card_terms,
640
652
payment_button_colour,
653
+ skip_status_screen,
654
+ background_colour,
655
+ payment_button_text_colour,
641
656
) = get_payment_link_config_value ! (
642
657
payment_create_link_config,
643
658
business_theme_configs,
@@ -647,6 +662,9 @@ pub fn get_payment_link_config_based_on_priority(
647
662
( payment_button_text) ,
648
663
( custom_message_for_card_terms) ,
649
664
( payment_button_colour) ,
665
+ ( skip_status_screen) ,
666
+ ( background_colour) ,
667
+ ( payment_button_text_colour)
650
668
) ;
651
669
652
670
let payment_link_config =
@@ -661,6 +679,7 @@ pub fn get_payment_link_config_based_on_priority(
661
679
show_card_form_by_default,
662
680
allowed_domains,
663
681
branding_visibility,
682
+ skip_status_screen,
664
683
transaction_details : payment_create_link_config. as_ref ( ) . and_then (
665
684
|payment_link_config| payment_link_config. theme_config . transaction_details . clone ( ) ,
666
685
) ,
@@ -669,6 +688,8 @@ pub fn get_payment_link_config_based_on_priority(
669
688
payment_button_text,
670
689
custom_message_for_card_terms,
671
690
payment_button_colour,
691
+ background_colour,
692
+ payment_button_text_colour,
672
693
} ;
673
694
674
695
Ok ( ( payment_link_config, domain_name) )
@@ -774,6 +795,9 @@ pub async fn get_payment_link_status(
774
795
payment_button_text : None ,
775
796
custom_message_for_card_terms : None ,
776
797
payment_button_colour : None ,
798
+ skip_status_screen : None ,
799
+ background_colour : None ,
800
+ payment_button_text_colour : None ,
777
801
}
778
802
} ;
779
803
0 commit comments