Skip to content

Commit 19c1604

Browse files
committed
Fixed Wordpress Review Issues
1 parent aef0bfe commit 19c1604

File tree

3 files changed

+5
-22
lines changed

3 files changed

+5
-22
lines changed

includes/class-wc-gateway-notchpay.php

+3-16
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
<?php
22

3-
/**
4-
* Plugin Name: Notch Pay for WooCommerce
5-
* Plugin URI: https://notchpay.co
6-
* Author: Notch Pay LLC
7-
* Author URI: https://notchpay.co
8-
* Description: Accept local and international payments.
9-
* Version: 0.1.0
10-
* License: GPL-2.0+
11-
* License URL: http://www.gnu.org/licenses/gpl-2.0.txt
12-
* text-domain: woo-notchpay
13-
*/
14-
153
/**
164
* Notch Pay for WooCommerce.
175
*
@@ -330,7 +318,7 @@ function (WC_Order_Item $item) {
330318

331319

332320
try {
333-
$response = wp_remote_post($this->endpoint . '/checkout/initialize', $args);
321+
$response = wp_remote_post($this->endpoint . '/transactions/initialize', $args);
334322

335323
$status = wp_remote_retrieve_response_code($response);
336324

@@ -345,12 +333,11 @@ function (WC_Order_Item $item) {
345333
'result' => 'success',
346334
'redirect' => $data['authorization_url']
347335
];
348-
//$order->update_status(apply_filters('woocommerce_notchpay_process_payment_order_status', $order->has_downloadable_item() ? 'on-hold' : 'processing', $order), __('Payment to be made upon delivery.', 'woocommerce'));
349336
} else {
350337
wc_add_notice(__('Unable to process payment try again', 'woo-notchpay'), 'error');
351338
}
352339
} catch (Exception $th) {
353-
// $order->add_order_note("Payment init failed with message: " . $th->getMessage());
340+
$order->add_order_note("Payment init failed with message: " . $th->getMessage());
354341

355342
if (isset($response)) {
356343
woo_notchpay_log_data('Request <-----');
@@ -380,7 +367,7 @@ public function verify_transaction($reference)
380367
'Content-Type' => 'application/json',
381368
);
382369

383-
$response = wp_remote_get($this->endpoint . '/checkout/' . $reference, array(
370+
$response = wp_remote_get($this->endpoint . '/transactions/' . $reference, array(
384371
'headers' => $headers,
385372
'timeout' => 180,
386373
"sslverify" => false,

readme.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: notchpay,chapdel
33
Tags: notch pay, notchpay, mobile money, orange money, woocommerce, payment gateway, cameroon, cameroun, xaf, fcfa, mastercard, visa
44
Requires at least: 5.8
55
Tested up to: 6.0
6-
Stable tag: 5.7.4
6+
Stable tag: 1.0.0
77
Requires PHP: 7.2
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html

woo-notchpay.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@
66
* Author: Chapdel KAMGA
77
* Author URI: http://chapdel.me
88
* Description: Accept local and international payments.
9-
* Version: 0.1.0
9+
* Version: 1.0.0
1010
* License: GPL-2.0+
1111
* License URL: http://www.gnu.org/licenses/gpl-2.0.txt
1212
* text-domain: woo-notchpay
13-
*
14-
* Class WC_Gateway_NotchPay file.
15-
*
16-
* @package WooCommerce\NotchPay
1713
*/
1814

1915

0 commit comments

Comments
 (0)