Class: Stripe::TestHelpers::PaymentIntentService

Inherits:
StripeService show all
Defined in:
lib/stripe/services/test_helpers/payment_intent_service.rb

Instance Method Summary collapse

Methods inherited from StripeService

#initialize, #request, #request_stream

Constructor Details

This class inherits a constructor from Stripe::StripeService

Instance Method Details

#simulate_crypto_deposit(intent, params = {}, opts = {}) ⇒ Object

Simulate an incoming crypto deposit for a testmode PaymentIntent with payment_method_options[mode]=deposit. The transaction_hash parameter determines whether the simulated deposit succeeds or fails. Learn more about [testing your integration](docs.stripe.com/docs/payments/deposit-mode-stablecoin-payments#test-your-integration).



8
9
10
11
12
13
14
15
16
# File 'lib/stripe/services/test_helpers/payment_intent_service.rb', line 8

def simulate_crypto_deposit(intent, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v1/test_helpers/payment_intents/%<intent>s/simulate_crypto_deposit", { intent: CGI.escape(intent) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end