Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Remove the deprecated "Stripe (deprecated)" payment plugin (#17539)

Patryk Zawadzki264cb9487ee5
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8a86818bb4..6715a3ce89 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Drop the `manager.perform_mutation` method. - #16515 by @maarcingebala
- Dropped the invoicing plugin. For an example of a replacement, see https://docs.saleor.io/developer/app-store/apps/invoices - #16631 by @patrys
+- Dropped the deprecated "Stripe (Deprecated)" payment plugin. If your codebase refers to `mirumee.payments.stripe`, you will need to migrate to the supported plugin, `saleor.payments.stripe` - #17539 by @patrys
- Change error codes related to user enumeration bad habbit. Included mutations will now not reveal information in error codes if email was already registered:
- `AccountRegister`,
`AccountRegister` mutation will additionaly not return `ID` of the user.
diff --git a/saleor/payment/gateways/stripe/deprecated/__init__.py b/saleor/payment/gateways/stripe/deprecated/__init__.py
deleted file mode 100644
index 57d2091dd5..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/__init__.py
+++ /dev/null
@@ -1,285 +0,0 @@
-import opentracing
-import opentracing.tags
-import stripe
-
-from .... import TransactionKind
-from ....interface import (
- CustomerSource,
- GatewayConfig,
- GatewayResponse,
- PaymentData,
- PaymentMethodInfo,
-)
-from .utils import (
- get_amount_for_stripe,
- get_amount_from_stripe,
- get_currency_for_stripe,
- get_currency_from_stripe,
- shipping_to_stripe_dict,
-)
-
-
-def get_client_token(**_):
- """Not implemented for stripe gateway currently.
-
- The client token can be generated by stripe.js automatically.
- """
- return
-
-
-def authorize(
- payment_information: PaymentData, config: GatewayConfig
-) -> GatewayResponse:
- kind = TransactionKind.CAPTURE if config.auto_capture else TransactionKind.AUTH
- client = _get_client(**config.connection_params)
- capture_method = "automatic" if config.auto_capture else "manual"
- currency = get_currency_for_stripe(payment_information.currency)
- stripe_amount = get_amount_for_stripe(payment_information.amount, currency)
- future_use = "off_session" if config.store_customer else "on_session"
- customer_id = PaymentData.customer_id if payment_information.reuse_source else None
- shipping = (
- shipping_to_stripe_dict(payment_information.shipping)
- if payment_information.shipping
- else None
- )
-
- try:
- with opentracing.global_tracer().start_active_span(
- "stripe.PaymentIntent.create"
- ) as scope:
- span = scope.span
- span.set_tag(opentracing.tags.COMPONENT, "payment")
- span.set_tag("service.name", "stripe")
- intent = client.PaymentIntent.create(
- payment_method=payment_information.token,
- amount=stripe_amount,
- currency=currency,
- confirmation_method="manual",
- confirm=True,
- capture_method=capture_method,
- setup_future_usage=future_use,
- customer=customer_id,
- shipping=shipping,
- )
- if config.store_customer and not customer_id:
- with opentracing.global_tracer().start_active_span(
- "stripe.Customer.create"
- ) as scope:
- span = scope.span
- span.set_tag(opentracing.tags.COMPONENT, "payment")
- span.set_tag("service.name", "stripe")
- customer = client.Customer.create(payment_method=intent.payment_method)
- customer_id = customer.id
-
- except stripe.error.StripeError as exc:
- response = _error_response(kind=kind, exc=exc, payment_info=payment_information)
- else:
- success = intent.status in ("succeeded", "requires_capture", "requires_action")
- response = _success_response(
- intent=intent, kind=kind, success=success, customer_id=customer_id
- )
- response = fill_card_details(intent, response)
- return response
-
-
-def capture(payment_information: PaymentData, config: GatewayConfig) -> GatewayResponse:
- client = _get_client(**config.connection_params)
- intent = None
- try:
- with opentracing.global_tracer().start_active_span(
- "stripe.PaymentIntent.retrieve"
- ) as scope:
- span = scope.span
- span.set_tag(opentracing.tags.COMPONENT, "payment")
- span.set_tag("service.name", "stripe")
- intent = client.PaymentIntent.retrieve(id=payment_information.token)
- capture = intent.capture()
- except stripe.error.StripeError as exc:
- action_required = intent.status == "requires_action" if intent else False
- response = _error_response(
- kind=TransactionKind.CAPTURE,
- exc=exc,
- payment_info=payment_information,
- action_required=action_required,
- )
- else:
- response = _success_response(
- intent=intent,
- kind=TransactionKind.CAPTURE,
- success=capture.status in ("succeeded", "requires_action"),
- )
- response = fill_card_details(intent, response)
- return response
-
-
-def confirm(payment_information: PaymentData, config: GatewayConfig) -> GatewayResponse:
- client = _get_client(**config.connection_params)
- try:
- intent = client.PaymentIntent(id=payment_information.token)
- with opentracing.global_tracer().start_active_span(
- "stripe.PaymentIntent.confirm"
- ) as scope:
- span = scope.span
- span.set_tag(opentracing.tags.COMPONENT, "payment")
- span.set_tag("service.name", "stripe")
- intent.confirm()
- except stripe.error.StripeError as exc:
- response = _error_response(
- kind=TransactionKind.CONFIRM, exc=exc, payment_info=payment_information
- )
- else:
- response = _success_response(
- intent=intent,
- kind=TransactionKind.CONFIRM,
- success=intent.status == "succeeded",
- )
- response = fill_card_details(intent, response)
- return response
-
-
-def refund(payment_information: PaymentData, config: GatewayConfig) -> GatewayResponse:
- client = _get_client(**config.connection_params)
- currency = get_currency_for_stripe(payment_information.currency)
- stripe_amount = get_amount_for_stripe(payment_information.amount, currency)
- try:
- with opentracing.global_tracer().start_active_span(
- "stripe.PaymentIntent.retrieve"
- ) as scope:
- span = scope.span
- span.set_tag(opentracing.tags.COMPONENT, "payment")
- span.set_tag("service.name", "stripe")
- intent = client.PaymentIntent.retrieve(id=payment_information.token)
- refund = intent["charges"]["data"][0].refund(amount=stripe_amount)
- except stripe.error.StripeError as exc:
- response = _error_response(
- kind=TransactionKind.REFUND, exc=exc, payment_info=payment_information
- )
- else:
- response = _success_response(
- intent=intent,
- kind=TransactionKind.REFUND,
- success=refund.status == "succeeded",
- amount=payment_information.amount,
- currency=get_currency_from_stripe(refund.currency),
- )
- return response
-
-
-def void(payment_information: PaymentData, config: GatewayConfig) -> GatewayResponse:
- client = _get_client(**config.connection_params)
- try:
- with opentracing.global_tracer().start_active_span(
- "stripe.PaymentIntent.retrieve"
- ) as scope:
- span = scope.span
- span.set_tag(opentracing.tags.COMPONENT, "payment")
- span.set_tag("service.name", "stripe")
- intent = client.PaymentIntent.retrieve(id=payment_information.token)
- refund = intent["charges"]["data"][0].refund()
- except stripe.error.StripeError as exc:
- response = _error_response(
- kind=TransactionKind.VOID, exc=exc, payment_info=payment_information
- )
- else:
- response = _success_response(
- intent=intent,
- kind=TransactionKind.VOID,
- currency=get_currency_from_stripe(refund.currency),
- raw_response=refund,
- )
- return response
-
-
-def list_client_sources(
- config: GatewayConfig, customer_id: str
-) -> list[CustomerSource]:
- client = _get_client(**config.connection_params)
- with opentracing.global_tracer().start_active_span(
- "stripe.PaymentMethod.list"
- ) as scope:
- span = scope.span
- span.set_tag(opentracing.tags.COMPONENT, "payment")
- span.set_tag("service.name", "stripe")
- cards = client.PaymentMethod.list(customer=customer_id, type="card")["data"]
- return [
- CustomerSource(
- id=c.id,
- gateway="stripe",
- credit_card_info=PaymentMethodInfo(
- exp_year=c.card.exp_year,
- exp_month=c.card.exp_month,
- last_4=c.card.last4,
- name=None,
- ),
- )
- for c in cards
- ]
-
-
-def process_payment(
- payment_information: PaymentData, config: GatewayConfig
-) -> GatewayResponse:
- return authorize(payment_information, config)
-
-
-def _get_client(**connection_params):
- stripe.api_key = connection_params.get("private_key")
- return stripe
-
-
-def _error_response(
- kind: str, # use TransactionKind class
- exc: stripe.error.StripeError,
- payment_info: PaymentData,
- action_required: bool = False,
-) -> GatewayResponse:
- return GatewayResponse(
- is_success=False,
- action_required=action_required,
- transaction_id=payment_info.token or "",
- amount=payment_info.amount,
- currency=payment_info.currency,
- error=exc.user_message,
- kind=kind,
- raw_response=exc.json_body or {},
- customer_id=payment_info.customer_id,
- )
-
-
-def _success_response(
- intent: stripe.PaymentIntent,
- kind: str, # use TransactionKind class
- success: bool = True,
- amount=None,
- currency=None,
- customer_id=None,
- raw_response=None,
-):
- currency = currency or get_currency_from_stripe(intent.currency)
- return GatewayResponse(
- is_success=success,
- action_required=intent.status == "requires_action",
- transaction_id=intent.id,
- amount=amount or get_amount_from_stripe(intent.amount, currency),
- currency=currency,
- error=None,
- kind=kind,
- raw_response=raw_response or intent,
- customer_id=customer_id,
- )
-
-
-def fill_card_details(intent: stripe.PaymentIntent, response: GatewayResponse):
- charges = intent.charges["data"]
- if charges:
- card = intent.charges["data"][-1]["payment_method_details"]["card"]
- brand = card["brand"] or ""
-
- response.payment_method_info = PaymentMethodInfo(
- last_4=card["last4"],
- exp_year=card["exp_year"],
- exp_month=card["exp_month"],
- brand=brand.lower(),
- type="card",
- )
- return response
diff --git a/saleor/payment/gateways/stripe/deprecated/plugin.py b/saleor/payment/gateways/stripe/deprecated/plugin.py
deleted file mode 100644
index 0bef7322bc..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/plugin.py
+++ /dev/null
@@ -1,143 +0,0 @@
-from typing import TYPE_CHECKING
-
-from saleor.plugins.base_plugin import BasePlugin, ConfigurationTypeField
-
-from ...utils import get_supported_currencies
-from . import (
- GatewayConfig,
- authorize,
- capture,
- list_client_sources,
- process_payment,
- refund,
- void,
-)
-
-GATEWAY_NAME = "Stripe (Deprecated)"
-
-if TYPE_CHECKING:
- from ....interface import CustomerSource
- from . import GatewayResponse, PaymentData
-
-
-class DeprecatedStripeGatewayPlugin(BasePlugin):
- PLUGIN_NAME = GATEWAY_NAME
- PLUGIN_ID = "mirumee.payments.stripe"
- PLUGIN_DESCRIPTION = """
- This plugin will be removed in Saleor 4.0. Use the new Stripe plugin which
- implements webhook support, 3D Secure and SCA.
- """
-
- DEFAULT_CONFIGURATION = [
- {"name": "Public API key", "value": None},
- {"name": "Secret API key", "value": None},
- {"name": "Store customers card", "value": False},
- {"name": "Automatic payment capture", "value": True},
- {"name": "Supported currencies", "value": ""},
- ]
-
- CONFIG_STRUCTURE = {
- "Public API key": {
- "type": ConfigurationTypeField.SECRET,
- "help_text": "Provide Stripe public API key.",
- "label": "Public API key",
- },
- "Secret API key": {
- "type": ConfigurationTypeField.SECRET,
- "help_text": "Provide Stripe secret API key.",
- "label": "Secret API key",
- },
- "Store customers card": {
- "type": ConfigurationTypeField.BOOLEAN,
- "help_text": "Determines if Saleor should store cards on payments "
- "in Stripe customer.",
- "label": "Store customers card",
- },
- "Automatic payment capture": {
- "type": ConfigurationTypeField.BOOLEAN,
- "help_text": "Determines if Saleor should automatically capture payments.",
- "label": "Automatic payment capture",
- },
- "Supported currencies": {
- "type": ConfigurationTypeField.STRING,
- "help_text": "Determines currencies supported by gateway."
- " Please enter currency codes separated by a comma.",
- "label": "Supported currencies",
- },
- }
-
- def __init__(self, *args, **kwargs):
- super().__init__(*args, **kwargs)
- configuration = {item["name"]: item["value"] for item in self.configuration}
- self.config = GatewayConfig(
- gateway_name=GATEWAY_NAME,
- auto_capture=configuration["Automatic payment capture"],
- supported_currencies=configuration["Supported currencies"],
- connection_params={
- "public_key": configuration["Public API key"],
- "private_key": configuration["Secret API key"],
- },
- store_customer=configuration["Store customers card"],
- )
-
- def _get_gateway_config(self):
- return self.config
-
- def authorize_payment(
- self, payment_information: "PaymentData", previous_value
- ) -> "GatewayResponse":
- if not self.active:
- return previous_value
- return authorize(payment_information, self._get_gateway_config())
-
- def capture_payment(
- self, payment_information: "PaymentData", previous_value
- ) -> "GatewayResponse":
- if not self.active:
- return previous_value
- return capture(payment_information, self._get_gateway_config())
-
- def refund_payment(
- self, payment_information: "PaymentData", previous_value
- ) -> "GatewayResponse":
- if not self.active:
- return previous_value
- return refund(payment_information, self._get_gateway_config())
-
- def void_payment(
- self, payment_information: "PaymentData", previous_value
- ) -> "GatewayResponse":
- if not self.active:
- return previous_value
- return void(payment_information, self._get_gateway_config())
-
- def process_payment(
- self, payment_information: "PaymentData", previous_value
- ) -> "GatewayResponse":
- if not self.active:
- return previous_value
- return process_payment(payment_information, self._get_gateway_config())
-
- def list_payment_sources(
- self, customer_id: str, previous_value
- ) -> list["CustomerSource"]:
- if not self.active:
- return previous_value
- sources = list_client_sources(self._get_gateway_config(), customer_id)
- previous_value.extend(sources)
- return previous_value
-
- def get_supported_currencies(self, previous_value):
- if not self.active:
- return previous_value
- config = self._get_gateway_config()
- return get_supported_currencies(config, GATEWAY_NAME)
-
- def get_payment_config(self, previous_value):
- if not self.active:
- return previous_value
- config = self._get_gateway_config()
- return [
- {"field": "api_key", "value": config.connection_params["public_key"]},
- {"field": "store_customer_card", "value": config.store_customer},
- ]
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/__init__.py b/saleor/payment/gateways/stripe/deprecated/tests/__init__.py
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_authorize.yaml b/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_authorize.yaml
deleted file mode 100644
index bb4b0283c4..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_authorize.yaml
+++ /dev/null
@@ -1,132 +0,0 @@
-interactions:
-- request:
- body: payment_method=pm_card_pl&amount=4242&currency=usd&confirmation_method=manual&confirm=True&capture_method=automatic&setup_future_usage=on_session&shipping[name]=John+Doe&shipping[phone]=%2B48713988102&shipping[address][line1]=T%C4%99czowa+7&shipping[address][line2]=&shipping[address][city]=WROC%C5%81AW&shipping[address][state]=&shipping[address][postal_code]=53-601&shipping[address][country]=Poland
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- Content-Length:
- - '401'
- Content-Type:
- - application/x-www-form-urlencoded
- Idempotency-Key:
- - bd0e72e0-c36e-4a18-8c55-dde0b2f7b61d
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: POST
- uri: https://api.stripe.com/v1/payment_intents
- response:
- body:
- string: "{\n \"id\": \"pi_1F70K4IUmJaD6OqvfXkgsCB9\",\n \"object\": \"payment_intent\"\
- ,\n \"amount\": 4242,\n \"amount_capturable\": 0,\n \"amount_received\"\
- : 4242,\n \"application\": null,\n \"application_fee_amount\": null,\n \
- \ \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\"\
- : \"automatic\",\n \"charges\": {\n \"object\": \"list\",\n \"data\"\
- : [\n {\n \"id\": \"ch_1F70K4IUmJaD6Oqv2JSKXPjK\",\n \"\
- object\": \"charge\",\n \"amount\": 4242,\n \"amount_refunded\"\
- : 0,\n \"application\": null,\n \"application_fee\": null,\n\
- \ \"application_fee_amount\": null,\n \"balance_transaction\"\
- : \"txn_1F70K4IUmJaD6OqvMZN2Ac5d\",\n \"billing_details\": {\n \
- \ \"address\": {\n \"city\": null,\n \"country\"\
- : null,\n \"line1\": null,\n \"line2\": null,\n \
- \ \"postal_code\": null,\n \"state\": null\n },\n\
- \ \"email\": null,\n \"name\": null,\n \"phone\"\
- : null\n },\n \"captured\": true,\n \"created\": 1565703960,\n\
- \ \"currency\": \"usd\",\n \"customer\": null,\n \"description\"\
- : null,\n \"destination\": null,\n \"dispute\": null,\n \
- \ \"failure_code\": null,\n \"failure_message\": null,\n \
- \ \"fraud_details\": {\n },\n \"invoice\": null,\n \"\
- livemode\": false,\n \"metadata\": {\n },\n \"on_behalf_of\"\
- : null,\n \"order\": null,\n \"outcome\": {\n \"network_status\"\
- : \"approved_by_network\",\n \"reason\": null,\n \"risk_level\"\
- : \"normal\",\n \"risk_score\": 35,\n \"seller_message\"\
- : \"Payment complete.\",\n \"type\": \"authorized\"\n },\n\
- \ \"paid\": true,\n \"payment_intent\": \"pi_1F70K4IUmJaD6OqvfXkgsCB9\"\
- ,\n \"payment_method\": \"pm_1F70K3IUmJaD6OqvNgUunm34\",\n \"\
- payment_method_details\": {\n \"card\": {\n \"brand\"\
- : \"visa\",\n \"checks\": {\n \"address_line1_check\"\
- : null,\n \"address_postal_code_check\": null,\n \
- \ \"cvc_check\": null\n },\n \"country\": \"PL\",\n\
- \ \"exp_month\": 8,\n \"exp_year\": 2020,\n \
- \ \"fingerprint\": \"aleqpF0PMAATcfmb\",\n \"funding\": \"credit\"\
- ,\n \"last4\": \"0005\",\n \"three_d_secure\": null,\n\
- \ \"wallet\": null\n },\n \"type\": \"card\"\n\
- \ },\n \"receipt_email\": null,\n \"receipt_number\"\
- : null,\n \"receipt_url\": \"https://pay.stripe.com/receipts/acct_1EzlmjIUmJaD6Oqv/ch_1F70K4IUmJaD6Oqv2JSKXPjK/rcpt_FcEn5fjksybnZeXqVUUF2G9cZGNCV8Z\"\
- ,\n \"refunded\": false,\n \"refunds\": {\n \"object\"\
- : \"list\",\n \"data\": [\n\n ],\n \"has_more\"\
- : false,\n \"total_count\": 0,\n \"url\": \"/v1/charges/ch_1F70K4IUmJaD6Oqv2JSKXPjK/refunds\"\
- \n },\n \"review\": null,\n \"shipping\": {\n \
- \ \"address\": {\n \"city\": \"WROC\u0141AW\",\n \"\
- country\": \"Poland\",\n \"line1\": \"T\u0119czowa 7\",\n \
- \ \"line2\": \"\",\n \"postal_code\": \"53-601\",\n \
- \ \"state\": \"\"\n },\n \"carrier\": null,\n \
- \ \"name\": \"John Doe\",\n \"phone\": \"+48713988102\",\n \
- \ \"tracking_number\": null\n },\n \"source\": null,\n\
- \ \"source_transfer\": null,\n \"statement_descriptor\": null,\n\
- \ \"statement_descriptor_suffix\": null,\n \"status\": \"succeeded\"\
- ,\n \"transfer_data\": null,\n \"transfer_group\": null\n \
- \ }\n ],\n \"has_more\": false,\n \"total_count\": 1,\n \"\
- url\": \"/v1/charges?payment_intent=pi_1F70K4IUmJaD6OqvfXkgsCB9\"\n },\n\
- \ \"client_secret\": \"pi_1F70K4IUmJaD6OqvfXkgsCB9_secret_hgnbn7iX7DiQuKTT7dvFQ2YQ7\"\
- ,\n \"confirmation_method\": \"manual\",\n \"created\": 1565703960,\n \"\
- currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"\
- invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n\
- \ \"metadata\": {\n },\n \"next_action\": null,\n \"on_behalf_of\": null,\n\
- \ \"payment_method\": \"pm_1F70K3IUmJaD6OqvNgUunm34\",\n \"payment_method_options\"\
- : {\n \"card\": {\n \"request_three_d_secure\": \"automatic\"\n \
- \ }\n },\n \"payment_method_types\": [\n \"card\"\n ],\n \"receipt_email\"\
- : null,\n \"review\": null,\n \"setup_future_usage\": \"on_session\",\n\
- \ \"shipping\": {\n \"address\": {\n \"city\": \"WROC\u0141AW\",\n\
- \ \"country\": \"Poland\",\n \"line1\": \"T\u0119czowa 7\",\n \
- \ \"line2\": \"\",\n \"postal_code\": \"53-601\",\n \"state\"\
- : \"\"\n },\n \"carrier\": null,\n \"name\": \"John Doe\",\n \"\
- phone\": \"+48713988102\",\n \"tracking_number\": null\n },\n \"source\"\
- : null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\"\
- : null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\"\
- : null\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '4636'
- Content-Type:
- - application/json
- Date:
- - Tue, 13 Aug 2019 13:46:01 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- idempotency-key:
- - bd0e72e0-c36e-4a18-8c55-dde0b2f7b61d
- original-request:
- - req_dOzyCSUkqzrkKT
- request-id:
- - req_dOzyCSUkqzrkKT
- stripe-version:
- - '2019-05-16'
- status:
- code: 200
- message: OK
-version: 1
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_authorize_3d_secure.yaml b/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_authorize_3d_secure.yaml
deleted file mode 100644
index 3fadfab418..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_authorize_3d_secure.yaml
+++ /dev/null
@@ -1,237 +0,0 @@
-interactions:
-- request:
- body: payment_method=pm_card_threeDSecure2Required&amount=4242&currency=usd&confirmation_method=manual&confirm=True&capture_method=automatic
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- Content-Length:
- - '134'
- Content-Type:
- - application/x-www-form-urlencoded
- Idempotency-Key:
- - af317a86-f82f-45e2-b036-de792905a3cc
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-Telemetry:
- - '{"last_request_metrics": {"request_id": "req_NpPPwz4gRweJlh", "request_duration_ms":
- 5}}'
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: POST
- uri: https://api.stripe.com/v1/payment_intents
- response:
- body:
- string: "{\n \"id\": \"pi_1F5UpbIUmJaD6Oqv71dfNXKr\",\n \"object\": \"payment_intent\"\
- ,\n \"amount\": 4242,\n \"amount_capturable\": 0,\n \"amount_received\"\
- : 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"\
- canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\"\
- : \"automatic\",\n \"charges\": {\n \"object\": \"list\",\n \"data\"\
- : [\n\n ],\n \"has_more\": false,\n \"total_count\": 0,\n \"url\"\
- : \"/v1/charges?payment_intent=pi_1F5UpbIUmJaD6Oqv71dfNXKr\"\n },\n \"client_secret\"\
- : \"pi_1F5UpbIUmJaD6Oqv71dfNXKr_secret_YpKk3AC4bBa21fKw05Utm4dNZ\",\n \"\
- confirmation_method\": \"manual\",\n \"created\": 1565344579,\n \"currency\"\
- : \"usd\",\n \"customer\": null,\n \"description\": null,\n \"invoice\"\
- : null,\n \"last_payment_error\": null,\n \"livemode\": false,\n \"metadata\"\
- : {\n },\n \"next_action\": {\n \"type\": \"use_stripe_sdk\",\n \"\
- use_stripe_sdk\": {\n \"type\": \"stripe_3ds2_fingerprint\",\n \"\
- three_d_secure_2_source\": \"src_1F5UpbIUmJaD6OqvjlXgR2e8\",\n \"directory_server_name\"\
- : \"visa\",\n \"server_transaction_id\": \"1300b770-7015-461e-95e6-f5d10b04db5f\"\
- ,\n \"three_ds_method_url\": \"\",\n \"three_ds_optimizations\"\
- : \"\",\n \"directory_server_encryption\": {\n \"directory_server_id\"\
- : \"A000000003\",\n \"algorithm\": \"RSA\",\n \"certificate\"\
- : \"-----BEGIN CERTIFICATE-----\\nMIIFrjCCBJagAwIBAgIQB2rJmsHVwbONd36WP9QPrTANBgkqhkiG9w0BAQsFADBx\\\
- nMQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRl\\ncm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xIjAgBgNVBAMTGVZpc2EgZUNv\\\
- nbW1lcmNlIElzc3VpbmcgQ0EwHhcNMTcxMTAyMjIyMzEwWhcNMjAxMTAzMDAyMzEw\\nWjCBoTEYMBYGA1UEBxMPSGlnaGxhbmRzIFJhbmNoMREwDwYDVQQIEwhDb2xvcmFk\\\
- nbzELMAkGA1UEBhMCVVMxDTALBgNVBAoTBFZJU0ExLzAtBgNVBAsTJlZpc2EgSW50\\nZXJuYXRpb25hbCBTZXJ2aWNlIEFzc29jaWF0aW9uMSUwIwYDVQQDExwzZHMyLnJz\\\
- nYS5lbmNyeXB0aW9uLnZpc2EuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\\nCgKCAQEAst+HGfPPsX3p6HHEQ9YzourlQj16Nscmm13Cp7cZe4dZB2oWnJqZ7oh/\\\
- npEo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HvtH8aoVlwdV\\\
- nZqW1LS7YgFmypw23RuwhY/81q6UCzyr0TP579ZRdhE2o8mCP2w4lPJ9zcc+U30rq\\n299yOIzzlr3xF7zSujtFWsan9sYXiwGd/BmoKoMWuDpI/k4+oKsGGelT84ATB+0t\\\
- nvz8KPFUgOSwsAGl0lUq8ILKpeeUYiZGo3BxN77t+Nwtd/jmliFKMAGzsGHxBvfaL\\ndXe6YJ2E5/4tAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQD\\\
- nAgEGMB0GA1UdDgQWBBQVOIMPPyw/cDMezUb+B4wg4NfDtzANBgkqhkiG9w0BAQUF\\nAAOCAQEAX/FBfXxcCLkr4NWSR/pnXKUTwwMhmytMiUbPWU3J/qVAtmPN3XEolWcR\\\
- nzCSs00Rsca4BIGsDoo8Ytyk6feUWYFN4PMCvFYP3j1IzJL1kk5fui/fbGKhtcbP3\\nLBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pzzkWKsKZJ/0x9nXGIxHYdkFsd\\\
- n7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBuYQa7FkKMcPcw\\n++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt\\\
- n398znM/jra6O1I7mT1GvFpLgXPYHDw==\\n-----END CERTIFICATE-----\\n\"\n \
- \ ]\n }\n }\n },\n \"on_behalf_of\": null,\n \"payment_method\"\
- : \"pm_1F5UpbIUmJaD6Oqv3hvrQbjd\",\n \"payment_method_options\": {\n \"\
- card\": {\n \"request_three_d_secure\": \"automatic\"\n }\n },\n\
- \ \"payment_method_types\": [\n \"card\"\n ],\n \"receipt_email\": null,\n\
- \ \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n\
- \ \"source\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\"\
- : null,\n \"status\": \"requires_action\",\n \"transfer_data\": null,\n\
- \ \"transfer_group\": null\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '5228'
- Content-Type:
- - application/json
- Date:
- - Fri, 09 Aug 2019 09:56:19 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- idempotency-key:
- - af317a86-f82f-45e2-b036-de792905a3cc
- original-request:
- - req_rJ8KoAjQPpmxDW
- request-id:
- - req_rJ8KoAjQPpmxDW
- stripe-version:
- - '2019-05-16'
- status:
- code: 200
- message: OK
-- request:
- body: payment_method=pm_card_threeDSecure2Required&amount=4242&currency=usd&confirmation_method=manual&confirm=True&capture_method=automatic
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- Content-Length:
- - '134'
- Content-Type:
- - application/x-www-form-urlencoded
- Idempotency-Key:
- - 34ed56c3-b1b1-4ff6-bb04-5d1e907df1a8
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: POST
- uri: https://api.stripe.com/v1/payment_intents
- response:
- body:
- string: "{\n \"id\": \"pi_1F6YmgIUmJaD6Oqv77HUh6qq\",\n \"object\": \"payment_intent\"\
- ,\n \"amount\": 4242,\n \"amount_capturable\": 0,\n \"amount_received\"\
- : 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"\
- canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\"\
- : \"automatic\",\n \"charges\": {\n \"object\": \"list\",\n \"data\"\
- : [\n\n ],\n \"has_more\": false,\n \"total_count\": 0,\n \"url\"\
- : \"/v1/charges?payment_intent=pi_1F6YmgIUmJaD6Oqv77HUh6qq\"\n },\n \"client_secret\"\
- : \"pi_1F6YmgIUmJaD6Oqv77HUh6qq_secret_bMSADceQXpXF9OxcQSCg3VFWy\",\n \"\
- confirmation_method\": \"manual\",\n \"created\": 1565598102,\n \"currency\"\
- : \"usd\",\n \"customer\": null,\n \"description\": null,\n \"invoice\"\
- : null,\n \"last_payment_error\": null,\n \"livemode\": false,\n \"metadata\"\
- : {\n },\n \"next_action\": {\n \"type\": \"use_stripe_sdk\",\n \"\
- use_stripe_sdk\": {\n \"type\": \"stripe_3ds2_fingerprint\",\n \"\
- three_d_secure_2_source\": \"src_1F6YmgIUmJaD6OqveLcx2w0n\",\n \"directory_server_name\"\
- : \"visa\",\n \"server_transaction_id\": \"b25f81ed-c6f1-4667-9a0d-395096ffe51a\"\
- ,\n \"three_ds_method_url\": \"\",\n \"three_ds_optimizations\"\
- : \"\",\n \"directory_server_encryption\": {\n \"directory_server_id\"\
- : \"A000000003\",\n \"algorithm\": \"RSA\",\n \"certificate\"\
- : \"-----BEGIN CERTIFICATE-----\\nMIIFrjCCBJagAwIBAgIQB2rJmsHVwbONd36WP9QPrTANBgkqhkiG9w0BAQsFADBx\\\
- nMQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRl\\ncm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xIjAgBgNVBAMTGVZpc2EgZUNv\\\
- nbW1lcmNlIElzc3VpbmcgQ0EwHhcNMTcxMTAyMjIyMzEwWhcNMjAxMTAzMDAyMzEw\\nWjCBoTEYMBYGA1UEBxMPSGlnaGxhbmRzIFJhbm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n \
- \ ]\n }\n }\n },\n \"on_behalf_of\": null,\n \"payment_method\"\
- : \"pm_1F6YmgIUmJaD6Oqvca9az7XD\",\n \"payment_method_options\": {\n \"\
- card\": {\n \"request_three_d_secure\": \"automatic\"\n }\n },\n\
- \ \"payment_method_types\": [\n \"card\"\n ],\n \"receipt_email\": null,\n\
- \ \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n\
- \ \"source\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\"\
- : null,\n \"status\": \"requires_action\",\n \"transfer_data\": null,\n\
- \ \"transfer_group\": null\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '5228'
- Content-Type:
- - application/json
- Date:
- - Mon, 12 Aug 2019 08:21:42 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- idempotency-key:
- - 34ed56c3-b1b1-4ff6-bb04-5d1e907df1a8
- original-request:
- - req_Txm6G1UzQgotpN
- request-id:
- - req_Txm6G1UzQgotpN
- stripe-version:
- - '2019-05-16'
- status:
- code: 200
- message: OK
-version: 1
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_authorize_and_save_customer_id.yaml b/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_authorize_and_save_customer_id.yaml
deleted file mode 100644
index 69d6666bbe..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_authorize_and_save_customer_id.yaml
+++ /dev/null
@@ -1,203 +0,0 @@
-interactions:
-- request:
- body: payment_method=pm_card_pl&amount=9840&currency=usd&confirmation_method=manual&confirm=True&capture_method=automatic&setup_future_usage=off_session
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- Content-Length:
- - '146'
- Content-Type:
- - application/x-www-form-urlencoded
- Idempotency-Key:
- - c42f2724-bc37-4d67-893c-0751d2831eb7
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: POST
- uri: https://api.stripe.com/v1/payment_intents
- response:
- body:
- string: "{\n \"id\": \"pi_1F6dCXIUmJaD6OqvYV4sLW9U\",\n \"object\": \"payment_intent\"\
- ,\n \"amount\": 9840,\n \"amount_capturable\": 0,\n \"amount_received\"\
- : 9840,\n \"application\": null,\n \"application_fee_amount\": null,\n \
- \ \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\"\
- : \"automatic\",\n \"charges\": {\n \"object\": \"list\",\n \"data\"\
- : [\n {\n \"id\": \"ch_1F6dCXIUmJaD6OqvALz0AVIW\",\n \"\
- object\": \"charge\",\n \"amount\": 9840,\n \"amount_refunded\"\
- : 0,\n \"application\": null,\n \"application_fee\": null,\n\
- \ \"application_fee_amount\": null,\n \"balance_transaction\"\
- : \"txn_1F6dCXIUmJaD6OqvUIEx67pT\",\n \"billing_details\": {\n \
- \ \"address\": {\n \"city\": null,\n \"country\"\
- : null,\n \"line1\": null,\n \"line2\": null,\n \
- \ \"postal_code\": null,\n \"state\": null\n },\n\
- \ \"email\": null,\n \"name\": null,\n \"phone\"\
- : null\n },\n \"captured\": true,\n \"created\": 1565615081,\n\
- \ \"currency\": \"usd\",\n \"customer\": null,\n \"description\"\
- : null,\n \"destination\": null,\n \"dispute\": null,\n \
- \ \"failure_code\": null,\n \"failure_message\": null,\n \
- \ \"fraud_details\": {\n },\n \"invoice\": null,\n \"\
- livemode\": false,\n \"metadata\": {\n },\n \"on_behalf_of\"\
- : null,\n \"order\": null,\n \"outcome\": {\n \"network_status\"\
- : \"approved_by_network\",\n \"reason\": null,\n \"risk_level\"\
- : \"normal\",\n \"risk_score\": 23,\n \"seller_message\"\
- : \"Payment complete.\",\n \"type\": \"authorized\"\n },\n\
- \ \"paid\": true,\n \"payment_intent\": \"pi_1F6dCXIUmJaD6OqvYV4sLW9U\"\
- ,\n \"payment_method\": \"pm_1F6dCWIUmJaD6OqvCtcAnPSq\",\n \"\
- payment_method_details\": {\n \"card\": {\n \"brand\"\
- : \"visa\",\n \"checks\": {\n \"address_line1_check\"\
- : null,\n \"address_postal_code_check\": null,\n \
- \ \"cvc_check\": null\n },\n \"country\": \"PL\",\n\
- \ \"exp_month\": 8,\n \"exp_year\": 2020,\n \
- \ \"fingerprint\": \"aleqpF0PMAATcfmb\",\n \"funding\": \"credit\"\
- ,\n \"last4\": \"0005\",\n \"three_d_secure\": null,\n\
- \ \"wallet\": null\n },\n \"type\": \"card\"\n\
- \ },\n \"receipt_email\": null,\n \"receipt_number\"\
- : null,\n \"receipt_url\": \"https://pay.stripe.com/receipts/acct_1EzlmjIUmJaD6Oqv/ch_1F6dCXIUmJaD6OqvALz0AVIW/rcpt_FbquBAyeTl9NMntBmlqLH311NYu3gUp\"\
- ,\n \"refunded\": false,\n \"refunds\": {\n \"object\"\
- : \"list\",\n \"data\": [\n\n ],\n \"has_more\"\
- : false,\n \"total_count\": 0,\n \"url\": \"/v1/charges/ch_1F6dCXIUmJaD6OqvALz0AVIW/refunds\"\
- \n },\n \"review\": null,\n \"shipping\": null,\n \
- \ \"source\": null,\n \"source_transfer\": null,\n \"statement_descriptor\"\
- : null,\n \"statement_descriptor_suffix\": null,\n \"status\"\
- : \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\"\
- : null\n }\n ],\n \"has_more\": false,\n \"total_count\": 1,\n\
- \ \"url\": \"/v1/charges?payment_intent=pi_1F6dCXIUmJaD6OqvYV4sLW9U\"\n\
- \ },\n \"client_secret\": \"pi_1F6dCXIUmJaD6OqvYV4sLW9U_secret_8Y3cK3xVMLMDoEPrdc27csqzz\"\
- ,\n \"confirmation_method\": \"manual\",\n \"created\": 1565615081,\n \"\
- currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"\
- invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n\
- \ \"metadata\": {\n },\n \"next_action\": null,\n \"on_behalf_of\": null,\n\
- \ \"payment_method\": \"pm_1F6dCWIUmJaD6OqvCtcAnPSq\",\n \"payment_method_options\"\
- : {\n \"card\": {\n \"request_three_d_secure\": \"automatic\"\n \
- \ }\n },\n \"payment_method_types\": [\n \"card\"\n ],\n \"receipt_email\"\
- : null,\n \"review\": null,\n \"setup_future_usage\": \"off_session\",\n\
- \ \"shipping\": null,\n \"source\": null,\n \"statement_descriptor\": null,\n\
- \ \"statement_descriptor_suffix\": null,\n \"status\": \"succeeded\",\n\
- \ \"transfer_data\": null,\n \"transfer_group\": null\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '4005'
- Content-Type:
- - application/json
- Date:
- - Mon, 12 Aug 2019 13:04:42 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- idempotency-key:
- - c42f2724-bc37-4d67-893c-0751d2831eb7
- original-request:
- - req_KJM1qzNiHhKCXC
- request-id:
- - req_KJM1qzNiHhKCXC
- stripe-version:
- - '2019-05-16'
- status:
- code: 200
- message: OK
-- request:
- body: payment_method=pm_1F6dCWIUmJaD6OqvCtcAnPSq
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- Content-Length:
- - '42'
- Content-Type:
- - application/x-www-form-urlencoded
- Idempotency-Key:
- - ce704720-d12d-4867-b304-6011774e9b81
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-Telemetry:
- - '{"last_request_metrics": {"request_id": "req_KJM1qzNiHhKCXC", "request_duration_ms":
- 1873}}'
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: POST
- uri: https://api.stripe.com/v1/customers
- response:
- body:
- string: "{\n \"id\": \"cus_FbquUfgBnLdlsY\",\n \"object\": \"customer\",\n\
- \ \"account_balance\": 0,\n \"address\": null,\n \"balance\": 0,\n \"\
- created\": 1565615082,\n \"currency\": null,\n \"default_source\": null,\n\
- \ \"delinquent\": false,\n \"description\": null,\n \"discount\": null,\n\
- \ \"email\": null,\n \"invoice_prefix\": \"7829D842\",\n \"invoice_settings\"\
- : {\n \"custom_fields\": null,\n \"default_payment_method\": null,\n\
- \ \"footer\": null\n },\n \"livemode\": false,\n \"metadata\": {\n \
- \ },\n \"name\": null,\n \"phone\": null,\n \"preferred_locales\": [\n\n\
- \ ],\n \"shipping\": null,\n \"sources\": {\n \"object\": \"list\",\n\
- \ \"data\": [\n\n ],\n \"has_more\": false,\n \"total_count\"\
- : 0,\n \"url\": \"/v1/customers/cus_FbquUfgBnLdlsY/sources\"\n },\n \"\
- subscriptions\": {\n \"object\": \"list\",\n \"data\": [\n\n ],\n\
- \ \"has_more\": false,\n \"total_count\": 0,\n \"url\": \"/v1/customers/cus_FbquUfgBnLdlsY/subscriptions\"\
- \n },\n \"tax_exempt\": \"none\",\n \"tax_ids\": {\n \"object\": \"\
- list\",\n \"data\": [\n\n ],\n \"has_more\": false,\n \"total_count\"\
- : 0,\n \"url\": \"/v1/customers/cus_FbquUfgBnLdlsY/tax_ids\"\n },\n \"\
- tax_info\": null,\n \"tax_info_verification\": null\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '1117'
- Content-Type:
- - application/json
- Date:
- - Mon, 12 Aug 2019 13:04:42 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- idempotency-key:
- - ce704720-d12d-4867-b304-6011774e9b81
- original-request:
- - req_aXRJjwtjBNsaQi
- request-id:
- - req_aXRJjwtjBNsaQi
- stripe-version:
- - '2019-05-16'
- status:
- code: 200
- message: OK
-version: 1
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_authorize_error_response.yaml b/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_authorize_error_response.yaml
deleted file mode 100644
index ec4a4f3c92..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_authorize_error_response.yaml
+++ /dev/null
@@ -1,71 +0,0 @@
-interactions:
-- request:
- body: payment_method=abcdefghijklmnoprstquwz&amount=4242&currency=usd&confirmation_method=manual&confirm=True&capture_method=automatic
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- Content-Length:
- - '128'
- Content-Type:
- - application/x-www-form-urlencoded
- Idempotency-Key:
- - ceca05d8-534b-4de0-a1ed-51fcff242024
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-Telemetry:
- - '{"last_request_metrics": {"request_id": "req_8S93V2YnPF1OyS", "request_duration_ms":
- 73}}'
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: POST
- uri: https://api.stripe.com/v1/payment_intents
- response:
- body:
- string: "{\n \"error\": {\n \"code\": \"resource_missing\",\n \"doc_url\"\
- : \"https://stripe.com/docs/error-codes/resource-missing\",\n \"message\"\
- : \"No such payment_method: abcdefghijklmnoprstquwz\",\n \"param\": \"\
- payment_method\",\n \"type\": \"invalid_request_error\"\n }\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '257'
- Content-Type:
- - application/json
- Date:
- - Thu, 08 Aug 2019 14:57:07 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- idempotency-key:
- - ceca05d8-534b-4de0-a1ed-51fcff242024
- original-request:
- - req_NpPPwz4gRweJlh
- request-id:
- - req_NpPPwz4gRweJlh
- stripe-version:
- - '2019-05-16'
- status:
- code: 400
- message: Bad Request
-version: 1
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_authorize_with_customer_id.yaml b/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_authorize_with_customer_id.yaml
deleted file mode 100644
index 4f3bf2ace4..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_authorize_with_customer_id.yaml
+++ /dev/null
@@ -1,121 +0,0 @@
-interactions:
-- request:
- body: payment_method=pm_card_visa&amount=4242&currency=usd&confirmation_method=manual&confirm=True&capture_method=automatic&setup_future_usage=on_session
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- Content-Length:
- - '147'
- Content-Type:
- - application/x-www-form-urlencoded
- Idempotency-Key:
- - cbe6c60a-c66b-465a-99ce-1135e3dd3d60
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: POST
- uri: https://api.stripe.com/v1/payment_intents
- response:
- body:
- string: "{\n \"id\": \"pi_1F6dW3IUmJaD6OqvfELxlKfH\",\n \"object\": \"payment_intent\"\
- ,\n \"amount\": 4242,\n \"amount_capturable\": 0,\n \"amount_received\"\
- : 4242,\n \"application\": null,\n \"application_fee_amount\": null,\n \
- \ \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\"\
- : \"automatic\",\n \"charges\": {\n \"object\": \"list\",\n \"data\"\
- : [\n {\n \"id\": \"ch_1F6dW3IUmJaD6OqvnhqTybtH\",\n \"\
- object\": \"charge\",\n \"amount\": 4242,\n \"amount_refunded\"\
- : 0,\n \"application\": null,\n \"application_fee\": null,\n\
- \ \"application_fee_amount\": null,\n \"balance_transaction\"\
- : \"txn_1F6dW3IUmJaD6OqvZ1Hokmlt\",\n \"billing_details\": {\n \
- \ \"address\": {\n \"city\": null,\n \"country\"\
- : null,\n \"line1\": null,\n \"line2\": null,\n \
- \ \"postal_code\": null,\n \"state\": null\n },\n\
- \ \"email\": null,\n \"name\": null,\n \"phone\"\
- : null\n },\n \"captured\": true,\n \"created\": 1565616291,\n\
- \ \"currency\": \"usd\",\n \"customer\": null,\n \"description\"\
- : null,\n \"destination\": null,\n \"dispute\": null,\n \
- \ \"failure_code\": null,\n \"failure_message\": null,\n \
- \ \"fraud_details\": {\n },\n \"invoice\": null,\n \"\
- livemode\": false,\n \"metadata\": {\n },\n \"on_behalf_of\"\
- : null,\n \"order\": null,\n \"outcome\": {\n \"network_status\"\
- : \"approved_by_network\",\n \"reason\": null,\n \"risk_level\"\
- : \"normal\",\n \"risk_score\": 29,\n \"seller_message\"\
- : \"Payment complete.\",\n \"type\": \"authorized\"\n },\n\
- \ \"paid\": true,\n \"payment_intent\": \"pi_1F6dW3IUmJaD6OqvfELxlKfH\"\
- ,\n \"payment_method\": \"pm_1F6dW3IUmJaD6OqvWVN4WVwt\",\n \"\
- payment_method_details\": {\n \"card\": {\n \"brand\"\
- : \"visa\",\n \"checks\": {\n \"address_line1_check\"\
- : null,\n \"address_postal_code_check\": null,\n \
- \ \"cvc_check\": null\n },\n \"country\": \"US\",\n\
- \ \"exp_month\": 8,\n \"exp_year\": 2020,\n \
- \ \"fingerprint\": \"TtkCcsbSxUHACPLM\",\n \"funding\": \"credit\"\
- ,\n \"last4\": \"4242\",\n \"three_d_secure\": null,\n\
- \ \"wallet\": null\n },\n \"type\": \"card\"\n\
- \ },\n \"receipt_email\": null,\n \"receipt_number\"\
- : null,\n \"receipt_url\": \"https://pay.stripe.com/receipts/acct_1EzlmjIUmJaD6Oqv/ch_1F6dW3IUmJaD6OqvnhqTybtH/rcpt_FbrE3VnfCU4rAGDp6dmi6hwLCDcaBpL\"\
- ,\n \"refunded\": false,\n \"refunds\": {\n \"object\"\
- : \"list\",\n \"data\": [\n\n ],\n \"has_more\"\
- : false,\n \"total_count\": 0,\n \"url\": \"/v1/charges/ch_1F6dW3IUmJaD6OqvnhqTybtH/refunds\"\
- \n },\n \"review\": null,\n \"shipping\": null,\n \
- \ \"source\": null,\n \"source_transfer\": null,\n \"statement_descriptor\"\
- : null,\n \"statement_descriptor_suffix\": null,\n \"status\"\
- : \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\"\
- : null\n }\n ],\n \"has_more\": false,\n \"total_count\": 1,\n\
- \ \"url\": \"/v1/charges?payment_intent=pi_1F6dW3IUmJaD6OqvfELxlKfH\"\n\
- \ },\n \"client_secret\": \"pi_1F6dW3IUmJaD6OqvfELxlKfH_secret_8JVwKjwO7pbpBreupOjALTkxM\"\
- ,\n \"confirmation_method\": \"manual\",\n \"created\": 1565616291,\n \"\
- currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"\
- invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n\
- \ \"metadata\": {\n },\n \"next_action\": null,\n \"on_behalf_of\": null,\n\
- \ \"payment_method\": \"pm_1F6dW3IUmJaD6OqvWVN4WVwt\",\n \"payment_method_options\"\
- : {\n \"card\": {\n \"request_three_d_secure\": \"automatic\"\n \
- \ }\n },\n \"payment_method_types\": [\n \"card\"\n ],\n \"receipt_email\"\
- : null,\n \"review\": null,\n \"setup_future_usage\": \"on_session\",\n\
- \ \"shipping\": null,\n \"source\": null,\n \"statement_descriptor\": null,\n\
- \ \"statement_descriptor_suffix\": null,\n \"status\": \"succeeded\",\n\
- \ \"transfer_data\": null,\n \"transfer_group\": null\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '4004'
- Content-Type:
- - application/json
- Date:
- - Mon, 12 Aug 2019 13:24:52 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- idempotency-key:
- - cbe6c60a-c66b-465a-99ce-1135e3dd3d60
- original-request:
- - req_bauQ1QyPH1PRtP
- request-id:
- - req_bauQ1QyPH1PRtP
- stripe-version:
- - '2019-05-16'
- status:
- code: 200
- message: OK
-version: 1
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_authorize_without_capture.yaml b/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_authorize_without_capture.yaml
deleted file mode 100644
index b9b126d5df..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_authorize_without_capture.yaml
+++ /dev/null
@@ -1,124 +0,0 @@
-interactions:
-- request:
- body: payment_method=pm_card_pl&amount=4242&currency=usd&confirmation_method=manual&confirm=True&capture_method=manual
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- Content-Length:
- - '112'
- Content-Type:
- - application/x-www-form-urlencoded
- Idempotency-Key:
- - 9776ddc6-aff7-4265-aa0b-d1836d01f8d1
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-Telemetry:
- - '{"last_request_metrics": {"request_id": "req_KxLRnayybvlIeS", "request_duration_ms":
- 627}}'
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: POST
- uri: https://api.stripe.com/v1/payment_intents
- response:
- body:
- string: "{\n \"id\": \"pi_1F5BsRIUmJaD6Oqvz2XMKZCD\",\n \"object\": \"payment_intent\"\
- ,\n \"amount\": 4242,\n \"amount_capturable\": 4242,\n \"amount_received\"\
- : 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"\
- canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\"\
- : \"manual\",\n \"charges\": {\n \"object\": \"list\",\n \"data\":\
- \ [\n {\n \"id\": \"ch_1F5BsRIUmJaD6Oqvl2WF1xdU\",\n \"\
- object\": \"charge\",\n \"amount\": 4242,\n \"amount_refunded\"\
- : 0,\n \"application\": null,\n \"application_fee\": null,\n\
- \ \"application_fee_amount\": null,\n \"balance_transaction\"\
- : null,\n \"billing_details\": {\n \"address\": {\n \
- \ \"city\": null,\n \"country\": null,\n \"line1\"\
- : null,\n \"line2\": null,\n \"postal_code\": null,\n\
- \ \"state\": null\n },\n \"email\": null,\n \
- \ \"name\": null,\n \"phone\": null\n },\n \
- \ \"captured\": false,\n \"created\": 1565271719,\n \"currency\"\
- : \"usd\",\n \"customer\": null,\n \"description\": null,\n\
- \ \"destination\": null,\n \"dispute\": null,\n \"failure_code\"\
- : null,\n \"failure_message\": null,\n \"fraud_details\": {\n\
- \ },\n \"invoice\": null,\n \"livemode\": false,\n \
- \ \"metadata\": {\n },\n \"on_behalf_of\": null,\n \
- \ \"order\": null,\n \"outcome\": {\n \"network_status\"\
- : \"approved_by_network\",\n \"reason\": null,\n \"risk_level\"\
- : \"normal\",\n \"risk_score\": 10,\n \"seller_message\"\
- : \"Payment complete.\",\n \"type\": \"authorized\"\n },\n\
- \ \"paid\": true,\n \"payment_intent\": \"pi_1F5BsRIUmJaD6Oqvz2XMKZCD\"\
- ,\n \"payment_method\": \"pm_1F5BsQIUmJaD6OqvbB4aOcJX\",\n \"\
- payment_method_details\": {\n \"card\": {\n \"brand\"\
- : \"visa\",\n \"checks\": {\n \"address_line1_check\"\
- : null,\n \"address_postal_code_check\": null,\n \
- \ \"cvc_check\": null\n },\n \"country\": \"PL\",\n\
- \ \"exp_month\": 8,\n \"exp_year\": 2020,\n \
- \ \"fingerprint\": \"aleqpF0PMAATcfmb\",\n \"funding\": \"credit\"\
- ,\n \"last4\": \"0005\",\n \"three_d_secure\": null,\n\
- \ \"wallet\": null\n },\n \"type\": \"card\"\n\
- \ },\n \"receipt_email\": null,\n \"receipt_number\"\
- : null,\n \"receipt_url\": \"https://pay.stripe.com/receipts/acct_1EzlmjIUmJaD6Oqv/ch_1F5BsRIUmJaD6Oqvl2WF1xdU/rcpt_FaMbtUmGgcY6xnKYCxzQgjVlAwLno4y\"\
- ,\n \"refunded\": false,\n \"refunds\": {\n \"object\"\
- : \"list\",\n \"data\": [\n\n ],\n \"has_more\"\
- : false,\n \"total_count\": 0,\n \"url\": \"/v1/charges/ch_1F5BsRIUmJaD6Oqvl2WF1xdU/refunds\"\
- \n },\n \"review\": null,\n \"shipping\": null,\n \
- \ \"source\": null,\n \"source_transfer\": null,\n \"statement_descriptor\"\
- : null,\n \"statement_descriptor_suffix\": null,\n \"status\"\
- : \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\"\
- : null\n }\n ],\n \"has_more\": false,\n \"total_count\": 1,\n\
- \ \"url\": \"/v1/charges?payment_intent=pi_1F5BsRIUmJaD6Oqvz2XMKZCD\"\n\
- \ },\n \"client_secret\": \"pi_1F5BsRIUmJaD6Oqvz2XMKZCD_secret_FnZ8ApzrD4JVONWgCbLGbKAdI\"\
- ,\n \"confirmation_method\": \"manual\",\n \"created\": 1565271719,\n \"\
- currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"\
- invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n\
- \ \"metadata\": {\n },\n \"next_action\": null,\n \"on_behalf_of\": null,\n\
- \ \"payment_method\": \"pm_1F5BsQIUmJaD6OqvbB4aOcJX\",\n \"payment_method_options\"\
- : {\n \"card\": {\n \"request_three_d_secure\": \"automatic\"\n \
- \ }\n },\n \"payment_method_types\": [\n \"card\"\n ],\n \"receipt_email\"\
- : null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\"\
- : null,\n \"source\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\"\
- : null,\n \"status\": \"requires_capture\",\n \"transfer_data\": null,\n\
- \ \"transfer_group\": null\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '3975'
- Content-Type:
- - application/json
- Date:
- - Thu, 08 Aug 2019 13:41:59 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- idempotency-key:
- - 9776ddc6-aff7-4265-aa0b-d1836d01f8d1
- original-request:
- - req_z1CtFdtgNMk5eX
- request-id:
- - req_z1CtFdtgNMk5eX
- stripe-version:
- - '2019-05-16'
- status:
- code: 200
- message: OK
-version: 1
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_capture.yaml b/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_capture.yaml
deleted file mode 100644
index 0333fc7e93..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_capture.yaml
+++ /dev/null
@@ -1,236 +0,0 @@
-interactions:
-- request:
- body: null
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-Telemetry:
- - '{"last_request_metrics": {"request_id": "req_z1CtFdtgNMk5eX", "request_duration_ms":
- 4}}'
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: GET
- uri: https://api.stripe.com/v1/payment_intents/pi_1F5BsRIUmJaD6Oqvz2XMKZCD
- response:
- body:
- string: "{\n \"id\": \"pi_1F5BsRIUmJaD6Oqvz2XMKZCD\",\n \"object\": \"payment_intent\"\
- ,\n \"amount\": 4242,\n \"amount_capturable\": 4242,\n \"amount_received\"\
- : 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"\
- canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\"\
- : \"manual\",\n \"charges\": {\n \"object\": \"list\",\n \"data\":\
- \ [\n {\n \"id\": \"ch_1F5BsRIUmJaD6Oqvl2WF1xdU\",\n \"\
- object\": \"charge\",\n \"amount\": 4242,\n \"amount_refunded\"\
- : 0,\n \"application\": null,\n \"application_fee\": null,\n\
- \ \"application_fee_amount\": null,\n \"balance_transaction\"\
- : null,\n \"billing_details\": {\n \"address\": {\n \
- \ \"city\": null,\n \"country\": null,\n \"line1\"\
- : null,\n \"line2\": null,\n \"postal_code\": null,\n\
- \ \"state\": null\n },\n \"email\": null,\n \
- \ \"name\": null,\n \"phone\": null\n },\n \
- \ \"captured\": false,\n \"created\": 1565271719,\n \"currency\"\
- : \"usd\",\n \"customer\": null,\n \"description\": null,\n\
- \ \"destination\": null,\n \"dispute\": null,\n \"failure_code\"\
- : null,\n \"failure_message\": null,\n \"fraud_details\": {\n\
- \ },\n \"invoice\": null,\n \"livemode\": false,\n \
- \ \"metadata\": {\n },\n \"on_behalf_of\": null,\n \
- \ \"order\": null,\n \"outcome\": {\n \"network_status\"\
- : \"approved_by_network\",\n \"reason\": null,\n \"risk_level\"\
- : \"normal\",\n \"risk_score\": 10,\n \"seller_message\"\
- : \"Payment complete.\",\n \"type\": \"authorized\"\n },\n\
- \ \"paid\": true,\n \"payment_intent\": \"pi_1F5BsRIUmJaD6Oqvz2XMKZCD\"\
- ,\n \"payment_method\": \"pm_1F5BsQIUmJaD6OqvbB4aOcJX\",\n \"\
- payment_method_details\": {\n \"card\": {\n \"brand\"\
- : \"visa\",\n \"checks\": {\n \"address_line1_check\"\
- : null,\n \"address_postal_code_check\": null,\n \
- \ \"cvc_check\": null\n },\n \"country\": \"PL\",\n\
- \ \"exp_month\": 8,\n \"exp_year\": 2020,\n \
- \ \"fingerprint\": \"aleqpF0PMAATcfmb\",\n \"funding\": \"credit\"\
- ,\n \"last4\": \"0005\",\n \"three_d_secure\": null,\n\
- \ \"wallet\": null\n },\n \"type\": \"card\"\n\
- \ },\n \"receipt_email\": null,\n \"receipt_number\"\
- : null,\n \"receipt_url\": \"https://pay.stripe.com/receipts/acct_1EzlmjIUmJaD6Oqv/ch_1F5BsRIUmJaD6Oqvl2WF1xdU/rcpt_FaMbtUmGgcY6xnKYCxzQgjVlAwLno4y\"\
- ,\n \"refunded\": false,\n \"refunds\": {\n \"object\"\
- : \"list\",\n \"data\": [\n\n ],\n \"has_more\"\
- : false,\n \"total_count\": 0,\n \"url\": \"/v1/charges/ch_1F5BsRIUmJaD6Oqvl2WF1xdU/refunds\"\
- \n },\n \"review\": null,\n \"shipping\": null,\n \
- \ \"source\": null,\n \"source_transfer\": null,\n \"statement_descriptor\"\
- : null,\n \"statement_descriptor_suffix\": null,\n \"status\"\
- : \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\"\
- : null\n }\n ],\n \"has_more\": false,\n \"total_count\": 1,\n\
- \ \"url\": \"/v1/charges?payment_intent=pi_1F5BsRIUmJaD6Oqvz2XMKZCD\"\n\
- \ },\n \"client_secret\": \"pi_1F5BsRIUmJaD6Oqvz2XMKZCD_secret_FnZ8ApzrD4JVONWgCbLGbKAdI\"\
- ,\n \"confirmation_method\": \"manual\",\n \"created\": 1565271719,\n \"\
- currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"\
- invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n\
- \ \"metadata\": {\n },\n \"next_action\": null,\n \"on_behalf_of\": null,\n\
- \ \"payment_method\": \"pm_1F5BsQIUmJaD6OqvbB4aOcJX\",\n \"payment_method_options\"\
- : {\n \"card\": {\n \"request_three_d_secure\": \"automatic\"\n \
- \ }\n },\n \"payment_method_types\": [\n \"card\"\n ],\n \"receipt_email\"\
- : null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\"\
- : null,\n \"source\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\"\
- : null,\n \"status\": \"requires_capture\",\n \"transfer_data\": null,\n\
- \ \"transfer_group\": null\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '3975'
- Content-Type:
- - application/json
- Date:
- - Thu, 08 Aug 2019 14:57:08 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- request-id:
- - req_WNAnG8hOrgPLhg
- stripe-version:
- - '2019-05-16'
- status:
- code: 200
- message: OK
-- request:
- body: null
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- Content-Length:
- - '0'
- Content-Type:
- - application/x-www-form-urlencoded
- Idempotency-Key:
- - 0ae9d626-e952-4e89-821f-fda00f6b7f41
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-Telemetry:
- - '{"last_request_metrics": {"request_id": "req_WNAnG8hOrgPLhg", "request_duration_ms":
- 534}}'
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: POST
- uri: https://api.stripe.com/v1/payment_intents/pi_1F5BsRIUmJaD6Oqvz2XMKZCD/capture
- response:
- body:
- string: "{\n \"id\": \"pi_1F5BsRIUmJaD6Oqvz2XMKZCD\",\n \"object\": \"payment_intent\"\
- ,\n \"amount\": 4242,\n \"amount_capturable\": 0,\n \"amount_received\"\
- : 4242,\n \"application\": null,\n \"application_fee_amount\": null,\n \
- \ \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\"\
- : \"manual\",\n \"charges\": {\n \"object\": \"list\",\n \"data\":\
- \ [\n {\n \"id\": \"ch_1F5BsRIUmJaD6Oqvl2WF1xdU\",\n \"\
- object\": \"charge\",\n \"amount\": 4242,\n \"amount_refunded\"\
- : 0,\n \"application\": null,\n \"application_fee\": null,\n\
- \ \"application_fee_amount\": null,\n \"balance_transaction\"\
- : \"txn_1F5D3BIUmJaD6OqvpbNul1gK\",\n \"billing_details\": {\n \
- \ \"address\": {\n \"city\": null,\n \"country\"\
- : null,\n \"line1\": null,\n \"line2\": null,\n \
- \ \"postal_code\": null,\n \"state\": null\n },\n\
- \ \"email\": null,\n \"name\": null,\n \"phone\"\
- : null\n },\n \"captured\": true,\n \"created\": 1565271719,\n\
- \ \"currency\": \"usd\",\n \"customer\": null,\n \"description\"\
- : null,\n \"destination\": null,\n \"dispute\": null,\n \
- \ \"failure_code\": null,\n \"failure_message\": null,\n \
- \ \"fraud_details\": {\n },\n \"invoice\": null,\n \"\
- livemode\": false,\n \"metadata\": {\n },\n \"on_behalf_of\"\
- : null,\n \"order\": null,\n \"outcome\": {\n \"network_status\"\
- : \"approved_by_network\",\n \"reason\": null,\n \"risk_level\"\
- : \"normal\",\n \"risk_score\": 10,\n \"seller_message\"\
- : \"Payment complete.\",\n \"type\": \"authorized\"\n },\n\
- \ \"paid\": true,\n \"payment_intent\": \"pi_1F5BsRIUmJaD6Oqvz2XMKZCD\"\
- ,\n \"payment_method\": \"pm_1F5BsQIUmJaD6OqvbB4aOcJX\",\n \"\
- payment_method_details\": {\n \"card\": {\n \"brand\"\
- : \"visa\",\n \"checks\": {\n \"address_line1_check\"\
- : null,\n \"address_postal_code_check\": null,\n \
- \ \"cvc_check\": null\n },\n \"country\": \"PL\",\n\
- \ \"exp_month\": 8,\n \"exp_year\": 2020,\n \
- \ \"fingerprint\": \"aleqpF0PMAATcfmb\",\n \"funding\": \"credit\"\
- ,\n \"last4\": \"0005\",\n \"three_d_secure\": null,\n\
- \ \"wallet\": null\n },\n \"type\": \"card\"\n\
- \ },\n \"receipt_email\": null,\n \"receipt_number\"\
- : null,\n \"receipt_url\": \"https://pay.stripe.com/receipts/acct_1EzlmjIUmJaD6Oqv/ch_1F5BsRIUmJaD6Oqvl2WF1xdU/rcpt_FaMbtUmGgcY6xnKYCxzQgjVlAwLno4y\"\
- ,\n \"refunded\": false,\n \"refunds\": {\n \"object\"\
- : \"list\",\n \"data\": [\n\n ],\n \"has_more\"\
- : false,\n \"total_count\": 0,\n \"url\": \"/v1/charges/ch_1F5BsRIUmJaD6Oqvl2WF1xdU/refunds\"\
- \n },\n \"review\": null,\n \"shipping\": null,\n \
- \ \"source\": null,\n \"source_transfer\": null,\n \"statement_descriptor\"\
- : null,\n \"statement_descriptor_suffix\": null,\n \"status\"\
- : \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\"\
- : null\n }\n ],\n \"has_more\": false,\n \"total_count\": 1,\n\
- \ \"url\": \"/v1/charges?payment_intent=pi_1F5BsRIUmJaD6Oqvz2XMKZCD\"\n\
- \ },\n \"client_secret\": \"pi_1F5BsRIUmJaD6Oqvz2XMKZCD_secret_FnZ8ApzrD4JVONWgCbLGbKAdI\"\
- ,\n \"confirmation_method\": \"manual\",\n \"created\": 1565271719,\n \"\
- currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"\
- invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n\
- \ \"metadata\": {\n },\n \"next_action\": null,\n \"on_behalf_of\": null,\n\
- \ \"payment_method\": \"pm_1F5BsQIUmJaD6OqvbB4aOcJX\",\n \"payment_method_options\"\
- : {\n \"card\": {\n \"request_three_d_secure\": \"automatic\"\n \
- \ }\n },\n \"payment_method_types\": [\n \"card\"\n ],\n \"receipt_email\"\
- : null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\"\
- : null,\n \"source\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\"\
- : null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\"\
- : null\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '3993'
- Content-Type:
- - application/json
- Date:
- - Thu, 08 Aug 2019 14:57:09 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- idempotency-key:
- - 0ae9d626-e952-4e89-821f-fda00f6b7f41
- original-request:
- - req_SlIBaeBHbOzc6l
- request-id:
- - req_SlIBaeBHbOzc6l
- stripe-version:
- - '2019-05-16'
- status:
- code: 200
- message: OK
-version: 1
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_capture_3d_secure.yaml b/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_capture_3d_secure.yaml
deleted file mode 100644
index 5cc64f4da5..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_capture_3d_secure.yaml
+++ /dev/null
@@ -1,583 +0,0 @@
-interactions:
-- request:
- body: null
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-Telemetry:
- - '{"last_request_metrics": {"request_id": "req_SlIBaeBHbOzc6l", "request_duration_ms":
- 4}}'
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: GET
- uri: https://api.stripe.com/v1/payment_intents/pm_card_threeDSecure2Required
- response:
- body:
- string: "{\n \"error\": {\n \"code\": \"resource_missing\",\n \"doc_url\"\
- : \"https://stripe.com/docs/error-codes/resource-missing\",\n \"message\"\
- : \"No such payment_intent: pm_card_threeDSecure2Required\",\n \"param\"\
- : \"intent\",\n \"type\": \"invalid_request_error\"\n }\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '255'
- Content-Type:
- - application/json
- Date:
- - Mon, 12 Aug 2019 08:08:53 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- request-id:
- - req_Cl6yE27ywyI3ic
- stripe-version:
- - '2019-05-16'
- status:
- code: 404
- message: Not Found
-- request:
- body: null
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: GET
- uri: https://api.stripe.com/v1/payment_intents/pm_card_threeDSecure2Required
- response:
- body:
- string: "{\n \"error\": {\n \"code\": \"resource_missing\",\n \"doc_url\"\
- : \"https://stripe.com/docs/error-codes/resource-missing\",\n \"message\"\
- : \"No such payment_intent: pm_card_threeDSecure2Required\",\n \"param\"\
- : \"intent\",\n \"type\": \"invalid_request_error\"\n }\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '255'
- Content-Type:
- - application/json
- Date:
- - Mon, 12 Aug 2019 08:23:32 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- request-id:
- - req_hCmg0yerx8jBRP
- stripe-version:
- - '2019-05-16'
- status:
- code: 404
- message: Not Found
-- request:
- body: null
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: GET
- uri: https://api.stripe.com/v1/payment_intents/pi_1F6YmgIUmJaD6Oqv77HUh6qq
- response:
- body:
- string: "{\n \"id\": \"pi_1F6YmgIUmJaD6Oqv77HUh6qq\",\n \"object\": \"payment_intent\"\
- ,\n \"amount\": 4242,\n \"amount_capturable\": 0,\n \"amount_received\"\
- : 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"\
- canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\"\
- : \"automatic\",\n \"charges\": {\n \"object\": \"list\",\n \"data\"\
- : [\n\n ],\n \"has_more\": false,\n \"total_count\": 0,\n \"url\"\
- : \"/v1/charges?payment_intent=pi_1F6YmgIUmJaD6Oqv77HUh6qq\"\n },\n \"client_secret\"\
- : \"pi_1F6YmgIUmJaD6Oqv77HUh6qq_secret_bMSADceQXpXF9OxcQSCg3VFWy\",\n \"\
- confirmation_method\": \"manual\",\n \"created\": 1565598102,\n \"currency\"\
- : \"usd\",\n \"customer\": null,\n \"description\": null,\n \"invoice\"\
- : null,\n \"last_payment_error\": null,\n \"livemode\": false,\n \"metadata\"\
- : {\n },\n \"next_action\": {\n \"type\": \"use_stripe_sdk\",\n \"\
- use_stripe_sdk\": {\n \"type\": \"stripe_3ds2_fingerprint\",\n \"\
- three_d_secure_2_source\": \"src_1F6YmgIUmJaD6OqveLcx2w0n\",\n \"directory_server_name\"\
- : \"visa\",\n \"server_transaction_id\": \"b25f81ed-c6f1-4667-9a0d-395096ffe51a\"\
- ,\n \"three_ds_method_url\": \"\",\n \"three_ds_optimizations\"\
- : \"\",\n \"directory_server_encryption\": {\n \"directory_server_id\"\
- : \"A000000003\",\n \"algorithm\": \"RSA\",\n \"certificate\"\
- : \"-----BEGIN CERTIFICATE-----\\nMIIFrjCCBJagAwIBAgIQB2rJmsHVwbONd36WP9QPrTANBgkqhki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htcbP3\\nLBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pzzkWKsKZJ/0x9nXGIxHYdkFsd\\\
- n7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBuYQa7FkKMcPcw\\n++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt\\\
- n398znM/jra6O1I7mT1GvFpLgXPYHDw==\\n-----END CERTIFICATE-----\\n\"\n \
- \ ]\n }\n }\n },\n \"on_behalf_of\": null,\n \"payment_method\"\
- : \"pm_1F6YmgIUmJaD6Oqvca9az7XD\",\n \"payment_method_options\": {\n \"\
- card\": {\n \"request_three_d_secure\": \"automatic\"\n }\n },\n\
- \ \"payment_method_types\": [\n \"card\"\n ],\n \"receipt_email\": null,\n\
- \ \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n\
- \ \"source\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\"\
- : null,\n \"status\": \"requires_action\",\n \"transfer_data\": null,\n\
- \ \"transfer_group\": null\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '5228'
- Content-Type:
- - application/json
- Date:
- - Mon, 12 Aug 2019 08:25:16 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- request-id:
- - req_yGWcSIBxhMMB7Y
- stripe-version:
- - '2019-05-16'
- status:
- code: 200
- message: OK
-- request:
- body: null
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- Content-Length:
- - '0'
- Content-Type:
- - application/x-www-form-urlencoded
- Idempotency-Key:
- - f15f458b-3d84-4811-b245-149ca3b47c2b
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-Telemetry:
- - '{"last_request_metrics": {"request_id": "req_yGWcSIBxhMMB7Y", "request_duration_ms":
- 578}}'
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: POST
- uri: https://api.stripe.com/v1/payment_intents/pi_1F6YmgIUmJaD6Oqv77HUh6qq/capture
- response:
- body:
- string: "{\n \"error\": {\n \"code\": \"payment_intent_unexpected_state\"\
- ,\n \"doc_url\": \"https://stripe.com/docs/error-codes/payment-intent-unexpected-state\"\
- ,\n \"message\": \"This PaymentIntent could not be captured because it\
- \ has a status of requires_action. Only a PaymentIntent with one of the following\
- \ statuses may be captured: requires_capture.\",\n \"payment_intent\":\
- \ {\n \"id\": \"pi_1F6YmgIUmJaD6Oqv77HUh6qq\",\n \"object\": \"\
- payment_intent\",\n \"amount\": 4242,\n \"amount_capturable\": 0,\n\
- \ \"amount_received\": 0,\n \"application\": null,\n \"application_fee_amount\"\
- : null,\n \"canceled_at\": null,\n \"cancellation_reason\": null,\n\
- \ \"capture_method\": \"automatic\",\n \"charges\": {\n \"\
- object\": \"list\",\n \"data\": [\n\n ],\n \"has_more\"\
- : false,\n \"total_count\": 0,\n \"url\": \"/v1/charges?payment_intent=pi_1F6YmgIUmJaD6Oqv77HUh6qq\"\
- \n },\n \"client_secret\": \"pi_1F6YmgIUmJaD6Oqv77HUh6qq_secret_bMSADceQXpXF9OxcQSCg3VFWy\"\
- ,\n \"confirmation_method\": \"manual\",\n \"created\": 1565598102,\n\
- \ \"currency\": \"usd\",\n \"customer\": null,\n \"description\"\
- : null,\n \"invoice\": null,\n \"last_payment_error\": null,\n \
- \ \"livemode\": false,\n \"metadata\": {\n },\n \"next_action\"\
- : {\n \"type\": \"use_stripe_sdk\",\n \"use_stripe_sdk\": {\n\
- \ \"type\": \"stripe_3ds2_fingerprint\",\n \"three_d_secure_2_source\"\
- : \"src_1F6YmgIUmJaD6OqveLcx2w0n\",\n \"directory_server_name\":\
- \ \"visa\",\n \"server_transaction_id\": \"b25f81ed-c6f1-4667-9a0d-395096ffe51a\"\
- ,\n \"three_ds_method_url\": \"\",\n \"three_ds_optimizations\"\
- : \"\",\n \"directory_server_encryption\": {\n \"directory_server_id\"\
- : \"A000000003\",\n \"algorithm\": \"RSA\",\n \"certificate\"\
- : \"-----BEGIN CERTIFICATE-----\\nMIIFrjCCBJagAwIBAgIQB2rJmsHVwbONd36WP9QPrTANBgkqhkiG9w0BAQsFADBx\\\
- nMQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRl\\ncm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xIjAgBgNVBAMTGVZpc2EgZUNv\\\
- nbW1lcmNlIElzc3VpbmcgQ0EwHhcNMTcxMTAyMjIyMzEwWhcNMjAxMTAzMDAyMzEw\\nWjCBoTEYMBYGA1UEBxMPSGlnaGxhbmRzIFJhbmNoMREwDwYDVQQIEwhDb2xvcmFk\\\
- nbzELMAkGA1UEBhMCVVMxDTALBgNVBAoTBFZJU0ExLzAtBgNVBAsTJlZpc2EgSW50\\nZXJuYXRpb25hbCBTZXJ2aWNlIEFzc29jaWF0aW9uMSUwIwYDVQQDExwzZHMyLnJz\\\
- nYS5lbmNyeXB0aW9uLnZpc2EuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\\nCgKCAQEAst+HGfPPsX3p6HHEQ9YzourlQj16Nscmm13Cp7cZe4dZB2oWnJqZ7oh/\\\
- npEoEoOAxBw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VlwdV\\\
- nZqW1LS7YgFmypw23RuwhY/81q6UCzyr0TP579ZRdhE2o8mCP2w4lPJ9zcc+U30rq\\n299yOIzzlr3xF7zSujtFWsan9sYXiwGd/BmoKoMWuDpI/k4+oKsGGelT84ATB+0t\\\
- nvz8KPFUgOSwsAGl0lUq8ILKpeeUYiZGo3BxN77t+Nwtd/jmliFKMAGzsGHxBvfaL\\ndXe6YJ2E5/4tAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQD\\\
- nAgEGMB0GA1UdDgQWBBQVOIMPPyw/cDMezUb+B4wg4NfDtzANBgkqhkiG9w0BAQUF\\nAAOCAQEAX/FBfXxcCLkr4NWSR/pnXKUTwwMhmytMiUbPWU3J/qVAtmPN3XEolWcR\\\
- nzCSs00Rsca4BIGsDoo8Ytyk6feUWYFN4PMCvFYP3j1IzJL1kk5fui/fbGKhtcbP3\\nLBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pzzkWKsKZJ/0x9nXGIxHYdkFsd\\\
- n7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBuYQa7FkKMcPcw\\n++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt\\\
- n398znM/jra6O1I7mT1GvFpLgXPYHDw==\\n-----END CERTIFICATE-----\\n\"\n \
- \ ]\n }\n }\n },\n \"on_behalf_of\": null,\n\
- \ \"payment_method\": \"pm_1F6YmgIUmJaD6Oqvca9az7XD\",\n \"payment_method_options\"\
- : {\n \"card\": {\n \"request_three_d_secure\": \"automatic\"\
- \n }\n },\n \"payment_method_types\": [\n \"card\"\
- \n ],\n \"receipt_email\": null,\n \"review\": null,\n \
- \ \"setup_future_usage\": null,\n \"shipping\": null,\n \"source\"\
- : null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\"\
- : null,\n \"status\": \"requires_action\",\n \"transfer_data\":\
- \ null,\n \"transfer_group\": null\n },\n \"type\": \"invalid_request_error\"\
- \n }\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '5911'
- Content-Type:
- - application/json
- Date:
- - Mon, 12 Aug 2019 08:25:17 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- idempotency-key:
- - f15f458b-3d84-4811-b245-149ca3b47c2b
- original-request:
- - req_hnbGZ8bfUZTAuR
- request-id:
- - req_hnbGZ8bfUZTAuR
- stripe-version:
- - '2019-05-16'
- status:
- code: 400
- message: Bad Request
-- request:
- body: null
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: GET
- uri: https://api.stripe.com/v1/payment_intents/pi_1F6YmgIUmJaD6Oqv77HUh6qq
- response:
- body:
- string: "{\n \"id\": \"pi_1F6YmgIUmJaD6Oqv77HUh6qq\",\n \"object\": \"payment_intent\"\
- ,\n \"amount\": 4242,\n \"amount_capturable\": 0,\n \"amount_received\"\
- : 0,\n \"application\": null,\n \"application_fee_amount\": null,\n \"\
- canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\"\
- : \"automatic\",\n \"charges\": {\n \"object\": \"list\",\n \"data\"\
- : [\n\n ],\n \"has_more\": false,\n \"total_count\": 0,\n \"url\"\
- : \"/v1/charges?payment_intent=pi_1F6YmgIUmJaD6Oqv77HUh6qq\"\n },\n \"client_secret\"\
- : \"pi_1F6YmgIUmJaD6Oqv77HUh6qq_secret_bMSADceQXpXF9OxcQSCg3VFWy\",\n \"\
- confirmation_method\": \"manual\",\n \"created\": 1565598102,\n \"currency\"\
- : \"usd\",\n \"customer\": null,\n \"description\": null,\n \"invoice\"\
- : null,\n \"last_payment_error\": null,\n \"livemode\": false,\n \"metadata\"\
- : {\n },\n \"next_action\": {\n \"type\": \"use_stripe_sdk\",\n \"\
- use_stripe_sdk\": {\n \"type\": \"stripe_3ds2_fingerprint\",\n \"\
- three_d_secure_2_source\": \"src_1F6YmgIUmJaD6OqveLcx2w0n\",\n \"directory_server_name\"\
- : \"visa\",\n \"server_transaction_id\": \"b25f81ed-c6f1-4667-9a0d-395096ffe51a\"\
- ,\n \"three_ds_method_url\": \"\",\n \"three_ds_optimizations\"\
- : \"\",\n \"directory_server_encryption\": {\n \"directory_server_id\"\
- : \"A000000003\",\n \"algorithm\": \"RSA\",\n \"certificate\"\
- : \"-----BEGIN CERTIFICATE-----\\nMIIFrjCCBJagAwIBAgIQB2rJmsHVwbONd36WP9QPrTANBgkqhkiG9w0BAQsFADBx\\\
- nMQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRl\\ncm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xIjAgBgNVBAMTGVZpc2EgZUNv\\\
- nbW1lcmNlIElzc3VpbmcgQ0EwHhcNMTcxMTAyMjIyMzEwWhcNMjAxMTAzMDAyMzEw\\nWjCBoTEYMBYGA1UEBxMPSGlnaGxhbmRzIFJhbmNoMREwDwYDVQQIEwhDb2xvcmFk\\\
- nbzELMAkGA1UEBhMCVVMxDTALBgNVBAoTBFZJU0ExLzAtBgNVBAsTJlZp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options\": {\n \"\
- card\": {\n \"request_three_d_secure\": \"automatic\"\n }\n },\n\
- \ \"payment_method_types\": [\n \"card\"\n ],\n \"receipt_email\": null,\n\
- \ \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\": null,\n\
- \ \"source\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\"\
- : null,\n \"status\": \"requires_action\",\n \"transfer_data\": null,\n\
- \ \"transfer_group\": null\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '5228'
- Content-Type:
- - application/json
- Date:
- - Mon, 12 Aug 2019 08:27:28 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- request-id:
- - req_c7qIdXAnmdlkOF
- stripe-version:
- - '2019-05-16'
- status:
- code: 200
- message: OK
-- request:
- body: null
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- Content-Length:
- - '0'
- Content-Type:
- - application/x-www-form-urlencoded
- Idempotency-Key:
- - fe4d3f71-b892-4df4-bc1f-15bb55e892ad
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-Telemetry:
- - '{"last_request_metrics": {"request_id": "req_c7qIdXAnmdlkOF", "request_duration_ms":
- 674}}'
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: POST
- uri: https://api.stripe.com/v1/payment_intents/pi_1F6YmgIUmJaD6Oqv77HUh6qq/capture
- response:
- body:
- string: "{\n \"error\": {\n \"code\": \"payment_intent_unexpected_state\"\
- ,\n \"doc_url\": \"https://stripe.com/docs/error-codes/payment-intent-unexpected-state\"\
- ,\n \"message\": \"This PaymentIntent could not be captured because it\
- \ has a status of requires_action. Only a PaymentIntent with one of the following\
- \ statuses may be captured: requires_capture.\",\n \"payment_intent\":\
- \ {\n \"id\": \"pi_1F6YmgIUmJaD6Oqv77HUh6qq\",\n \"object\": \"\
- payment_intent\",\n \"amount\": 4242,\n \"amount_capturable\": 0,\n\
- \ \"amount_received\": 0,\n \"application\": null,\n \"application_fee_amount\"\
- : null,\n \"canceled_at\": null,\n \"cancellation_reason\": null,\n\
- \ \"capture_method\": \"automatic\",\n \"charges\": {\n \"\
- object\": \"list\",\n \"data\": [\n\n ],\n \"has_more\"\
- : false,\n \"total_count\": 0,\n \"url\": \"/v1/charges?payment_intent=pi_1F6YmgIUmJaD6Oqv77HUh6qq\"\
- \n },\n \"client_secret\": \"pi_1F6YmgIUmJaD6Oqv77HUh6qq_secret_bMSADceQXpXF9OxcQSCg3VFWy\"\
- ,\n \"confirmation_method\": \"manual\",\n \"created\": 1565598102,\n\
- \ \"currency\": \"usd\",\n \"customer\": null,\n \"description\"\
- : null,\n \"invoice\": null,\n \"last_payment_error\": null,\n \
- \ \"livemode\": false,\n \"metadata\": {\n },\n \"next_action\"\
- : {\n \"type\": \"use_stripe_sdk\",\n \"use_stripe_sdk\": {\n\
- \ \"type\": \"stripe_3ds2_fingerprint\",\n \"three_d_secure_2_source\"\
- : \"src_1F6YmgIUmJaD6OqveLcx2w0n\",\n \"directory_server_name\":\
- \ \"visa\",\n \"server_transaction_id\": \"b25f81ed-c6f1-4667-9a0d-395096ffe51a\"\
- ,\n \"three_ds_method_url\": \"\",\n \"three_ds_optimizations\"\
- : \"\",\n \"directory_server_encryption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\nAAOCAQEAX/FBfXxcCLkr4NWSR/pnXKUTwwMhmytMiUbPWU3J/qVAtmPN3XEolWcR\\\
- nzCSs00Rsca4BIGsDoo8Ytyk6feUWYFN4PMCvFYP3j1IzJL1kk5fui/fbGKhtcbP3\\nLBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pzzkWKsKZJ/0x9nXGIxHYdkFsd\\\
- n7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBuYQa7FkKMcPcw\\n++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt\\\
- n398znM/jra6O1I7mT1GvFpLgXPYHDw==\\n-----END CERTIFICATE-----\\n\"\n \
- \ ]\n }\n }\n },\n \"on_behalf_of\": null,\n\
- \ \"payment_method\": \"pm_1F6YmgIUmJaD6Oqvca9az7XD\",\n \"payment_method_options\"\
- : {\n \"card\": {\n \"request_three_d_secure\": \"automatic\"\
- \n }\n },\n \"payment_method_types\": [\n \"card\"\
- \n ],\n \"receipt_email\": null,\n \"review\": null,\n \
- \ \"setup_future_usage\": null,\n \"shipping\": null,\n \"source\"\
- : null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\"\
- : null,\n \"status\": \"requires_action\",\n \"transfer_data\":\
- \ null,\n \"transfer_group\": null\n },\n \"type\": \"invalid_request_error\"\
- \n }\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '5911'
- Content-Type:
- - application/json
- Date:
- - Mon, 12 Aug 2019 08:27:29 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- idempotency-key:
- - fe4d3f71-b892-4df4-bc1f-15bb55e892ad
- original-request:
- - req_Mz0EtQrcPI5n32
- request-id:
- - req_Mz0EtQrcPI5n32
- stripe-version:
- - '2019-05-16'
- status:
- code: 400
- message: Bad Request
-version: 1
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_capture_error_response.yaml b/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_capture_error_response.yaml
deleted file mode 100644
index 829442554d..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_capture_error_response.yaml
+++ /dev/null
@@ -1,61 +0,0 @@
-interactions:
-- request:
- body: null
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-Telemetry:
- - '{"last_request_metrics": {"request_id": "req_SlIBaeBHbOzc6l", "request_duration_ms":
- 9}}'
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: GET
- uri: https://api.stripe.com/v1/payment_intents/THIS_INTENT_DOES_NOT_EXISTS
- response:
- body:
- string: "{\n \"error\": {\n \"code\": \"resource_missing\",\n \"doc_url\"\
- : \"https://stripe.com/docs/error-codes/resource-missing\",\n \"message\"\
- : \"No such payment_intent: THIS_INTENT_DOES_NOT_EXISTS\",\n \"param\"\
- : \"intent\",\n \"type\": \"invalid_request_error\"\n }\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '253'
- Content-Type:
- - application/json
- Date:
- - Thu, 08 Aug 2019 15:05:56 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- request-id:
- - req_J74zANRVs5Kp3I
- stripe-version:
- - '2019-05-16'
- status:
- code: 404
- message: Not Found
-version: 1
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_confirm__intent.yaml b/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_confirm__intent.yaml
deleted file mode 100644
index fd6c36a640..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_confirm__intent.yaml
+++ /dev/null
@@ -1,124 +0,0 @@
-interactions:
-- request:
- body: null
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- Content-Length:
- - '0'
- Content-Type:
- - application/x-www-form-urlencoded
- Idempotency-Key:
- - 90e66f61-6641-4975-8039-c185eb6befcd
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-Telemetry:
- - '{"last_request_metrics": {"request_id": "req_fpe1Lbawiulevi", "request_duration_ms":
- 6}}'
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: POST
- uri: https://api.stripe.com/v1/payment_intents/pi_1F6bslIUmJaD6Oqv1MNDaBSv/confirm
- response:
- body:
- string: "{\n \"id\": \"pi_1F6bslIUmJaD6Oqv1MNDaBSv\",\n \"object\": \"payment_intent\"\
- ,\n \"amount\": 4500,\n \"amount_capturable\": 0,\n \"amount_received\"\
- : 4500,\n \"application\": null,\n \"application_fee_amount\": null,\n \
- \ \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\"\
- : \"automatic\",\n \"charges\": {\n \"object\": \"list\",\n \"data\"\
- : [\n {\n \"id\": \"ch_1F6cKFIUmJaD6Oqvlj3NIJXD\",\n \"\
- object\": \"charge\",\n \"amount\": 4500,\n \"amount_refunded\"\
- : 0,\n \"application\": null,\n \"application_fee\": null,\n\
- \ \"application_fee_amount\": null,\n \"balance_transaction\"\
- : \"txn_1F6cKGIUmJaD6OqvUWnb5Kn4\",\n \"billing_details\": {\n \
- \ \"address\": {\n \"city\": null,\n \"country\"\
- : null,\n \"line1\": null,\n \"line2\": null,\n \
- \ \"postal_code\": null,\n \"state\": null\n },\n\
- \ \"email\": null,\n \"name\": null,\n \"phone\"\
- : null\n },\n \"captured\": true,\n \"created\": 1565611715,\n\
- \ \"currency\": \"usd\",\n \"customer\": null,\n \"description\"\
- : null,\n \"destination\": null,\n \"dispute\": null,\n \
- \ \"failure_code\": null,\n \"failure_message\": null,\n \
- \ \"fraud_details\": {\n },\n \"invoice\": null,\n \"\
- livemode\": false,\n \"metadata\": {\n },\n \"on_behalf_of\"\
- : null,\n \"order\": null,\n \"outcome\": {\n \"network_status\"\
- : \"approved_by_network\",\n \"reason\": null,\n \"risk_level\"\
- : \"normal\",\n \"risk_score\": 57,\n \"seller_message\"\
- : \"Payment complete.\",\n \"type\": \"authorized\"\n },\n\
- \ \"paid\": true,\n \"payment_intent\": \"pi_1F6bslIUmJaD6Oqv1MNDaBSv\"\
- ,\n \"payment_method\": \"pm_1F6bslIUmJaD6OqvcjuBzexd\",\n \"\
- payment_method_details\": {\n \"card\": {\n \"brand\"\
- : \"visa\",\n \"checks\": {\n \"address_line1_check\"\
- : null,\n \"address_postal_code_check\": null,\n \
- \ \"cvc_check\": null\n },\n \"country\": \"US\",\n\
- \ \"exp_month\": 8,\n \"exp_year\": 2020,\n \
- \ \"fingerprint\": \"TtkCcsbSxUHACPLM\",\n \"funding\": \"credit\"\
- ,\n \"last4\": \"4242\",\n \"three_d_secure\": null,\n\
- \ \"wallet\": null\n },\n \"type\": \"card\"\n\
- \ },\n \"receipt_email\": null,\n \"receipt_number\"\
- : null,\n \"receipt_url\": \"https://pay.stripe.com/receipts/acct_1EzlmjIUmJaD6Oqv/ch_1F6cKFIUmJaD6Oqvlj3NIJXD/rcpt_Fbq097y9S9bnd5cHgH6oa87TlAT0ta6\"\
- ,\n \"refunded\": false,\n \"refunds\": {\n \"object\"\
- : \"list\",\n \"data\": [\n\n ],\n \"has_more\"\
- : false,\n \"total_count\": 0,\n \"url\": \"/v1/charges/ch_1F6cKFIUmJaD6Oqvlj3NIJXD/refunds\"\
- \n },\n \"review\": null,\n \"shipping\": null,\n \
- \ \"source\": null,\n \"source_transfer\": null,\n \"statement_descriptor\"\
- : null,\n \"statement_descriptor_suffix\": null,\n \"status\"\
- : \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\"\
- : null\n }\n ],\n \"has_more\": false,\n \"total_count\": 1,\n\
- \ \"url\": \"/v1/charges?payment_intent=pi_1F6bslIUmJaD6Oqv1MNDaBSv\"\n\
- \ },\n \"client_secret\": \"pi_1F6bslIUmJaD6Oqv1MNDaBSv_secret_vQUIoOL8zbTh0ZVXEdzKwnU7O\"\
- ,\n \"confirmation_method\": \"automatic\",\n \"created\": 1565610011,\n\
- \ \"currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n\
- \ \"invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n\
- \ \"metadata\": {\n },\n \"next_action\": null,\n \"on_behalf_of\": null,\n\
- \ \"payment_method\": \"pm_1F6bslIUmJaD6OqvcjuBzexd\",\n \"payment_method_options\"\
- : {\n \"card\": {\n \"request_three_d_secure\": \"automatic\"\n \
- \ }\n },\n \"payment_method_types\": [\n \"card\"\n ],\n \"receipt_email\"\
- : null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\"\
- : null,\n \"source\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\"\
- : null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\"\
- : null\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '3999'
- Content-Type:
- - application/json
- Date:
- - Mon, 12 Aug 2019 12:08:36 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- idempotency-key:
- - 90e66f61-6641-4975-8039-c185eb6befcd
- original-request:
- - req_sAaLx3X78HhJGo
- request-id:
- - req_sAaLx3X78HhJGo
- stripe-version:
- - '2019-05-16'
- status:
- code: 200
- message: OK
-version: 1
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_confirm_error_response.yaml b/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_confirm_error_response.yaml
deleted file mode 100644
index aef82cea16..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_confirm_error_response.yaml
+++ /dev/null
@@ -1,68 +0,0 @@
-interactions:
-- request:
- body: null
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- Content-Length:
- - '0'
- Content-Type:
- - application/x-www-form-urlencoded
- Idempotency-Key:
- - 65ce06a3-1e17-4495-a81d-5206e03546a1
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: POST
- uri: https://api.stripe.com/v1/payment_intents/THIS_INTENT_DOES_NOT_EXISTS/confirm
- response:
- body:
- string: "{\n \"error\": {\n \"code\": \"resource_missing\",\n \"doc_url\"\
- : \"https://stripe.com/docs/error-codes/resource-missing\",\n \"message\"\
- : \"No such payment_intent: THIS_INTENT_DOES_NOT_EXISTS\",\n \"param\"\
- : \"intent\",\n \"type\": \"invalid_request_error\"\n }\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '253'
- Content-Type:
- - application/json
- Date:
- - Mon, 12 Aug 2019 12:42:33 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- idempotency-key:
- - 65ce06a3-1e17-4495-a81d-5206e03546a1
- original-request:
- - req_RnWTTJZjPLfv56
- request-id:
- - req_RnWTTJZjPLfv56
- stripe-version:
- - '2019-05-16'
- status:
- code: 404
- message: Not Found
-version: 1
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_list_customer_sources.yaml b/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_list_customer_sources.yaml
deleted file mode 100644
index f2b834943b..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_list_customer_sources.yaml
+++ /dev/null
@@ -1,71 +0,0 @@
-interactions:
-- request:
- body: null
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: GET
- uri: https://api.stripe.com/v1/payment_methods?customer=cus_FbquUfgBnLdlsY&type=card
- response:
- body:
- string: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"\
- pm_1F6dCWIUmJaD6OqvCtcAnPSq\",\n \"object\": \"payment_method\",\n \
- \ \"billing_details\": {\n \"address\": {\n \"city\": null,\n\
- \ \"country\": null,\n \"line1\": null,\n \"line2\"\
- : null,\n \"postal_code\": null,\n \"state\": null\n \
- \ },\n \"email\": null,\n \"name\": null,\n \"phone\"\
- : null\n },\n \"card\": {\n \"brand\": \"visa\",\n \
- \ \"checks\": {\n \"address_line1_check\": null,\n \"address_postal_code_check\"\
- : null,\n \"cvc_check\": null\n },\n \"country\": \"\
- PL\",\n \"exp_month\": 8,\n \"exp_year\": 2020,\n \"\
- fingerprint\": \"aleqpF0PMAATcfmb\",\n \"funding\": \"credit\",\n \
- \ \"generated_from\": null,\n \"last4\": \"0005\",\n \"\
- three_d_secure_usage\": {\n \"supported\": true\n },\n \
- \ \"wallet\": null\n },\n \"created\": 1565615081,\n \"\
- customer\": \"cus_FbquUfgBnLdlsY\",\n \"livemode\": false,\n \"\
- metadata\": {\n },\n \"type\": \"card\"\n }\n ],\n \"has_more\"\
- : false,\n \"url\": \"/v1/payment_methods\"\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '1110'
- Content-Type:
- - application/json
- Date:
- - Tue, 13 Aug 2019 07:31:00 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- request-id:
- - req_yh7op4y5fX8eF2
- stripe-version:
- - '2019-05-16'
- status:
- code: 200
- message: OK
-version: 1
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_refund.yaml b/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_refund.yaml
deleted file mode 100644
index 2b55a2667f..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_refund.yaml
+++ /dev/null
@@ -1,218 +0,0 @@
-interactions:
-- request:
- body: null
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-Telemetry:
- - '{"last_request_metrics": {"request_id": "req_J74zANRVs5Kp3I", "request_duration_ms":
- 5}}'
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: GET
- uri: https://api.stripe.com/v1/payment_intents/pi_1F5BsRIUmJaD6Oqvz2XMKZCD
- response:
- body:
- string: "{\n \"id\": \"pi_1F5BsRIUmJaD6Oqvz2XMKZCD\",\n \"object\": \"payment_intent\"\
- ,\n \"amount\": 4242,\n \"amount_capturable\": 0,\n \"amount_received\"\
- : 4242,\n \"application\": null,\n \"application_fee_amount\": null,\n \
- \ \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\"\
- : \"manual\",\n \"charges\": {\n \"object\": \"list\",\n \"data\":\
- \ [\n {\n \"id\": \"ch_1F5BsRIUmJaD6Oqvl2WF1xdU\",\n \"\
- object\": \"charge\",\n \"amount\": 4242,\n \"amount_refunded\"\
- : 0,\n \"application\": null,\n \"application_fee\": null,\n\
- \ \"application_fee_amount\": null,\n \"balance_transaction\"\
- : \"txn_1F5D3BIUmJaD6OqvpbNul1gK\",\n \"billing_details\": {\n \
- \ \"address\": {\n \"city\": null,\n \"country\"\
- : null,\n \"line1\": null,\n \"line2\": null,\n \
- \ \"postal_code\": null,\n \"state\": null\n },\n\
- \ \"email\": null,\n \"name\": null,\n \"phone\"\
- : null\n },\n \"captured\": true,\n \"created\": 1565271719,\n\
- \ \"currency\": \"usd\",\n \"customer\": null,\n \"description\"\
- : null,\n \"destination\": null,\n \"dispute\": null,\n \
- \ \"failure_code\": null,\n \"failure_message\": null,\n \
- \ \"fraud_details\": {\n },\n \"invoice\": null,\n \"\
- livemode\": false,\n \"metadata\": {\n },\n \"on_behalf_of\"\
- : null,\n \"order\": null,\n \"outcome\": {\n \"network_status\"\
- : \"approved_by_network\",\n \"reason\": null,\n \"risk_level\"\
- : \"normal\",\n \"risk_score\": 10,\n \"seller_message\"\
- : \"Payment complete.\",\n \"type\": \"authorized\"\n },\n\
- \ \"paid\": true,\n \"payment_intent\": \"pi_1F5BsRIUmJaD6Oqvz2XMKZCD\"\
- ,\n \"payment_method\": \"pm_1F5BsQIUmJaD6OqvbB4aOcJX\",\n \"\
- payment_method_details\": {\n \"card\": {\n \"brand\"\
- : \"visa\",\n \"checks\": {\n \"address_line1_check\"\
- : null,\n \"address_postal_code_check\": null,\n \
- \ \"cvc_check\": null\n },\n \"country\": \"PL\",\n\
- \ \"exp_month\": 8,\n \"exp_year\": 2020,\n \
- \ \"fingerprint\": \"aleqpF0PMAATcfmb\",\n \"funding\": \"credit\"\
- ,\n \"last4\": \"0005\",\n \"three_d_secure\": null,\n\
- \ \"wallet\": null\n },\n \"type\": \"card\"\n\
- \ },\n \"receipt_email\": null,\n \"receipt_number\"\
- : null,\n \"receipt_url\": \"https://pay.stripe.com/receipts/acct_1EzlmjIUmJaD6Oqv/ch_1F5BsRIUmJaD6Oqvl2WF1xdU/rcpt_FaMbtUmGgcY6xnKYCxzQgjVlAwLno4y\"\
- ,\n \"refunded\": false,\n \"refunds\": {\n \"object\"\
- : \"list\",\n \"data\": [\n\n ],\n \"has_more\"\
- : false,\n \"total_count\": 0,\n \"url\": \"/v1/charges/ch_1F5BsRIUmJaD6Oqvl2WF1xdU/refunds\"\
- \n },\n \"review\": null,\n \"shipping\": null,\n \
- \ \"source\": null,\n \"source_transfer\": null,\n \"statement_descriptor\"\
- : null,\n \"statement_descriptor_suffix\": null,\n \"status\"\
- : \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\"\
- : null\n }\n ],\n \"has_more\": false,\n \"total_count\": 1,\n\
- \ \"url\": \"/v1/charges?payment_intent=pi_1F5BsRIUmJaD6Oqvz2XMKZCD\"\n\
- \ },\n \"client_secret\": \"pi_1F5BsRIUmJaD6Oqvz2XMKZCD_secret_FnZ8ApzrD4JVONWgCbLGbKAdI\"\
- ,\n \"confirmation_method\": \"manual\",\n \"created\": 1565271719,\n \"\
- currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"\
- invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n\
- \ \"metadata\": {\n },\n \"next_action\": null,\n \"on_behalf_of\": null,\n\
- \ \"payment_method\": \"pm_1F5BsQIUmJaD6OqvbB4aOcJX\",\n \"payment_method_options\"\
- : {\n \"card\": {\n \"request_three_d_secure\": \"automatic\"\n \
- \ }\n },\n \"payment_method_types\": [\n \"card\"\n ],\n \"receipt_email\"\
- : null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\"\
- : null,\n \"source\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\"\
- : null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\"\
- : null\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '3993'
- Content-Type:
- - application/json
- Date:
- - Thu, 08 Aug 2019 16:26:54 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- request-id:
- - req_Nu0wuOQgNYPd0u
- stripe-version:
- - '2019-05-16'
- status:
- code: 200
- message: OK
-- request:
- body: amount=1000
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- Content-Length:
- - '11'
- Content-Type:
- - application/x-www-form-urlencoded
- Idempotency-Key:
- - be73e68d-808a-4277-a928-b68e68037e88
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-Telemetry:
- - '{"last_request_metrics": {"request_id": "req_Nu0wuOQgNYPd0u", "request_duration_ms":
- 494}}'
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: POST
- uri: https://api.stripe.com/v1/charges/ch_1F5BsRIUmJaD6Oqvl2WF1xdU/refund
- response:
- body:
- string: "{\n \"id\": \"ch_1F5BsRIUmJaD6Oqvl2WF1xdU\",\n \"object\": \"charge\"\
- ,\n \"amount\": 4242,\n \"amount_refunded\": 1000,\n \"application\": null,\n\
- \ \"application_fee\": null,\n \"application_fee_amount\": null,\n \"balance_transaction\"\
- : \"txn_1F5D3BIUmJaD6OqvpbNul1gK\",\n \"billing_details\": {\n \"address\"\
- : {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n\
- \ \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n\
- \ },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n\
- \ },\n \"captured\": true,\n \"created\": 1565271719,\n \"currency\":\
- \ \"usd\",\n \"customer\": null,\n \"description\": null,\n \"destination\"\
- : null,\n \"dispute\": null,\n \"failure_code\": null,\n \"failure_message\"\
- : null,\n \"fraud_details\": {\n },\n \"invoice\": null,\n \"livemode\"\
- : false,\n \"metadata\": {\n },\n \"on_behalf_of\": null,\n \"order\"\
- : null,\n \"outcome\": {\n \"network_status\": \"approved_by_network\"\
- ,\n \"reason\": null,\n \"risk_level\": \"normal\",\n \"risk_score\"\
- : 10,\n \"seller_message\": \"Payment complete.\",\n \"type\": \"authorized\"\
- \n },\n \"paid\": true,\n \"payment_intent\": \"pi_1F5BsRIUmJaD6Oqvz2XMKZCD\"\
- ,\n \"payment_method\": \"pm_1F5BsQIUmJaD6OqvbB4aOcJX\",\n \"payment_method_details\"\
- : {\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \
- \ \"address_line1_check\": null,\n \"address_postal_code_check\"\
- : null,\n \"cvc_check\": null\n },\n \"country\": \"PL\"\
- ,\n \"exp_month\": 8,\n \"exp_year\": 2020,\n \"fingerprint\"\
- : \"aleqpF0PMAATcfmb\",\n \"funding\": \"credit\",\n \"last4\":\
- \ \"0005\",\n \"three_d_secure\": null,\n \"wallet\": null\n \
- \ },\n \"type\": \"card\"\n },\n \"receipt_email\": null,\n \"receipt_number\"\
- : null,\n \"receipt_url\": \"https://pay.stripe.com/receipts/acct_1EzlmjIUmJaD6Oqv/ch_1F5BsRIUmJaD6Oqvl2WF1xdU/rcpt_FaMbtUmGgcY6xnKYCxzQgjVlAwLno4y\"\
- ,\n \"refunded\": false,\n \"refunds\": {\n \"object\": \"list\",\n \
- \ \"data\": [\n {\n \"id\": \"re_1F5ES2IUmJaD6Oqv7emYlU1k\"\
- ,\n \"object\": \"refund\",\n \"amount\": 1000,\n \"\
- balance_transaction\": \"txn_1F5ES2IUmJaD6OqvJLdKm7MT\",\n \"charge\"\
- : \"ch_1F5BsRIUmJaD6Oqvl2WF1xdU\",\n \"created\": 1565281614,\n \
- \ \"currency\": \"usd\",\n \"metadata\": {\n },\n \
- \ \"reason\": null,\n \"receipt_number\": null,\n \"source_transfer_reversal\"\
- : null,\n \"status\": \"succeeded\",\n \"transfer_reversal\"\
- : null\n }\n ],\n \"has_more\": false,\n \"total_count\": 1,\n\
- \ \"url\": \"/v1/charges/ch_1F5BsRIUmJaD6Oqvl2WF1xdU/refunds\"\n },\n\
- \ \"review\": null,\n \"shipping\": null,\n \"source\": null,\n \"source_transfer\"\
- : null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\"\
- : null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\"\
- : null\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '2671'
- Content-Type:
- - application/json
- Date:
- - Thu, 08 Aug 2019 16:26:54 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- idempotency-key:
- - be73e68d-808a-4277-a928-b68e68037e88
- original-request:
- - req_AvzNPKR2rCCyy9
- request-id:
- - req_AvzNPKR2rCCyy9
- stripe-version:
- - '2019-05-16'
- status:
- code: 200
- message: OK
-version: 1
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_refund_error_response.yaml b/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_refund_error_response.yaml
deleted file mode 100644
index 8904a4931a..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_refund_error_response.yaml
+++ /dev/null
@@ -1,61 +0,0 @@
-interactions:
-- request:
- body: null
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-Telemetry:
- - '{"last_request_metrics": {"request_id": "req_AvzNPKR2rCCyy9", "request_duration_ms":
- 3}}'
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: GET
- uri: https://api.stripe.com/v1/payment_intents/THIS_INTENT_DOES_NOT_EXISTS
- response:
- body:
- string: "{\n \"error\": {\n \"code\": \"resource_missing\",\n \"doc_url\"\
- : \"https://stripe.com/docs/error-codes/resource-missing\",\n \"message\"\
- : \"No such payment_intent: THIS_INTENT_DOES_NOT_EXISTS\",\n \"param\"\
- : \"intent\",\n \"type\": \"invalid_request_error\"\n }\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '253'
- Content-Type:
- - application/json
- Date:
- - Fri, 09 Aug 2019 08:13:29 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- request-id:
- - req_ABPCzNFuuArBtR
- stripe-version:
- - '2019-05-16'
- status:
- code: 404
- message: Not Found
-version: 1
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_void.yaml b/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_void.yaml
deleted file mode 100644
index c085787bd1..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_void.yaml
+++ /dev/null
@@ -1,217 +0,0 @@
-interactions:
-- request:
- body: null
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-Telemetry:
- - '{"last_request_metrics": {"request_id": "req_ABPCzNFuuArBtR", "request_duration_ms":
- 4}}'
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: GET
- uri: https://api.stripe.com/v1/payment_intents/pi_1F5BsOIUmJaD6Oqvmh5vBJIA
- response:
- body:
- string: "{\n \"id\": \"pi_1F5BsOIUmJaD6Oqvmh5vBJIA\",\n \"object\": \"payment_intent\"\
- ,\n \"amount\": 4242,\n \"amount_capturable\": 0,\n \"amount_received\"\
- : 4242,\n \"application\": null,\n \"application_fee_amount\": null,\n \
- \ \"canceled_at\": null,\n \"cancellation_reason\": null,\n \"capture_method\"\
- : \"automatic\",\n \"charges\": {\n \"object\": \"list\",\n \"data\"\
- : [\n {\n \"id\": \"ch_1F5BsOIUmJaD6OqvbM6tKDjc\",\n \"\
- object\": \"charge\",\n \"amount\": 4242,\n \"amount_refunded\"\
- : 0,\n \"application\": null,\n \"application_fee\": null,\n\
- \ \"application_fee_amount\": null,\n \"balance_transaction\"\
- : \"txn_1F5BsOIUmJaD6OqvoDuvgoCK\",\n \"billing_details\": {\n \
- \ \"address\": {\n \"city\": null,\n \"country\"\
- : null,\n \"line1\": null,\n \"line2\": null,\n \
- \ \"postal_code\": null,\n \"state\": null\n },\n\
- \ \"email\": null,\n \"name\": null,\n \"phone\"\
- : null\n },\n \"captured\": true,\n \"created\": 1565271716,\n\
- \ \"currency\": \"usd\",\n \"customer\": null,\n \"description\"\
- : null,\n \"destination\": null,\n \"dispute\": null,\n \
- \ \"failure_code\": null,\n \"failure_message\": null,\n \
- \ \"fraud_details\": {\n },\n \"invoice\": null,\n \"\
- livemode\": false,\n \"metadata\": {\n },\n \"on_behalf_of\"\
- : null,\n \"order\": null,\n \"outcome\": {\n \"network_status\"\
- : \"approved_by_network\",\n \"reason\": null,\n \"risk_level\"\
- : \"normal\",\n \"risk_score\": 8,\n \"seller_message\"\
- : \"Payment complete.\",\n \"type\": \"authorized\"\n },\n\
- \ \"paid\": true,\n \"payment_intent\": \"pi_1F5BsOIUmJaD6Oqvmh5vBJIA\"\
- ,\n \"payment_method\": \"pm_1F5BsOIUmJaD6OqvM6mSN7La\",\n \"\
- payment_method_details\": {\n \"card\": {\n \"brand\"\
- : \"visa\",\n \"checks\": {\n \"address_line1_check\"\
- : null,\n \"address_postal_code_check\": null,\n \
- \ \"cvc_check\": null\n },\n \"country\": \"PL\",\n\
- \ \"exp_month\": 8,\n \"exp_year\": 2020,\n \
- \ \"fingerprint\": \"aleqpF0PMAATcfmb\",\n \"funding\": \"credit\"\
- ,\n \"last4\": \"0005\",\n \"three_d_secure\": null,\n\
- \ \"wallet\": null\n },\n \"type\": \"card\"\n\
- \ },\n \"receipt_email\": null,\n \"receipt_number\"\
- : null,\n \"receipt_url\": \"https://pay.stripe.com/receipts/acct_1EzlmjIUmJaD6Oqv/ch_1F5BsOIUmJaD6OqvbM6tKDjc/rcpt_FaMbz3hC4CA0NuWiuFFISgfPltn2h4U\"\
- ,\n \"refunded\": false,\n \"refunds\": {\n \"object\"\
- : \"list\",\n \"data\": [\n\n ],\n \"has_more\"\
- : false,\n \"total_count\": 0,\n \"url\": \"/v1/charges/ch_1F5BsOIUmJaD6OqvbM6tKDjc/refunds\"\
- \n },\n \"review\": null,\n \"shipping\": null,\n \
- \ \"source\": null,\n \"source_transfer\": null,\n \"statement_descriptor\"\
- : null,\n \"statement_descriptor_suffix\": null,\n \"status\"\
- : \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\"\
- : null\n }\n ],\n \"has_more\": false,\n \"total_count\": 1,\n\
- \ \"url\": \"/v1/charges?payment_intent=pi_1F5BsOIUmJaD6Oqvmh5vBJIA\"\n\
- \ },\n \"client_secret\": \"pi_1F5BsOIUmJaD6Oqvmh5vBJIA_secret_bpJHb3g4rDKbYxIlWakCkartF\"\
- ,\n \"confirmation_method\": \"manual\",\n \"created\": 1565271716,\n \"\
- currency\": \"usd\",\n \"customer\": null,\n \"description\": null,\n \"\
- invoice\": null,\n \"last_payment_error\": null,\n \"livemode\": false,\n\
- \ \"metadata\": {\n },\n \"next_action\": null,\n \"on_behalf_of\": null,\n\
- \ \"payment_method\": \"pm_1F5BsOIUmJaD6OqvM6mSN7La\",\n \"payment_method_options\"\
- : {\n \"card\": {\n \"request_three_d_secure\": \"automatic\"\n \
- \ }\n },\n \"payment_method_types\": [\n \"card\"\n ],\n \"receipt_email\"\
- : null,\n \"review\": null,\n \"setup_future_usage\": null,\n \"shipping\"\
- : null,\n \"source\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\"\
- : null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\"\
- : null\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '3995'
- Content-Type:
- - application/json
- Date:
- - Fri, 09 Aug 2019 08:41:06 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- request-id:
- - req_YSwsImC7wigVHr
- stripe-version:
- - '2019-05-16'
- status:
- code: 200
- message: OK
-- request:
- body: null
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- Content-Length:
- - '0'
- Content-Type:
- - application/x-www-form-urlencoded
- Idempotency-Key:
- - 1ef4d5c4-e9f0-4d15-9633-00639291eebb
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-Telemetry:
- - '{"last_request_metrics": {"request_id": "req_YSwsImC7wigVHr", "request_duration_ms":
- 511}}'
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: POST
- uri: https://api.stripe.com/v1/charges/ch_1F5BsOIUmJaD6OqvbM6tKDjc/refund
- response:
- body:
- string: "{\n \"id\": \"ch_1F5BsOIUmJaD6OqvbM6tKDjc\",\n \"object\": \"charge\"\
- ,\n \"amount\": 4242,\n \"amount_refunded\": 4242,\n \"application\": null,\n\
- \ \"application_fee\": null,\n \"application_fee_amount\": null,\n \"balance_transaction\"\
- : \"txn_1F5BsOIUmJaD6OqvoDuvgoCK\",\n \"billing_details\": {\n \"address\"\
- : {\n \"city\": null,\n \"country\": null,\n \"line1\": null,\n\
- \ \"line2\": null,\n \"postal_code\": null,\n \"state\": null\n\
- \ },\n \"email\": null,\n \"name\": null,\n \"phone\": null\n\
- \ },\n \"captured\": true,\n \"created\": 1565271716,\n \"currency\":\
- \ \"usd\",\n \"customer\": null,\n \"description\": null,\n \"destination\"\
- : null,\n \"dispute\": null,\n \"failure_code\": null,\n \"failure_message\"\
- : null,\n \"fraud_details\": {\n },\n \"invoice\": null,\n \"livemode\"\
- : false,\n \"metadata\": {\n },\n \"on_behalf_of\": null,\n \"order\"\
- : null,\n \"outcome\": {\n \"network_status\": \"approved_by_network\"\
- ,\n \"reason\": null,\n \"risk_level\": \"normal\",\n \"risk_score\"\
- : 8,\n \"seller_message\": \"Payment complete.\",\n \"type\": \"authorized\"\
- \n },\n \"paid\": true,\n \"payment_intent\": \"pi_1F5BsOIUmJaD6Oqvmh5vBJIA\"\
- ,\n \"payment_method\": \"pm_1F5BsOIUmJaD6OqvM6mSN7La\",\n \"payment_method_details\"\
- : {\n \"card\": {\n \"brand\": \"visa\",\n \"checks\": {\n \
- \ \"address_line1_check\": null,\n \"address_postal_code_check\"\
- : null,\n \"cvc_check\": null\n },\n \"country\": \"PL\"\
- ,\n \"exp_month\": 8,\n \"exp_year\": 2020,\n \"fingerprint\"\
- : \"aleqpF0PMAATcfmb\",\n \"funding\": \"credit\",\n \"last4\":\
- \ \"0005\",\n \"three_d_secure\": null,\n \"wallet\": null\n \
- \ },\n \"type\": \"card\"\n },\n \"receipt_email\": null,\n \"receipt_number\"\
- : null,\n \"receipt_url\": \"https://pay.stripe.com/receipts/acct_1EzlmjIUmJaD6Oqv/ch_1F5BsOIUmJaD6OqvbM6tKDjc/rcpt_FaMbz3hC4CA0NuWiuFFISgfPltn2h4U\"\
- ,\n \"refunded\": true,\n \"refunds\": {\n \"object\": \"list\",\n \
- \ \"data\": [\n {\n \"id\": \"re_1F5TepIUmJaD6OqvC6ujUiMh\",\n\
- \ \"object\": \"refund\",\n \"amount\": 4242,\n \"balance_transaction\"\
- : \"txn_1F5TepIUmJaD6OqvqA291Jtj\",\n \"charge\": \"ch_1F5BsOIUmJaD6OqvbM6tKDjc\"\
- ,\n \"created\": 1565340067,\n \"currency\": \"usd\",\n \
- \ \"metadata\": {\n },\n \"reason\": null,\n \"receipt_number\"\
- : null,\n \"source_transfer_reversal\": null,\n \"status\":\
- \ \"succeeded\",\n \"transfer_reversal\": null\n }\n ],\n \
- \ \"has_more\": false,\n \"total_count\": 1,\n \"url\": \"/v1/charges/ch_1F5BsOIUmJaD6OqvbM6tKDjc/refunds\"\
- \n },\n \"review\": null,\n \"shipping\": null,\n \"source\": null,\n\
- \ \"source_transfer\": null,\n \"statement_descriptor\": null,\n \"statement_descriptor_suffix\"\
- : null,\n \"status\": \"succeeded\",\n \"transfer_data\": null,\n \"transfer_group\"\
- : null\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '2669'
- Content-Type:
- - application/json
- Date:
- - Fri, 09 Aug 2019 08:41:07 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- idempotency-key:
- - 1ef4d5c4-e9f0-4d15-9633-00639291eebb
- original-request:
- - req_KPUCrhi56I6Zh0
- request-id:
- - req_KPUCrhi56I6Zh0
- stripe-version:
- - '2019-05-16'
- status:
- code: 200
- message: OK
-version: 1
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_void_error_response.yaml b/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_void_error_response.yaml
deleted file mode 100644
index 8b19b07a6a..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/tests/cassettes/test_stripe/test_void_error_response.yaml
+++ /dev/null
@@ -1,61 +0,0 @@
-interactions:
-- request:
- body: null
- headers:
- Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate
- Connection:
- - keep-alive
- User-Agent:
- - Stripe/v1 PythonBindings/2.33.0
- X-Stripe-Client-Telemetry:
- - '{"last_request_metrics": {"request_id": "req_KPUCrhi56I6Zh0", "request_duration_ms":
- 3}}'
- X-Stripe-Client-User-Agent:
- - '{"bindings_version": "2.33.0", "lang": "python", "publisher": "stripe", "httplib":
- "requests", "lang_version": "3.7.4", "platform": "Darwin-18.7.0-x86_64-i386-64bit",
- "uname": "Darwin mbp-jakub.lan 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun
- 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 i386"}'
- method: GET
- uri: https://api.stripe.com/v1/payment_intents/THIS_INTENT_DOES_NOT_EXISTS
- response:
- body:
- string: "{\n \"error\": {\n \"code\": \"resource_missing\",\n \"doc_url\"\
- : \"https://stripe.com/docs/error-codes/resource-missing\",\n \"message\"\
- : \"No such payment_intent: THIS_INTENT_DOES_NOT_EXISTS\",\n \"param\"\
- : \"intent\",\n \"type\": \"invalid_request_error\"\n }\n}\n"
- headers:
- Connection:
- - keep-alive
- Content-Length:
- - '253'
- Content-Type:
- - application/json
- Date:
- - Fri, 09 Aug 2019 08:44:27 GMT
- Server:
- - nginx
- Strict-Transport-Security:
- - max-age=31556926; includeSubDomains; preload
- access-control-allow-credentials:
- - 'true'
- access-control-allow-methods:
- - GET, POST, HEAD, OPTIONS, DELETE
- access-control-allow-origin:
- - '*'
- access-control-expose-headers:
- - Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required
- access-control-max-age:
- - '300'
- cache-control:
- - no-cache, no-store
- request-id:
- - req_fpe1Lbawiulevi
- stripe-version:
- - '2019-05-16'
- status:
- code: 404
- message: Not Found
-version: 1
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/test_stripe.py b/saleor/payment/gateways/stripe/deprecated/tests/test_stripe.py
deleted file mode 100644
index ceee97b1fe..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/tests/test_stripe.py
+++ /dev/null
@@ -1,354 +0,0 @@
-import os
-from decimal import Decimal
-from math import isclose
-
-import pytest
-
-from ..... import ChargeStatus
-from .....interface import CustomerSource, GatewayConfig, PaymentMethodInfo
-from .....utils import create_payment_information
-from .. import (
- TransactionKind,
- _get_client,
- authorize,
- capture,
- confirm,
- get_client_token,
- list_client_sources,
- refund,
- void,
-)
-
-TRANSACTION_AMOUNT = Decimal(42.42)
-TRANSACTION_REFUND_AMOUNT = Decimal(24.24)
-TRANSACTION_CURRENCY = "USD"
-PAYMENT_METHOD_CARD_SIMPLE = "pm_card_pl"
-CARD_SIMPLE_DETAILS = PaymentMethodInfo(
- last_4="0005", exp_year=2020, exp_month=8, brand="visa", type="card"
-)
-PAYMENT_METHOD_CARD_3D_SECURE = "pm_card_threeDSecure2Required"
-
-# Set to True if recording new cassette with sandbox using credentials in env
-RECORD = False
-
-
-def gateway_config():
- return GatewayConfig(
- gateway_name="stripe",
- auto_capture=True,
- supported_currencies="USD",
- connection_params={
- "public_key": "public",
- "private_key": "secret",
- "store_name": "Saleor",
- "store_image": "image.gif",
- "prefill": True,
- "remember_me": True,
- "locale": "auto",
- "enable_billing_address": False,
- "enable_shipping_address": False,
- },
- )
-
-
-def sandbox_gateway_config(gateway_config):
- if RECORD:
- connection_params = {
- "public_key": os.environ.get("STRIPE_PUBLIC_KEY"),
- "private_key": os.environ.get("STRIPE_SECRET_KEY"),
- }
- gateway_config.connection_params.update(connection_params)
- return gateway_config
-
-
-def stripe_payment(payment_dummy):
- payment_dummy.total = TRANSACTION_AMOUNT
- payment_dummy.currency = TRANSACTION_CURRENCY
- return payment_dummy
-
-
[email protected](filter_headers=["authorization"])
-def test_authorize(sandbox_gateway_config, stripe_payment):
- payment_info = create_payment_information(
- stripe_payment, PAYMENT_METHOD_CARD_SIMPLE
- )
- response = authorize(payment_info, sandbox_gateway_config)
- assert not response.error
- assert response.kind == TransactionKind.CAPTURE
- assert isclose(response.amount, TRANSACTION_AMOUNT)
- assert response.currency == TRANSACTION_CURRENCY
- assert response.is_success is True
- assert response.payment_method_info == CARD_SIMPLE_DETAILS
- assert not response.action_required
-
-
[email protected](filter_headers=["authorization"])
-def test_authorize_error_response(stripe_payment, sandbox_gateway_config):
- INVALID_METHOD = "abcdefghijklmnoprstquwz"
- payment_info = create_payment_information(stripe_payment, INVALID_METHOD)
- response = authorize(payment_info, sandbox_gateway_config)
-
- assert response.error == "No such payment_method: " + INVALID_METHOD
- assert response.transaction_id == INVALID_METHOD
- assert response.kind == TransactionKind.CAPTURE
- assert not response.is_success
- assert response.amount == stripe_payment.total
- assert response.currency == stripe_payment.currency
- assert not response.action_required
-
-
[email protected](filter_headers=["authorization"])
-def test_authorize_3d_secure(stripe_payment, sandbox_gateway_config):
- payment_info = create_payment_information(
- stripe_payment, PAYMENT_METHOD_CARD_3D_SECURE
- )
- response = authorize(payment_info, sandbox_gateway_config)
- assert not response.error
- assert response.kind == TransactionKind.CAPTURE
- assert isclose(response.amount, TRANSACTION_AMOUNT)
- assert response.currency == TRANSACTION_CURRENCY
- assert response.is_success is True
- assert response.action_required
-
-
[email protected](filter_headers=["authorization"])
-def test_authorize_without_capture(stripe_payment, sandbox_gateway_config):
- sandbox_gateway_config.auto_capture = False
- payment_info = create_payment_information(
- stripe_payment, PAYMENT_METHOD_CARD_SIMPLE
- )
- response = authorize(payment_info, sandbox_gateway_config)
- assert not response.error
- assert response.kind == TransactionKind.AUTH
- assert isclose(response.amount, TRANSACTION_AMOUNT)
- assert response.currency == TRANSACTION_CURRENCY
- assert response.is_success is True
-
-
[email protected](filter_headers=["authorization"])
-def test_authorize_and_save_customer_id(payment_dummy, sandbox_gateway_config):
- CUSTOMER_ID = "cus_FbquUfgBnLdlsY" # retrieved from sandbox
- payment = payment_dummy
-
- payment_info = create_payment_information(payment, PAYMENT_METHOD_CARD_SIMPLE)
-
- sandbox_gateway_config.store_customer = True
- response = authorize(payment_info, sandbox_gateway_config)
- assert not response.error
- assert response.customer_id == CUSTOMER_ID
-
-
[email protected](filter_headers=["authorization"])
-def test_authorize_with_customer_id(payment_dummy, sandbox_gateway_config):
- CUSTOMER_ID = "cus_FbquUfgBnLdlsY" # retrieved from sandbox
- payment = payment_dummy
-
- payment_info = create_payment_information(payment, "pm_card_visa")
- payment_info.amount = TRANSACTION_AMOUNT
- payment_info.customer_id = CUSTOMER_ID
- payment_info.reuse_source = True
-
- response = authorize(payment_info, sandbox_gateway_config)
- assert not response.error
- assert response.is_success
-
-
-def stripe_authorized_payment(stripe_payment):
- stripe_payment.charge_status = ChargeStatus.NOT_CHARGED
- stripe_payment.save(update_fields=["charge_status"])
-
- return stripe_payment
-
-
[email protected](filter_headers=["authorization"])
-def test_capture(stripe_authorized_payment, sandbox_gateway_config):
- # Get id from sandbox for intent not yet captured
- INTENT_ID = "pi_1F5BsRIUmJaD6Oqvz2XMKZCD"
- payment_info = create_payment_information(
- stripe_authorized_payment, payment_token=INTENT_ID
- )
- response = capture(payment_info, sandbox_gateway_config)
-
- assert not response.error
- assert response.transaction_id == INTENT_ID
- assert response.kind == TransactionKind.CAPTURE
- assert response.is_success
- assert isclose(response.amount, TRANSACTION_AMOUNT)
- assert response.currency == TRANSACTION_CURRENCY
- assert response.payment_method_info == CARD_SIMPLE_DETAILS
-
-
[email protected](filter_headers=["authorization"])
-def test_capture_3d_secure(stripe_payment, sandbox_gateway_config):
- PAYMENT_INTENT = "pi_1F6YmgIUmJaD6Oqv77HUh6qq"
- ERROR = (
- "This PaymentIntent could not be captured because it"
- " has a status of requires_action."
- " Only a PaymentIntent with one of the following "
- "statuses may be captured: requires_capture."
- )
- payment_info = create_payment_information(stripe_payment, PAYMENT_INTENT)
- response = capture(payment_info, sandbox_gateway_config)
- assert response.error == ERROR
- assert response.kind == TransactionKind.CAPTURE
- assert isclose(response.amount, TRANSACTION_AMOUNT)
- assert response.currency == TRANSACTION_CURRENCY
- assert not response.is_success
- assert response.action_required
-
-
[email protected](filter_headers=["authorization"])
-def test_capture_error_response(stripe_payment, sandbox_gateway_config):
- INVALID_INTENT = "THIS_INTENT_DOES_NOT_EXISTS"
- payment_info = create_payment_information(stripe_payment, INVALID_INTENT)
- response = capture(payment_info, sandbox_gateway_config)
-
- assert response.error == "No such payment_intent: " + INVALID_INTENT
- assert response.transaction_id == INVALID_INTENT
- assert response.kind == TransactionKind.CAPTURE
- assert not response.is_success
- assert response.amount == stripe_payment.total
- assert response.currency == stripe_payment.currency
-
-
-def stripe_paid_payment(stripe_payment):
- stripe_payment.charge_status = ChargeStatus.FULLY_CHARGED
- stripe_payment.save(update_fields=["charge_status"])
-
- return stripe_payment
-
-
[email protected](filter_headers=["authorization"])
-def test_refund(stripe_paid_payment, sandbox_gateway_config):
- # Get id from sandbox for succeeded payment
- REFUND_AMOUNT = Decimal(10.0) # partial refund
- INTENT_ID = "pi_1F5BsRIUmJaD6Oqvz2XMKZCD"
- payment_info = create_payment_information(
- stripe_paid_payment, amount=REFUND_AMOUNT, payment_token=INTENT_ID
- )
- response = refund(payment_info, sandbox_gateway_config)
-
- assert not response.error
- assert response.transaction_id == INTENT_ID
- assert response.kind == TransactionKind.REFUND
- assert response.is_success
- assert isclose(response.amount, REFUND_AMOUNT)
- assert response.currency == TRANSACTION_CURRENCY
-
-
[email protected](filter_headers=["authorization"])
-def test_refund_error_response(stripe_payment, sandbox_gateway_config):
- INVALID_INTENT = "THIS_INTENT_DOES_NOT_EXISTS"
- payment_info = create_payment_information(stripe_payment, INVALID_INTENT)
- response = refund(payment_info, sandbox_gateway_config)
-
- assert response.error == "No such payment_intent: " + INVALID_INTENT
- assert response.transaction_id == INVALID_INTENT
- assert response.kind == TransactionKind.REFUND
- assert not response.is_success
- assert response.amount == stripe_payment.total
- assert response.currency == stripe_payment.currency
-
-
[email protected](filter_headers=["authorization"])
-def test_void(stripe_paid_payment, sandbox_gateway_config):
- # Get id from sandbox for succedeed payment
- INTENT_ID = "pi_1F5BsOIUmJaD6Oqvmh5vBJIA"
- payment_info = create_payment_information(
- stripe_paid_payment, payment_token=INTENT_ID
- )
- response = void(payment_info, sandbox_gateway_config)
-
- assert not response.error
- assert response.transaction_id == INTENT_ID
- assert response.kind == TransactionKind.VOID
- assert response.is_success
- assert isclose(response.amount, TRANSACTION_AMOUNT)
- assert response.currency == TRANSACTION_CURRENCY
-
-
[email protected](filter_headers=["authorization"])
-def test_void_error_response(stripe_payment, sandbox_gateway_config):
- INVALID_INTENT = "THIS_INTENT_DOES_NOT_EXISTS"
- payment_info = create_payment_information(stripe_payment, INVALID_INTENT)
- response = void(payment_info, sandbox_gateway_config)
-
- assert response.error == "No such payment_intent: " + INVALID_INTENT
- assert response.transaction_id == INVALID_INTENT
- assert response.kind == TransactionKind.VOID
- assert not response.is_success
- assert response.amount == stripe_payment.total
- assert response.currency == stripe_payment.currency
-
-
[email protected](filter_headers=["authorization"])
-def test_confirm__intent(stripe_payment, sandbox_gateway_config):
- PAYMENT_INTENT = (
- "pi_1F6bslIUmJaD6Oqv1MNDaBSv" # PI with status "requires_confirmation"
- )
- payment_info = create_payment_information(stripe_payment, PAYMENT_INTENT)
- response = confirm(payment_info, sandbox_gateway_config)
- assert not response.error
- assert response.kind == TransactionKind.CONFIRM
- assert isclose(response.amount, 45.0)
- assert response.currency == TRANSACTION_CURRENCY
- assert response.is_success
- assert not response.action_required
-
-
[email protected](filter_headers=["authorization"])
-def test_confirm_error_response(stripe_payment, sandbox_gateway_config):
- INVALID_INTENT = "THIS_INTENT_DOES_NOT_EXISTS"
- payment_info = create_payment_information(stripe_payment, INVALID_INTENT)
- response = confirm(payment_info, sandbox_gateway_config)
-
- assert response.error == "No such payment_intent: " + INVALID_INTENT
- assert response.transaction_id == INVALID_INTENT
- assert response.kind == TransactionKind.CONFIRM
- assert not response.is_success
- assert response.amount == stripe_payment.total
- assert response.currency == stripe_payment.currency
-
-
[email protected](filter_headers=["authorization"])
-def test_list_customer_sources(sandbox_gateway_config):
- CUSTOMER_ID = "cus_FbquUfgBnLdlsY" # retrieved from sandbox
- expected_credit_card = PaymentMethodInfo(
- last_4="0005", exp_year=2020, exp_month=8, name=None
- )
- expected_customer_source = CustomerSource(
- id="pm_1F6dCWIUmJaD6OqvCtcAnPSq",
- gateway="stripe",
- credit_card_info=expected_credit_card,
- )
- sources = list_client_sources(sandbox_gateway_config, CUSTOMER_ID)
- assert sources == [expected_customer_source]
-
-
-def test_get_client(gateway_config):
- assert _get_client(**gateway_config.connection_params).api_key == "secret"
-
-
-def test_get_client_token():
- assert get_client_token() is None
diff --git a/saleor/payment/gateways/stripe/deprecated/tests/test_utils.py b/saleor/payment/gateways/stripe/deprecated/tests/test_utils.py
deleted file mode 100644
index bf6e7edbaf..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/tests/test_utils.py
+++ /dev/null
@@ -1,97 +0,0 @@
-from decimal import Decimal
-from math import isclose
-
-from django_countries import countries
-
-from .....interface import AddressData
-from .....utils import create_payment_information
-from ..utils import (
- get_amount_for_stripe,
- get_amount_from_stripe,
- get_currency_for_stripe,
- get_currency_from_stripe,
- get_payment_billing_fullname,
- shipping_to_stripe_dict,
-)
-
-
-def test_get_amount_for_stripe():
- assert get_amount_for_stripe(Decimal(1), "USD") == 100
- assert get_amount_for_stripe(Decimal(1), "usd") == 100
-
- assert get_amount_for_stripe(Decimal(0.01), "USD") == 1
- assert get_amount_for_stripe(Decimal(24.24), "USD") == 2424
- assert get_amount_for_stripe(Decimal(42.42), "USD") == 4242
-
- assert get_amount_for_stripe(Decimal(1), "JPY") == 1
- assert get_amount_for_stripe(Decimal(1), "jpy") == 1
-
-
-def test_get_amount_from_stripe():
- assert get_amount_from_stripe(100, "USD") == Decimal(1)
- assert get_amount_from_stripe(100, "usd") == Decimal(1)
-
- assert isclose(get_amount_from_stripe(1, "USD"), Decimal(0.01))
- assert isclose(get_amount_from_stripe(2424, "USD"), Decimal(24.24))
- assert isclose(get_amount_from_stripe(4242, "USD"), Decimal(42.42))
-
- assert get_amount_from_stripe(1, "JPY") == Decimal(1)
- assert get_amount_from_stripe(1, "jpy") == Decimal(1)
-
-
-def test_get_currency_for_stripe():
- assert get_currency_for_stripe("USD") == "usd"
- assert get_currency_for_stripe("usd") == "usd"
- assert get_currency_for_stripe("uSd") == "usd"
-
-
-def test_get_currency_from_stripe():
- assert get_currency_from_stripe("USD") == "USD"
- assert get_currency_from_stripe("usd") == "USD"
- assert get_currency_from_stripe("uSd") == "USD"
-
-
-def test_get_payment_billing_fullname(payment_dummy):
- payment_info = create_payment_information(payment_dummy)
- billing_last_name = payment_dummy.billing_last_name
- billing_first_name = payment_dummy.billing_first_name
- expected_fullname = f"{billing_last_name} {billing_first_name}"
-
- assert get_payment_billing_fullname(payment_info) == expected_fullname
-
-
-def test_get_payment_billing_fullname_no_billing(payment_dummy):
- payment_info = create_payment_information(payment_dummy)
- payment_info.billing = None
-
- assert not payment_info.billing
- assert get_payment_billing_fullname(payment_info) == ""
-
-
-def test_get_payment_customer_email(payment_dummy, checkout, customer_user):
- checkout.user = customer_user
- checkout.email = "[email protected]"
- checkout.save()
- payment_dummy.order = None
- payment_dummy.checkout = checkout
- payment_dummy.save()
-
- payment_info = create_payment_information(payment_dummy)
- assert payment_info.customer_email == checkout.user.email
-
-
-def test_shipping_address_to_stripe_dict(address):
- address_data = AddressData(**address.as_data())
- expected_address_dict = {
- "name": "John Doe",
- "phone": "+48713988102",
- "address": {
- "line1": address.street_address_1,
- "line2": address.street_address_2,
- "city": address.city,
- "state": address.country_area,
- "postal_code": address.postal_code,
- "country": dict(countries).get(address.country, ""),
- },
- }
- assert shipping_to_stripe_dict(address_data) == expected_address_dict
diff --git a/saleor/payment/gateways/stripe/deprecated/utils.py b/saleor/payment/gateways/stripe/deprecated/utils.py
deleted file mode 100644
index 73cc836962..0000000000
--- a/saleor/payment/gateways/stripe/deprecated/utils.py
+++ /dev/null
@@ -1,97 +0,0 @@
-from decimal import Decimal
-
-from django_countries import countries
-
-# List of zero-decimal currencies
-# Since there is no public API in Stripe backend or helper function
-# in Stripe's Python library, this list is straight out of Stripe's docs
-# https://stripe.com/docs/currencies#zero-decimal
-from ....interface import AddressData, PaymentData
-
-ZERO_DECIMAL_CURRENCIES = [
- "BIF",
- "CLP",
- "DJF",
- "GNF",
- "JPY",
- "KMF",
- "KRW",
- "MGA",
- "PYG",
- "RWF",
- "UGX",
- "VND",
- "VUV",
- "XAF",
- "XOF",
- "XPF",
-]
-
-
-def get_amount_for_stripe(amount, currency):
- """Get appropriate amount for stripe.
-
- Stripe is using currency's smallest unit such as cents for USD and
- stripe requires integer instead of decimal, so multiplying by 100
- and converting to integer is required. But for zero-decimal currencies,
- multiplying by 100 is not needed.
- """
- # Multiply by 100 for non-zero-decimal currencies
- if currency.upper() not in ZERO_DECIMAL_CURRENCIES:
- amount *= 100
-
- # Using int(Decimal) directly may yield wrong result
- # such as int(Decimal(24.24)*100) will equal to 2423
- return int(amount.to_integral_value())
-
-
-def get_amount_from_stripe(amount, currency):
- """Get appropriate amount from stripe."""
- amount = Decimal(amount)
-
- # Divide by 100 for non-zero-decimal currencies
- if currency.upper() not in ZERO_DECIMAL_CURRENCIES:
- # Using Decimal(amount / 100.0) will convert to decimal from float
- # where precision may be lost
- amount /= Decimal(100)
-
- return amount
-
-
-def get_currency_for_stripe(currency):
- """Convert Saleor's currency format to Stripe's currency format.
-
- Stripe's currency is using lowercase while Saleor is using uppercase.
- """
- return currency.lower()
-
-
-def get_currency_from_stripe(currency):
- """Convert Stripe's currency format to Saleor's currency format.
-
- Stripe's currency is using lowercase while Saleor is using uppercase.
- """
- return currency.upper()
-
-
-def get_payment_billing_fullname(payment_information: PaymentData) -> str:
- # Get billing name from payment
- payment_billing = payment_information.billing
- if not payment_billing:
- return ""
- return f"{payment_billing.last_name} {payment_billing.first_name}"
-
-
-def shipping_to_stripe_dict(shipping: AddressData) -> dict:
- return {
- "name": shipping.first_name + " " + shipping.last_name,
- "phone": shipping.phone,
- "address": {
- "line1": shipping.street_address_1,
- "line2": shipping.street_address_2,
- "city": shipping.city,
- "state": shipping.country_area,
- "postal_code": shipping.postal_code,
- "country": dict(countries).get(shipping.country, ""),
- },
- }
diff --git a/saleor/settings.py b/saleor/settings.py
index 3c3e2c551a..9f9786c6f5 100644
--- a/saleor/settings.py
+++ b/saleor/settings.py
@@ -811,7 +811,6 @@ BUILTIN_PLUGINS = [
"saleor.plugins.webhook.plugin.WebhookPlugin",
"saleor.payment.gateways.dummy.plugin.DummyGatewayPlugin",
"saleor.payment.gateways.dummy_credit_card.plugin.DummyCreditCardGatewayPlugin",
- "saleor.payment.gateways.stripe.deprecated.plugin.DeprecatedStripeGatewayPlugin",
"saleor.payment.gateways.stripe.plugin.StripeGatewayPlugin",
"saleor.payment.gateways.braintree.plugin.BraintreeGatewayPlugin",
"saleor.payment.gateways.razorpay.plugin.RazorpayGatewayPlugin",