@@ -42,8 +42,8 @@ public function __construct() {
4242 $ this ->title = $ this ->get_option ('title ' );
4343 $ this ->description = $ this ->get_option ('description ' );
4444
45- // Lightning Strike REST client
46- $ this ->strike = new LightningStrikeClient ($ this ->get_option ('server_url ' , 'http://localhost:9112 ' ));
45+ // Lightning Charge REST client
46+ $ this ->charge = new LightningChargeClient ($ this ->get_option ('server_url ' , 'http://localhost:9112 ' ));
4747
4848 add_action ('woocommerce_payment_gateways ' , array ($ this , 'register_gateway ' ));
4949 add_action ('woocommerce_update_options_payment_gateways_lightning ' , array ($ this , 'process_admin_options ' ));
@@ -74,9 +74,9 @@ public function init_form_fields() {
7474 'desc_tip ' => true ,
7575 ),
7676 'server_url ' => array (
77- 'title ' => __ ('Lightning Strike server ' , 'lightning ' ),
77+ 'title ' => __ ('Lightning Charge server ' , 'lightning ' ),
7878 'type ' => 'text ' ,
79- 'description ' => __ ('URL of the Lightning Strike REST server to connect to. ' , 'lightning ' ),
79+ 'description ' => __ ('URL of the Lightning Charge REST server to connect to. ' , 'lightning ' ),
8080 'default ' => __ ('http://localhost:9112 ' , 'lightning ' ),
8181 'desc_tip ' => true ,
8282 ),
@@ -100,7 +100,7 @@ public function process_payment( $order_id ) {
100100 $ invoice = $ order ->get_meta ('_lightning_invoice ' );
101101
102102 if (!$ invoice ) {
103- $ invoice = $ this ->strike ->invoice ([
103+ $ invoice = $ this ->charge ->invoice ([
104104 'currency ' => $ order ->get_currency (),
105105 'amount ' => $ order ->get_total (),
106106 'description ' => self ::make_desc ($ order ),
@@ -109,7 +109,7 @@ public function process_payment( $order_id ) {
109109 ]);
110110 $ this ->update_invoice ($ order , $ invoice );
111111
112- $ order ->add_order_note (sprintf (__ ('Lightning Strike invoice created, id=%s, rhash=%s. ' , 'lightning ' ), $ invoice ->id , $ invoice ->rhash ));
112+ $ order ->add_order_note (sprintf (__ ('Lightning Charge invoice created, id=%s, rhash=%s. ' , 'lightning ' ), $ invoice ->id , $ invoice ->rhash ));
113113 }
114114
115115 return array (
@@ -140,7 +140,7 @@ public function webhook_callback() {
140140 * JSON endpoint for long polling payment updates.
141141 */
142142 public function wait_invoice () {
143- $ invoice = $ this ->strike ->wait ($ _POST ['invoice_id ' ], LIGHTNING_LONGPOLL_TIMEOUT );
143+ $ invoice = $ this ->charge ->wait ($ _POST ['invoice_id ' ], LIGHTNING_LONGPOLL_TIMEOUT );
144144 if ($ invoice && $ invoice ->completed ) {
145145 $ order = wc_get_order ($ invoice ->metadata ->order_id );
146146 $ this ->update_invoice ($ order , $ invoice );
0 commit comments