From a6413da67a4579866f0fd0323ddb23a7b6b9654a Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 18 Sep 2026 17:00:53 +0000
Subject: [PATCH] =Cleaning up the Integrations setup a bit, started the Helcim integration work too

---
 inc/integrations/services/SquareOld.php |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/inc/integrations/services/SquareOld.php b/inc/integrations/services/SquareOld.php
index d2c4611..b5fd010 100644
--- a/inc/integrations/services/SquareOld.php
+++ b/inc/integrations/services/SquareOld.php
@@ -237,9 +237,9 @@
 			? 'https://connect.squareup.com'
 			: 'https://connect.squareupsandbox.com';
 
-		$this->oauth['authorize'] = $baseUrl . '/oauth2/authorize';
-		$this->oauth['token'] = $baseUrl . '/oauth2/token';
-		$this->oauth['revoke'] = $baseUrl . '/oauth2/revoke';
+		$this->oauth->getAuthorize() = $baseUrl . '/oauth2/authorize';
+		$this->oauth->getToken() = $baseUrl . '/oauth2/token';
+		$this->oauth->getRevoke() = $baseUrl . '/oauth2/revoke';
 
 		// Set up API endpoints with version
 		$this->apiEndpoints = [
@@ -408,7 +408,7 @@
 			'redirect_uri' => $this->getRedirectUri()
 		];
 
-		$response = wp_remote_post($this->oauth['token'], [
+		$response = wp_remote_post($this->oauth->getToken(), [
 			'body' => json_encode($body),
 			'headers' => [
 				'Content-Type' => 'application/json',
@@ -464,7 +464,7 @@
 			return false;
 		}
 
-		$response = wp_remote_post($this->oauth['token'], [
+		$response = wp_remote_post($this->oauth->getToken(), [
 			'body' => [
 				'client_id' => $this->credentials['client_id'],
 				'client_secret' => $this->credentials['client_secret'],
@@ -823,7 +823,7 @@
 		try {
 			// Revoke the token with Square
 			if (!empty($this->credentials['access_token'])) {
-				wp_remote_post($this->oauth['revoke'], [
+				wp_remote_post($this->oauth->getRevoke(), [
 					'body' => [
 						'client_id' => $this->credentials['client_id'] ?? '',
 						'access_token' => $this->credentials['access_token']

--
Gitblit v1.10.0