Plugin Directory

Changeset 2855827


Ignore:
Timestamp:
01/27/2023 12:35:36 PM (3 years ago)
Author:
activityhub
Message:

Purchase flow fixes

Location:
activityhub
Files:
352 added
6 edited

Legend:

Unmodified
Added
Removed
  • activityhub/trunk/README.txt

    r2854041 r2855827  
    44Requires at least: 5.0
    55Tested up to: 6.1.1
    6 Stable tag: 2.9.4
     6Stable tag: 2.9.5
    77Requires PHP: 7.2 or Greater
    88License: GPLv2 or later
     
    128128== Changelog ==
    129129
     130= 2.9.5 =
     131* Purchase flow fixes
     132
    130133= 2.9.4 =
    131134* Cart Page
  • activityhub/trunk/fieldday.php

    r2854041 r2855827  
    55 * Plugin URI: https://fieldday.com/
    66 * Description: A wordpress plugin for Field Day API
    7  * Version: 2.9.4
     7 * Version: 2.9.5
    88 * Author: Field Day
    99 * Author URI: https://profiles.wordpress.org/fieldday/
  • activityhub/trunk/inc/ClassActions.php

    r2854041 r2855827  
    22602260        $cartId = fieldday()->engine->getvalue('cartId', $postdata, false);
    22612261        $cardId = fieldday()->engine->getvalue('cardId', $postdata, false);
     2262        $paymentMethod = fieldday()->engine->getvalue('paymentMethod', $postdata, false);
    22622263        $apidata['cartId'] = $cartId;
    2263         if($cardId){ $apidata['cardId'] = $postdata['cardId']; }
     2264       
    22642265        if($KmUser) {
    22652266            $apidata['saveCard'] = $saveCard == 'on' ? true: false;
     
    22692270            $apidata['parentId'] = $GparentId;
    22702271        }
    2271         if (fieldday()->engine->getvalue('stripeToken', $postdata, false))
    2272         {   
    2273             $apidata['stripeToken'] =  $stripeToken;
    2274             $apidata['paymentMethod'] = 'card';
    2275         } else
    2276         {
    2277             $apidata['paymentMethod'] = 'free';
    2278             //unset($apidata['paymentAddress']);
    2279         }
     2272         
     2273        if($paymentMethod=='card'){
     2274            if($cardId){ $apidata['cardId'] = $postdata['cardId']; }
     2275            if (fieldday()->engine->getvalue('stripeToken', $postdata, false))
     2276            {   
     2277                $apidata['stripeToken'] =  $stripeToken;
     2278                //$apidata['paymentMethod'] = 'card';
     2279            }
     2280        }
     2281        $apidata['paymentMethod'] = $paymentMethod;
    22802282        $apidata['authPickUps'] = $postdata['authPickUps'];
    22812283        foreach ($apidata['authPickUps'] as $key => $picker)
  • activityhub/trunk/inc/Classfieldday.php

    r2854041 r2855827  
    1515     * @var string
    1616     */
    17     public $version = '2.9.4';
     17    public $version = '2.9.5';
    1818
    1919    /**
  • activityhub/trunk/views/checkout/cart.php

    r2846735 r2855827  
    192192    echo '<input type="hidden" name="cartId" value="'.$cartDetail->cartId.'">';
    193193}
     194if($CartTotals->payableAmount>0){ $paymentmethod = 'card';} else { $paymentmethod = 'free'; }
     195echo '<input type="hidden" name="paymentMethod" value="'.$paymentmethod.'">';
    194196?>
  • activityhub/trunk/views/checkout/purchase_confirmation.php

    r2850220 r2855827  
    44        <div class="km_row">
    55        <div class="km_cart_payment_sec km_col_6">
    6             <h3 class="km_heading km_primary_color"><?php _e('Payment Details', 'fieldday'); ?></h3>
    76            <div class="km_column_wrap km_payment_column">
     7                <h3 class="km_heading km_primary_color"><?php _e('Payment Details', 'fieldday'); ?></h3>
    88                <?php if($KmUser): ?>
    99                    <?php $paymentMethods = fieldday()->api->getSavedCards(); ?>
Note: See TracChangeset for help on using the changeset viewer.