Plugin Directory

Changeset 2264141


Ignore:
Timestamp:
03/19/2020 09:45:24 PM (6 years ago)
Author:
transact
Message:

version 4.2.1: fix donation editing, pass donation flag

Location:
transact
Files:
7 edited
7 copied

Legend:

Unmodified
Added
Removed
  • transact/tags/4.2.1/admin/controllers/transact-admin-settings-post.php

    r2264115 r2264141  
    276276                let price = document.getElementById('transact_price').value * 100;
    277277
    278                 if (price.length > 0 &&  Number.isInteger(parseInt(price))) {
     278                if (Number.isInteger(parseInt(price))) {
    279279                    price = parseInt(price); // will set 0 if input is 0.1
    280280                    console.log('check_transact_price IS valid', price)
  • transact/tags/4.2.1/frontend/controllers/transact-api.php

    r2229641 r2264141  
    158158        $this->init_sale_parameters($this->transact);
    159159        $this->transact->setPrice($price);
     160        $this->transact->setDonation(TRUE);
    160161
    161162        if ($affiliate_id) {
  • transact/tags/4.2.1/readme.txt

    r2264115 r2264141  
    8181== Changelog ==
    8282
     83= 4.2.1 =
     84* Fix editing donation price. Pass donation flag to transact.io
     85
    8386= 4.2.0 =
    8487* Display pricing as dollars and cents.
  • transact/tags/4.2.1/transact-plugin.php

    r2264115 r2264141  
    33 * Plugin Name: transact.io
    44 * Description: Integrates transact.io services into WP
    5  * Version: 4.2.0
     5 * Version: 4.2.1
    66 * Author: transact.io
    77 * Author URI: https://transact.io
  • transact/tags/4.2.1/vendors/transact-io-php/transact-io.php

    r2229641 r2264141  
    3232    'domain' => '', // domain name
    3333    'sub' => FALSE, // is ONLY a subscription?
     34    'donate' => FALSE, // is a donation
    3435);
    3536
     
    131132      $this->token['aff'] = (int) $val;
    132133  }
     134
     135  function setDonation($val) {
     136    if ($val) {
     137      $this->token['donate'] = TRUE;
     138    } else {
     139      $this->token['donate'] = FALSE;
     140    }
     141  }
     142
    133143  function getToken() {
    134144    $this->token['iat'] = time();  // set timestamp
  • transact/trunk/admin/controllers/transact-admin-settings-post.php

    r2264115 r2264141  
    276276                let price = document.getElementById('transact_price').value * 100;
    277277
    278                 if (price.length > 0 &&  Number.isInteger(parseInt(price))) {
     278                if (Number.isInteger(parseInt(price))) {
    279279                    price = parseInt(price); // will set 0 if input is 0.1
    280280                    console.log('check_transact_price IS valid', price)
  • transact/trunk/frontend/controllers/transact-api.php

    r2229641 r2264141  
    158158        $this->init_sale_parameters($this->transact);
    159159        $this->transact->setPrice($price);
     160        $this->transact->setDonation(TRUE);
    160161
    161162        if ($affiliate_id) {
  • transact/trunk/readme.txt

    r2264115 r2264141  
    8181== Changelog ==
    8282
     83= 4.2.1 =
     84* Fix editing donation price. Pass donation flag to transact.io
     85
    8386= 4.2.0 =
    8487* Display pricing as dollars and cents.
  • transact/trunk/transact-plugin.php

    r2264115 r2264141  
    33 * Plugin Name: transact.io
    44 * Description: Integrates transact.io services into WP
    5  * Version: 4.2.0
     5 * Version: 4.2.1
    66 * Author: transact.io
    77 * Author URI: https://transact.io
  • transact/trunk/vendors/transact-io-php/transact-io.php

    r2229641 r2264141  
    3232    'domain' => '', // domain name
    3333    'sub' => FALSE, // is ONLY a subscription?
     34    'donate' => FALSE, // is a donation
    3435);
    3536
     
    131132      $this->token['aff'] = (int) $val;
    132133  }
     134
     135  function setDonation($val) {
     136    if ($val) {
     137      $this->token['donate'] = TRUE;
     138    } else {
     139      $this->token['donate'] = FALSE;
     140    }
     141  }
     142
    133143  function getToken() {
    134144    $this->token['iat'] = time();  // set timestamp
Note: See TracChangeset for help on using the changeset viewer.