@@ -43,7 +43,7 @@ public function __construct() {
43
43
$ this ->description = $ this ->get_option ('description ' );
44
44
45
45
// Lightning Charge REST client
46
- $ this ->charge = new LightningChargeClient ($ this ->get_option ('server_url ' , 'http://localhost:9112 ' ));
46
+ $ this ->charge = new LightningChargeClient ($ this ->get_option ('charge_url ' , 'http://localhost:9112 ' ), $ this -> get_option ( ' charge_token ' ));
47
47
48
48
add_action ('woocommerce_payment_gateways ' , array ($ this , 'register_gateway ' ));
49
49
add_action ('woocommerce_update_options_payment_gateways_lightning ' , array ($ this , 'process_admin_options ' ));
@@ -73,13 +73,19 @@ public function init_form_fields() {
73
73
'default ' => __ ('Bitcoin Lightning ' , 'lightning ' ),
74
74
'desc_tip ' => true ,
75
75
),
76
- 'server_url ' => array (
76
+ 'charge_url ' => array (
77
77
'title ' => __ ('Lightning Charge server ' , 'lightning ' ),
78
78
'type ' => 'text ' ,
79
79
'description ' => __ ('URL of the Lightning Charge REST server to connect to. ' , 'lightning ' ),
80
80
'default ' => __ ('http://localhost:9112 ' , 'lightning ' ),
81
81
'desc_tip ' => true ,
82
82
),
83
+ 'charge_token ' => array (
84
+ 'title ' => __ ('Lightning Charge API token ' , 'lightning ' ),
85
+ 'type ' => 'text ' ,
86
+ 'description ' => __ ('API access token configured in the Lightning Charge server. ' , 'lightning ' ),
87
+ 'desc_tip ' => true ,
88
+ ),
83
89
'description ' => array (
84
90
'title ' => __ ('Customer Message ' , 'lightning ' ),
85
91
'type ' => 'textarea ' ,
0 commit comments