Code Duplication    Length = 4-4 lines in 3 locations

includes/class-wc-gateway-stripe.php 1 location

@@ 624-627 (lines=4) @@
621
				}
622
			}
623
624
			if ( empty( $prepared_source->source ) ) {
625
				$localized_message = __( 'Payment processing failed. Please retry.', 'woocommerce-gateway-stripe' );
626
				throw new WC_Stripe_Exception( print_r( $prepared_source, true ), $localized_message );
627
			}
628
629
			// Store source to order meta.
630
			$this->save_source( $order, $prepared_source );

includes/payment-methods/class-wc-gateway-stripe-bitcoin.php 1 location

@@ 373-376 (lines=4) @@
370
371
			$prepared_source = $this->prepare_source( $this->get_source_object(), get_current_user_id(), $force_save_source );
372
373
			if ( empty( $prepared_source->source ) ) {
374
				$localized_message = __( 'Payment processing failed. Please retry.', 'woocommerce-gateway-stripe' );
375
				throw new WC_Stripe_Exception( print_r( $prepared_source, true ), $localized_message );
376
			}
377
378
			// Store source to order meta.
379
			$this->save_source( $order, $prepared_source );

includes/compat/class-wc-stripe-compat.php 1 location

@@ 102-105 (lines=4) @@
99
				}
100
			}
101
102
			if ( empty( $prepared_source->source ) ) {
103
				$localized_message = __( 'Payment processing failed. Please retry.', 'woocommerce-gateway-stripe' );
104
				throw new WC_Stripe_Exception( print_r( $prepared_source, true ), $localized_message );
105
			}
106
107
			// Store source to order meta.
108
			$this->save_source( $subscription, $prepared_source );