Changeset 1960196
- Timestamp:
- 10/21/2018 05:32:51 PM (7 years ago)
- Location:
- fermiac-siftscience-for-woocommerce/trunk
- Files:
-
- 3 edited
-
includes/third-party/class-wc-siftscience-stripe.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
-
woocommerce-siftscience.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fermiac-siftscience-for-woocommerce/trunk/includes/third-party/class-wc-siftscience-stripe.php
r1948808 r1960196 34 34 */ 35 35 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 ) ) { 37 38 return; 38 39 } 39 40 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 } 41 47 42 48 $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, 49 55 ); 50 56 … … 74 80 return json_decode( $meta, true ); 75 81 } 76 77 /**78 * @param $source79 *80 * @return string81 * @throws Exception82 */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 }91 82 } 92 83 -
fermiac-siftscience-for-woocommerce/trunk/readme.txt
r1948815 r1960196 4 4 Requires at least: 4.7.1 5 5 Tested up to: 4.7.1 6 Stable tag: 1.0. 16 Stable tag: 1.0.2 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 11 11 12 12 == Description == 13 14 WARNING: This plugin is only being minimally maintained on a best-effort basis. If you encounter a bug 15 I will do my best to fix it, but you should expect response time to be several weeks. 13 16 14 17 Add this plugin to your WooCommerce shop to get Sift Science fraud detection. Features: … … 28 31 29 32 == Changelog == 33 34 = 1.0.2 = 35 * 2018-10-15 36 * Redeploy this time for real 37 * See 1.0.1 for changes 30 38 31 39 = 1.0.1 = -
fermiac-siftscience-for-woocommerce/trunk/woocommerce-siftscience.php
r1948808 r1960196 5 5 Description: Get a handle on fraud with Sift Science - a modern approach to fraud prevention that uses machine learning. 6 6 Author: Nabeel Sulieman, Lukas Svec 7 Version: 1.0. 17 Version: 1.0.2 8 8 Author URI: https://github.com/Fermiac/woocommerce-siftscience/wiki 9 9 License: GPL2 … … 38 38 */ 39 39 public function run() { 40 $options = new WC_SiftScience_Options( '1.0. 1' );40 $options = new WC_SiftScience_Options( '1.0.2' ); 41 41 $logger = new WC_SiftScience_Logger( $options ); 42 42 $stats = new WC_SiftScience_Stats( $options, $logger );
Note: See TracChangeset
for help on using the changeset viewer.