Plugin Directory

Changeset 2269448


Ignore:
Timestamp:
03/27/2020 08:27:41 PM (6 years ago)
Author:
transact
Message:

version 4.2.3 price 0 fix

Location:
transact
Files:
3 edited
12 copied

Legend:

Unmodified
Added
Removed
  • transact/tags/4.2.3/frontend/controllers/transact-api.php

    r2264141 r2269448  
    120120    function get_token()
    121121    {
    122         $this->init_sale_parameters($this->transact);
     122        $valid = $this->init_sale_parameters($this->transact);
     123        if(!$valid) {
     124            return array();
     125        }
    123126
    124127        $response = array(
     
    135138    function get_subscription_token()
    136139    {
    137         $this->init_sale_parameters($this->transact);
     140        $valid = $this->init_sale_parameters($this->transact);
     141        if(!$valid) {
     142            return array();
     143        }
    138144
    139145        $price = 1; // FIXME get price
     
    156162    function get_donation_token($price, $affiliate_id = null)
    157163    {
    158         $this->init_sale_parameters($this->transact);
     164        $valid = $this->init_sale_parameters($this->transact);
     165        if(!$valid || $price <= 0) {
     166            return array();
     167        }
    159168        $this->transact->setPrice($price);
    160169        $this->transact->setDonation(TRUE);
     
    196205    function init_sale_parameters($transact)
    197206    {
     207        if($this->price <= 0 || $this->price > 100000) {
     208            return false;
     209        }
     210
    198211        $transact->setSecret($this->secret_id);
    199212        $transact->setAlg($this->alg);
     
    203216
    204217        // Required:  Set the price of the sale
    205         //todo: what is max value?
    206218        $transact->setPrice($this->price);
    207219
     
    229241        $transact->setAffiliate($this->affiliate);
    230242
     243        return true;
    231244    }
    232245
  • transact/tags/4.2.3/readme.txt

    r2266126 r2269448  
    66Requires PHP: 5.6
    77Tested up to: 5.3.2
    8 Stable tag: 4.2.2
     8Stable tag: 4.2.3
    99License: APACHE-2.0
    1010License URI: https://www.apache.org/licenses/LICENSE-2.0
     
    8181== Changelog ==
    8282
     83= 4.2.3 =
     84* Fix with price of 0
     85
    8386= 4.2.2 =
    8487* Multiple donations fix.
  • transact/tags/4.2.3/transact-plugin.php

    r2266126 r2269448  
    33 * Plugin Name: transact.io
    44 * Description: Integrates transact.io services into WP
    5  * Version: 4.2.2
     5 * Version: 4.2.3
    66 * Author: transact.io
    77 * Author URI: https://transact.io
  • transact/trunk/frontend/controllers/transact-api.php

    r2264141 r2269448  
    120120    function get_token()
    121121    {
    122         $this->init_sale_parameters($this->transact);
     122        $valid = $this->init_sale_parameters($this->transact);
     123        if(!$valid) {
     124            return array();
     125        }
    123126
    124127        $response = array(
     
    135138    function get_subscription_token()
    136139    {
    137         $this->init_sale_parameters($this->transact);
     140        $valid = $this->init_sale_parameters($this->transact);
     141        if(!$valid) {
     142            return array();
     143        }
    138144
    139145        $price = 1; // FIXME get price
     
    156162    function get_donation_token($price, $affiliate_id = null)
    157163    {
    158         $this->init_sale_parameters($this->transact);
     164        $valid = $this->init_sale_parameters($this->transact);
     165        if(!$valid || $price <= 0) {
     166            return array();
     167        }
    159168        $this->transact->setPrice($price);
    160169        $this->transact->setDonation(TRUE);
     
    196205    function init_sale_parameters($transact)
    197206    {
     207        if($this->price <= 0 || $this->price > 100000) {
     208            return false;
     209        }
     210
    198211        $transact->setSecret($this->secret_id);
    199212        $transact->setAlg($this->alg);
     
    203216
    204217        // Required:  Set the price of the sale
    205         //todo: what is max value?
    206218        $transact->setPrice($this->price);
    207219
     
    229241        $transact->setAffiliate($this->affiliate);
    230242
     243        return true;
    231244    }
    232245
  • transact/trunk/readme.txt

    r2266126 r2269448  
    66Requires PHP: 5.6
    77Tested up to: 5.3.2
    8 Stable tag: 4.2.2
     8Stable tag: 4.2.3
    99License: APACHE-2.0
    1010License URI: https://www.apache.org/licenses/LICENSE-2.0
     
    8181== Changelog ==
    8282
     83= 4.2.3 =
     84* Fix with price of 0
     85
    8386= 4.2.2 =
    8487* Multiple donations fix.
  • transact/trunk/transact-plugin.php

    r2266126 r2269448  
    33 * Plugin Name: transact.io
    44 * Description: Integrates transact.io services into WP
    5  * Version: 4.2.2
     5 * Version: 4.2.3
    66 * Author: transact.io
    77 * Author URI: https://transact.io
Note: See TracChangeset for help on using the changeset viewer.