Plugin Directory

Changeset 2897687


Ignore:
Timestamp:
04/12/2023 08:53:25 AM (3 years ago)
Author:
ronantrelis
Message:

Memberpress and Woo Subscription Support

Location:
trelis-crypto-payments
Files:
1 deleted
8 edited
14 copied

Legend:

Unmodified
Added
Removed
  • trelis-crypto-payments/tags/2.0.0/ReadMe.txt

    r2896581 r2897687  
    55Requires at least: 6.1
    66Tested up to: 6.2
    7 Stable tag: 1.0.21
     7Stable tag: 2.0.0
    88Requires PHP: 7.4
    99License: GPL-3.0
     
    3131
    32321. Install the Trelis Crypto Payments plugin
    33 1. Navigate to WooCommerce -> Settings -> Payments -> TrelisPay -> Manage
     331. For MemberPress, navigate to MemberPress -> Settings -> Payments
     341. For WooCommerce, navigate to WooCommerce -> Settings -> Payments -> TrelisPay -> Manage
    34351. Navigate to [Trelis.com](Trelis.com) and connect your wallet. This wallet will receive payments. It is highly recommended to use a cold wallet. You are solely responsible for custody of your funds. To offer gasless USDC payments, purchase gas credits from your dashboard.
    35361. Navigate to the api screen to create a new api key.
     
    6970== Changelog ==
    7071
     72= 2.0.0 =
     73* Payment and Subscription support for Memberpress (BETA)
     74* Add Subscription support for Woo (BETA)
     75
    7176= 1.0.21 =
    7277* Add support for Woo Subscriptions (beta) and Memberpress (beta)
  • trelis-crypto-payments/tags/2.0.0/admin/MeprTrelisGateway.php

    r2896563 r2897687  
    492492
    493493
    494         //debug mail
    495 
    496         $headers = array('Content-Type: text/html; charset=UTF-8');
    497 
    498         wp_mail('ronan@trelis.com', 'MEPR Process Payment webhook', print_r($json, true), $headers);
    499 
    500         // debug mail end
     494        // //debug mail
     495
     496        // $headers = array('Content-Type: text/html; charset=UTF-8');
     497
     498        // wp_mail('ronan@trelis.com', 'MEPR Process Payment webhook', print_r($json, true), $headers);
     499
     500        // // debug mail end
    501501
    502502
  • trelis-crypto-payments/tags/2.0.0/admin/class-wc-trelis-gateway.php

    r2896563 r2897687  
    495495                $apiUrl = TRELIS_API_URL . 'run-subscription?apiKey=' . $this->apiKey . '&apiSecret=' . $this->apiSecret;
    496496
    497                 //Debug start
    498                 $response = wp_remote_post($apiUrl, $args);
    499                 $headers = array('Content-Type: text/html; charset=UTF-8');
    500                 wp_mail('ronan@trelis.com', 'Trelis run subscription API', print_r($response, true), $headers);
    501                 $this->custom_logs('run subscription api inside schedular', $response);
    502                 //Debug End
     497                // //Debug start
     498                // $response = wp_remote_post($apiUrl, $args);
     499                // $headers = array('Content-Type: text/html; charset=UTF-8');
     500                // wp_mail('ronan@trelis.com', 'Trelis run subscription API', print_r($response, true), $headers);
     501                // $this->custom_logs('run subscription api inside schedular', $response);
     502                // //Debug End
    503503
    504504                if (!is_wp_error($response)) {
     
    556556                        $response = wp_remote_post($apiUrl, $args);
    557557
    558                         //Debug Start
    559                         $headers = array('Content-Type: text/html; charset=UTF-8');
    560                         $emailBody = array($args, $response);
    561                         wp_mail('ronan@trelis.com', 'Trelis cancel subscription API response', print_r($emailBody, true), $headers);
    562                         $this->custom_logs('run subscription api response', $emailBody);
    563                         //Debug End
     558                        // //Debug Start
     559                        // $headers = array('Content-Type: text/html; charset=UTF-8');
     560                        // $emailBody = array($args, $response);
     561                        // wp_mail('ronan@trelis.com', 'Trelis cancel subscription API response', print_r($emailBody, true), $headers);
     562                        // $this->custom_logs('run subscription api response', $emailBody);
     563                        // //Debug End
    564564
    565565                        if (!is_wp_error($response)) {
  • trelis-crypto-payments/tags/2.0.0/admin/class-wc-trelis-rest-api.php

    r2896563 r2897687  
    8888        $expected_signature = hash_hmac('sha256', $json,  $trelis->get_option('webhook_secret'));
    8989
    90         $headers = array('Content-Type: text/html; charset=UTF-8');
    91         wp_mail('ronan@trelis.com', 'Trelis payment webhook response', $json, $headers);
    92         $this->custom_logs_rest('payment webhook response', $json);
     90        // $headers = array('Content-Type: text/html; charset=UTF-8');
     91        // wp_mail('ronan@trelis.com', 'Trelis payment webhook response', $json, $headers);
     92        // $this->custom_logs_rest('payment webhook response', $json);
    9393
    9494        if ($expected_signature != $_SERVER["HTTP_SIGNATURE"])
     
    273273        $response = wp_remote_post($apiUrl, $args);
    274274
    275         // Debugging code to send an email and write logs with the API response.
    276         $headers = array('Content-Type: text/html; charset=UTF-8');
    277         wp_mail('ronan@trelis.com', 'Trelis run subscription API', print_r($response, true), $headers);
    278         $this->custom_logs('run subscription api in webhook response', $response);
     275        // // Debugging code to send an email and write logs with the API response.
     276        // $headers = array('Content-Type: text/html; charset=UTF-8');
     277        // wp_mail('ronan@trelis.com', 'Trelis run subscription API', print_r($response, true), $headers);
     278        // $this->custom_logs('run subscription api in webhook response', $response);
    279279
    280280        /* Check if the API request was successful.
  • trelis-crypto-payments/tags/2.0.0/trelis-crypto-payments.php

    r2896563 r2897687  
    4141
    4242
    43 define('TRELIS_API_URL', 'https://api.trelis.com/dev-env/dev-api/');
     43define('TRELIS_API_URL', 'https://api.trelis.com/dev-api/');
    4444
    4545define('TRELIS_PLUGIN_URL', trailingslashit(plugin_dir_url(__FILE__)));
  • trelis-crypto-payments/trunk/ReadMe.txt

    r2896581 r2897687  
    55Requires at least: 6.1
    66Tested up to: 6.2
    7 Stable tag: 1.0.21
     7Stable tag: 2.0.0
    88Requires PHP: 7.4
    99License: GPL-3.0
     
    3131
    32321. Install the Trelis Crypto Payments plugin
    33 1. Navigate to WooCommerce -> Settings -> Payments -> TrelisPay -> Manage
     331. For MemberPress, navigate to MemberPress -> Settings -> Payments
     341. For WooCommerce, navigate to WooCommerce -> Settings -> Payments -> TrelisPay -> Manage
    34351. Navigate to [Trelis.com](Trelis.com) and connect your wallet. This wallet will receive payments. It is highly recommended to use a cold wallet. You are solely responsible for custody of your funds. To offer gasless USDC payments, purchase gas credits from your dashboard.
    35361. Navigate to the api screen to create a new api key.
     
    6970== Changelog ==
    7071
     72= 2.0.0 =
     73* Payment and Subscription support for Memberpress (BETA)
     74* Add Subscription support for Woo (BETA)
     75
    7176= 1.0.21 =
    7277* Add support for Woo Subscriptions (beta) and Memberpress (beta)
  • trelis-crypto-payments/trunk/admin/MeprTrelisGateway.php

    r2896563 r2897687  
    492492
    493493
    494         //debug mail
    495 
    496         $headers = array('Content-Type: text/html; charset=UTF-8');
    497 
    498         wp_mail('ronan@trelis.com', 'MEPR Process Payment webhook', print_r($json, true), $headers);
    499 
    500         // debug mail end
     494        // //debug mail
     495
     496        // $headers = array('Content-Type: text/html; charset=UTF-8');
     497
     498        // wp_mail('ronan@trelis.com', 'MEPR Process Payment webhook', print_r($json, true), $headers);
     499
     500        // // debug mail end
    501501
    502502
  • trelis-crypto-payments/trunk/admin/class-wc-trelis-gateway.php

    r2896563 r2897687  
    495495                $apiUrl = TRELIS_API_URL . 'run-subscription?apiKey=' . $this->apiKey . '&apiSecret=' . $this->apiSecret;
    496496
    497                 //Debug start
    498                 $response = wp_remote_post($apiUrl, $args);
    499                 $headers = array('Content-Type: text/html; charset=UTF-8');
    500                 wp_mail('ronan@trelis.com', 'Trelis run subscription API', print_r($response, true), $headers);
    501                 $this->custom_logs('run subscription api inside schedular', $response);
    502                 //Debug End
     497                // //Debug start
     498                // $response = wp_remote_post($apiUrl, $args);
     499                // $headers = array('Content-Type: text/html; charset=UTF-8');
     500                // wp_mail('ronan@trelis.com', 'Trelis run subscription API', print_r($response, true), $headers);
     501                // $this->custom_logs('run subscription api inside schedular', $response);
     502                // //Debug End
    503503
    504504                if (!is_wp_error($response)) {
     
    556556                        $response = wp_remote_post($apiUrl, $args);
    557557
    558                         //Debug Start
    559                         $headers = array('Content-Type: text/html; charset=UTF-8');
    560                         $emailBody = array($args, $response);
    561                         wp_mail('ronan@trelis.com', 'Trelis cancel subscription API response', print_r($emailBody, true), $headers);
    562                         $this->custom_logs('run subscription api response', $emailBody);
    563                         //Debug End
     558                        // //Debug Start
     559                        // $headers = array('Content-Type: text/html; charset=UTF-8');
     560                        // $emailBody = array($args, $response);
     561                        // wp_mail('ronan@trelis.com', 'Trelis cancel subscription API response', print_r($emailBody, true), $headers);
     562                        // $this->custom_logs('run subscription api response', $emailBody);
     563                        // //Debug End
    564564
    565565                        if (!is_wp_error($response)) {
  • trelis-crypto-payments/trunk/admin/class-wc-trelis-rest-api.php

    r2896563 r2897687  
    8888        $expected_signature = hash_hmac('sha256', $json,  $trelis->get_option('webhook_secret'));
    8989
    90         $headers = array('Content-Type: text/html; charset=UTF-8');
    91         wp_mail('ronan@trelis.com', 'Trelis payment webhook response', $json, $headers);
    92         $this->custom_logs_rest('payment webhook response', $json);
     90        // $headers = array('Content-Type: text/html; charset=UTF-8');
     91        // wp_mail('ronan@trelis.com', 'Trelis payment webhook response', $json, $headers);
     92        // $this->custom_logs_rest('payment webhook response', $json);
    9393
    9494        if ($expected_signature != $_SERVER["HTTP_SIGNATURE"])
     
    273273        $response = wp_remote_post($apiUrl, $args);
    274274
    275         // Debugging code to send an email and write logs with the API response.
    276         $headers = array('Content-Type: text/html; charset=UTF-8');
    277         wp_mail('ronan@trelis.com', 'Trelis run subscription API', print_r($response, true), $headers);
    278         $this->custom_logs('run subscription api in webhook response', $response);
     275        // // Debugging code to send an email and write logs with the API response.
     276        // $headers = array('Content-Type: text/html; charset=UTF-8');
     277        // wp_mail('ronan@trelis.com', 'Trelis run subscription API', print_r($response, true), $headers);
     278        // $this->custom_logs('run subscription api in webhook response', $response);
    279279
    280280        /* Check if the API request was successful.
  • trelis-crypto-payments/trunk/trelis-crypto-payments.php

    r2896563 r2897687  
    4141
    4242
    43 define('TRELIS_API_URL', 'https://api.trelis.com/dev-env/dev-api/');
     43define('TRELIS_API_URL', 'https://api.trelis.com/dev-api/');
    4444
    4545define('TRELIS_PLUGIN_URL', trailingslashit(plugin_dir_url(__FILE__)));
Note: See TracChangeset for help on using the changeset viewer.