Skip to content

Commit b07f497

Browse files
committed
s/Strike/Charge/g
1 parent 3199bb2 commit b07f497

File tree

3 files changed

+21
-23
lines changed

3 files changed

+21
-23
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "elementsproject/woocommerce-gateway-lightning",
3-
"description": "WooCommerce Gateway Plugin for Lightning Strike",
3+
"description": "WooCommerce Gateway Plugin for Lightning Charge",
44
"version": "0.1.1",
55
"license": "MIT",
66
"minimum-stability": "dev",
77
"require": {
8-
"elementsproject/lightning-strike-client-php": "dev-master",
9-
"bacon/bacon-qr-code": "^1.0"
8+
"bacon/bacon-qr-code": "^1.0",
9+
"elementsproject/lightning-charge-client-php": "^0.1.3"
1010
}
1111
}

composer.lock

Lines changed: 11 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

woocommerce-gateway-lightning.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)