Server IP : 192.64.112.168 / Your IP : 18.219.23.150 Web Server : Apache System : Linux nc-ph-2300-85.bluforrest.com 4.18.0-513.9.1.el8_9.x86_64 #1 SMP Sat Dec 2 05:23:44 EST 2023 x86_64 User : expressoneac ( 1128) PHP Version : 8.0.30 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/expressoneac/www/wp-content/plugins/elementor-pro/modules/payments/classes/ |
Upload File : |
<?php namespace ElementorPro\Modules\Payments\Classes; use Elementor\Core\Base\Module; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } class Stripe_Handler { const STRIPE_ENDPOINT_URL = 'https://api.stripe.com/v1/'; /** * Abstract function to create GET calls from the stripe API * @param string $secret_key * @param string $endpoint * @param array $body * @return array|\WP_Error */ public function get( $secret_key, $endpoint = '', $body = [] ) { $headers = [ 'Authorization' => 'Bearer ' . $secret_key ]; return wp_remote_get( self::STRIPE_ENDPOINT_URL . $endpoint, [ 'headers' => $headers, 'body' => $body, ] ); } /** * @param $headers * @param $body * @param $endpoint * @return array|\WP_Error */ public function post( $headers, $body, $endpoint ) { return wp_remote_post( self::STRIPE_ENDPOINT_URL . $endpoint, [ 'headers' => $headers, 'body' => $body, ] ); } }