Plugin Directory

Changeset 1514115


Ignore:
Timestamp:
10/13/2016 06:18:53 PM (9 years ago)
Author:
akeda
Message:

Preparing for 1.2.5 release

Location:
woocommerce-gateway-paypal-powered-by-braintree/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-gateway-paypal-powered-by-braintree/trunk/classes/class-wc-gateway-paypal-braintree-subscription.php

    r1498313 r1514115  
    267267        );
    268268
    269         return $sale_args;
     269        return apply_filters( 'wc_gateway_paypal_braintree_sale_args', $sale_args );
    270270    }
    271271
     
    304304
    305305        // Process the sale with the stored token and customer
    306         $sale_args = array(
    307             'amount' => $amount_to_charge,
     306        $sale_args = apply_filters( 'wc_gateway_paypal_braintree_sale_args', array(
     307            'amount'             => $amount_to_charge,
    308308            'paymentMethodToken' => $payment_method_token,
    309             'recurring' => true,
    310             'customerId' => $braintree_customer_id,
    311             'channel' => 'WooThemes_BT', // aka BN tracking code
    312             'orderId' => $order->id,
    313             'options' => array(
    314                 'submitForSettlement' => true,
    315                 'storeInVaultOnSuccess' => true
    316             )
    317         );
     309            'recurring'          => true,
     310            'customerId'         => $braintree_customer_id,
     311            'channel'            => 'WooThemes_BT', // aka BN tracking code
     312            'orderId'            => $order->id,
     313            'options'            => array(
     314                'submitForSettlement'   => true,
     315                'storeInVaultOnSuccess' => true,
     316            ),
     317        ) );
    318318
    319319        try {
  • woocommerce-gateway-paypal-powered-by-braintree/trunk/classes/class-wc-gateway-paypal-braintree.php

    r1498313 r1514115  
    825825        );
    826826
    827         $sale_args = array(
     827        $sale_args = apply_filters( 'wc_gateway_paypal_braintree_sale_args', array(
    828828            'amount'              => $order->order_total,
    829829            'billing'             => $billing,
     
    833833            'orderId'             => $order_id,
    834834            'options'             => array(
    835             'submitForSettlement' => $this->capture ? 'true' : 'false'
    836             )
    837         );
     835                'submitForSettlement' => $this->capture ? 'true' : 'false',
     836            ),
     837        ) );
    838838
    839839        require_once( dirname( __FILE__ ) . '/../braintree_sdk/lib/Braintree.php' );
     
    10011001            $this->log( __FUNCTION__, "Error: The transaction cannot be voided nor refunded in its current state: state = {$transaction->status}" );
    10021002            return false;
     1003        }
     1004
     1005        // Only void transaction when refund amount equals to order's total.
     1006        if ( 'void' === $action_to_take && $refund_amount != $order->get_total() ) {
     1007            return new WP_Error( 'unable_to_void', __( 'Unable to void unsettled transaction when refunding partially.', 'woocommerce-gateway-paypal-braintree' ) );
    10031008        }
    10041009
  • woocommerce-gateway-paypal-powered-by-braintree/trunk/readme.txt

    r1498313 r1514115  
    11=== WooCommerce PayPal Powered by Braintree Payment Gateway ===
    2 Contributors: automattic, akeda, allendav, royho, slash1andy, woosteve, spraveenitpro, mikedmoore, fernashes, shellbeezy, danieldudzic, dsmithweb
     2Contributors: automattic, akeda, allendav, royho, slash1andy, woosteve, spraveenitpro, mikedmoore, fernashes, shellbeezy, danieldudzic, dsmithweb, fullysupportedphil, corsonr
    33Tags: ecommerce, e-commerce, commerce, woothemes, wordpress ecommerce, store, sales, sell, shop, shopping, cart, checkout, configurable, paypal, braintree
    44Requires at least: 4.4
    55Tested up to: 4.6.1
    6 Stable tag: 1.2.4
     6Stable tag: 1.2.5
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    111111== Changelog ==
    112112
     113= 1.2.5 =
     114* Fix - Prevent void on unsettled transaction when refunding partially.
     115* Tweak - Add filter wc_gateway_paypal_braintree_sale_args to filter arguments passed to sale call.
     116
    113117= 1.2.4 =
    114118* Fix - Free subscription trails not allowed.
  • woocommerce-gateway-paypal-powered-by-braintree/trunk/woocommerce-gateway-paypal-powered-by-braintree.php

    r1498313 r1514115  
    66 * Author: WooThemes
    77 * Author URI: http://woothemes.com/
    8  * Version: 1.2.4
     8 * Version: 1.2.5
    99 *
    1010 * Copyright (c) 2016 WooThemes
Note: See TracChangeset for help on using the changeset viewer.