Changeset 2808474
- Timestamp:
- 11/01/2022 07:31:22 AM (3 years ago)
- Location:
- chip-for-woocommerce/tags/1.1.3
- Files:
-
- 2 edited
-
api.php (modified) (3 diffs)
-
chip-for-woocommerce.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
chip-for-woocommerce/tags/1.1.3/api.php
r2807585 r2808474 11 11 class WC_Chip_API 12 12 { 13 public function __construct($ private_key, $brand_id, $logger, $debug)13 public function __construct($secret_key, $brand_id, $logger, $debug) 14 14 { 15 $this-> private_key = $private_key;15 $this->secret_key = $secret_key; 16 16 $this->brand_id = $brand_id; 17 17 $this->logger = $logger; … … 65 65 private function call($method, $route, $params = []) 66 66 { 67 $ private_key = $this->private_key;67 $secret_key = $this->secret_key; 68 68 if (!empty($params)) { 69 69 $params = json_encode($params); … … 76 76 [ 77 77 'Content-type' => 'application/json', 78 'Authorization' => 'Bearer ' . $ private_key,78 'Authorization' => 'Bearer ' . $secret_key, 79 79 ] 80 80 ); -
chip-for-woocommerce/tags/1.1.3/chip-for-woocommerce.php
r2807585 r2808474 110 110 if (!$this->cached_api) { 111 111 $this->cached_api = new WC_Chip_API( 112 $this->settings[' private-key'],112 $this->settings['secret-key'], 113 113 $this->settings['brand-id'], 114 114 new ChipWCLogger(), … … 221 221 'default' => '', 222 222 ), 223 ' private-key' => array(223 'secret-key' => array( 224 224 'title' => __('Secret key', 'chip-for-woocommerce'), 225 225 'type' => 'text', … … 473 473 474 474 public function can_refund_order( $order ) { 475 $has_api_creds = $this->get_option( 'enabled' ) && $this->get_option( ' private-key' ) && $this->get_option( 'brand-id' );475 $has_api_creds = $this->get_option( 'enabled' ) && $this->get_option( 'secret-key' ) && $this->get_option( 'brand-id' ); 476 476 477 477 return $order && $order->get_transaction_id() && $has_api_creds;
Note: See TracChangeset
for help on using the changeset viewer.