Skip to content

Commit

Permalink
Fix: API endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
mhmdbina committed Jan 9, 2025
1 parent 8292cb3 commit 73218b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 4 additions & 3 deletions payhubix-gateway-edd/edd-payhubix.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Payhubix Gateway for Easy Digital Downloads
* Plugin URI: https://payhubix.com
* Description: Integrates Payhubix payment gateway with Easy Digital Downloads
* Version: 1.1.0
* Version: 1.1.1
* Author: Payhubix TM, Mohammad Bina
* Author URI: https://payhubix.com
* License: GPL-2.0+
Expand Down Expand Up @@ -136,7 +136,7 @@ public function process_payment($purchase_data) {
* Make API call to Payhubix
*/
private function call_payhubix_api($payment_id, $purchase_data) {
$url = 'https://api.payhubix.com/v1/payment/shops/' . $this->shop_id . '/invoices/';
$url = 'https://api.payhubix.com/v1/invoices/';

$data = [
'currency_amount' => (float) $purchase_data['price'],
Expand All @@ -145,6 +145,7 @@ private function call_payhubix_api($payment_id, $purchase_data) {
'time_for_payment' => $this->time_for_payment,
'currencies' => [],
'order_id' => $payment_id,
'shop_id' => $this->shop_id,
'order_description'=> 'Digital Download Purchase',
'callback_url' => add_query_arg(['edd-listener' => 'payhubix', 'order_id' => $payment_id], home_url('index.php')),
];
Expand Down Expand Up @@ -239,7 +240,7 @@ public function listen_for_payhubix_callback() {
}

private function check_payment_status($invoice_id) {
$url = 'https://api.payhubix.com/v1/payment/invoices/' . $invoice_id;
$url = 'https://api.payhubix.com/v1/invoices/' . $invoice_id;

$args = [
'headers' => [
Expand Down
5 changes: 4 additions & 1 deletion payhubix-gateway-edd/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://payhubix.com/
Tags: easy-digital-downloads, payhubix, gateway
Requires at least: 6.5 or higher
Tested up to: 6.7.1
Stable tag: 1.1.0
Stable tag: 1.1.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -35,6 +35,9 @@ Easy Digital Downloads Payhubix Gateway** Integrates Payhubix payment gateway wi

== Change log ==

= 1.1.1 =
* Fix API endpoints

= 1.1.0 =
* Bug fixes and performance improvements

Expand Down

0 comments on commit 73218b9

Please sign in to comment.