Plugin Directory

Changeset 1960196


Ignore:
Timestamp:
10/21/2018 05:32:51 PM (7 years ago)
Author:
nabsul
Message:

Update to version 1.0.2

Location:
fermiac-siftscience-for-woocommerce/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • fermiac-siftscience-for-woocommerce/trunk/includes/third-party/class-wc-siftscience-stripe.php

    r1948808 r1960196  
    3434     */
    3535    public function stripe_payment( $request, $order ) {
    36         if ( ! ( isset( $request ) && isset( $request->source ) ) ) {
     36        // Check that the card data is available
     37        if ( ! isset( $request, $request->source, $request->source->card ) ) {
    3738            return;
    3839        }
    3940
    40         $source = $request->source;
     41        $card = $request->source->card;
     42
     43        // check that the card has all the expected data
     44        if ( ! isset( $card, $card->last4, $card->cvc_check, $card->address_line1_check, $card->address_zip_check ) ) {
     45            return;
     46        }
    4147
    4248        $payment_details = array(
    43             '$payment_type'  => $this->convert_payment_type( $source ),
    44             '$payment_gateway' => '$stripe',
    45             '$card_last4'      => $source->last4,
    46             '$cvv_result_code' => $source->cvc_check,
    47             '$stripe_address_line1_check' => $source->address_line1_check,
    48             '$stripe_address_zip_check'   => $source->address_zip_check,
     49            '$payment_type'               => '$credit_card',
     50            '$payment_gateway'            => '$stripe',
     51            '$card_last4'                 => $card->last4,
     52            '$cvv_result_code'            => $card->cvc_check,
     53            '$stripe_address_line1_check' => $card->address_line1_check,
     54            '$stripe_address_zip_check'   => $card->address_zip_check,
    4955        );
    5056
     
    7480        return json_decode( $meta, true );
    7581    }
    76 
    77     /**
    78      * @param $source
    79      *
    80      * @return string
    81      * @throws Exception
    82      */
    83     private function convert_payment_type( $source ) {
    84         switch( $source->object ) {
    85             case 'card':
    86                 return '$credit_card';
    87             default:
    88                 throw new Exception( 'Unknown Stripe Source Payment Type: ' . $source->object );
    89         }
    90     }
    9182}
    9283
  • fermiac-siftscience-for-woocommerce/trunk/readme.txt

    r1948815 r1960196  
    44Requires at least: 4.7.1
    55Tested up to: 4.7.1
    6 Stable tag: 1.0.1
     6Stable tag: 1.0.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1111
    1212== Description ==
     13
     14WARNING: This plugin is only being minimally maintained on a best-effort basis. If you encounter a bug
     15I will do my best to fix it, but you should expect response time to be several weeks.
    1316
    1417Add this plugin to your WooCommerce shop to get Sift Science fraud detection. Features:
     
    2831
    2932== Changelog ==
     33
     34= 1.0.2 =
     35* 2018-10-15
     36* Redeploy this time for real
     37* See 1.0.1 for changes
    3038
    3139= 1.0.1 =
  • fermiac-siftscience-for-woocommerce/trunk/woocommerce-siftscience.php

    r1948808 r1960196  
    55Description: Get a handle on fraud with Sift Science - a modern approach to fraud prevention that uses machine learning.
    66Author: Nabeel Sulieman, Lukas Svec
    7 Version: 1.0.1
     7Version: 1.0.2
    88Author URI: https://github.com/Fermiac/woocommerce-siftscience/wiki
    99License: GPL2
     
    3838         */
    3939        public function run() {
    40             $options = new WC_SiftScience_Options( '1.0.1' );
     40            $options = new WC_SiftScience_Options( '1.0.2' );
    4141            $logger = new WC_SiftScience_Logger( $options );
    4242            $stats = new WC_SiftScience_Stats( $options, $logger );
Note: See TracChangeset for help on using the changeset viewer.