diff --git a/CHANGELOG.md b/CHANGELOG.md index 891051099f2..125e9635c97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### PaymentSheet * [Fixed] Embedded Payment Element (private beta) layout margins default to zero. - +* [Added] Support for Crypto in PaymentSheet ## 24.4.0 2025-01-13 ### PaymentSheet diff --git a/Example/PaymentSheet Example/PaymentSheetUITest/PaymentSheetLPMUITest.swift b/Example/PaymentSheet Example/PaymentSheetUITest/PaymentSheetLPMUITest.swift index b88fcc49807..b612ee9fc35 100644 --- a/Example/PaymentSheet Example/PaymentSheetUITest/PaymentSheetLPMUITest.swift +++ b/Example/PaymentSheet Example/PaymentSheetUITest/PaymentSheetLPMUITest.swift @@ -207,6 +207,22 @@ class PaymentSheetStandardLPMUIOneTests: PaymentSheetStandardLPMUICase { XCTAssertTrue(app.staticTexts["Success!"].waitForExistence(timeout: 15.0)) } + func testCryptoPaymentMethod() throws { + var settings = PaymentSheetTestPlaygroundSettings.defaultValues() + settings.currency = .usd + settings.merchantCountryCode = .US + loadPlayground(app, settings) + app.buttons["Present PaymentSheet"].tap() + + // Select Crypto + tapPaymentMethod("Crypto") + + // Pay + app.buttons["Pay $50.99"].waitForExistenceAndTap() + webviewAuthorizePaymentButton.waitForExistenceAndTap(timeout: 10) + XCTAssertTrue(app.staticTexts["Success!"].waitForExistence(timeout: 15.0)) + } + func testZipPaymentMethod() throws { var settings = PaymentSheetTestPlaygroundSettings.defaultValues() settings.layout = .horizontal diff --git a/StripePaymentSheet/StripePaymentSheet/Resources/JSON/form_specs.json b/StripePaymentSheet/StripePaymentSheet/Resources/JSON/form_specs.json index e1d86c6f667..db064896990 100644 --- a/StripePaymentSheet/StripePaymentSheet/Resources/JSON/form_specs.json +++ b/StripePaymentSheet/StripePaymentSheet/Resources/JSON/form_specs.json @@ -877,7 +877,34 @@ } } } - }, + }, + { + "type": "crypto", + "async": false, + "selector_icon": { + "light_theme_png": "https://js.stripe.com/v3/fingerprinted/img/payment-methods/icon-pm-crypto@3x-94c06c199e78e6d9ff9290210912bd5e.png", + "light_theme_svg": "https://js.stripe.com/v3/fingerprinted/img/payment-methods/icon-pm-crypto-15fd4ffeafd1b13e40688c8a06d79ba4.svg", + "dark_theme_png": "https://js.stripe.com/v3/fingerprinted/img/payment-methods/icon-pm-crypto_dark@3x-8f7b0e91b45cb56de550af37d41aac1d.png", + "dark_theme_svg": "https://js.stripe.com/v3/fingerprinted/img/payment-methods/icon-pm-crypto_dark-f19bb5c5400c6cde94dd53b7f1ce7217.svg" + }, + "fields": [ + ], + "next_action_spec": { + "confirm_response_status_specs": { + "requires_action": { + "type": "redirect_to_url" + } + }, + "post_confirm_handling_pi_status_specs": { + "succeeded": { + "type": "finished" + }, + "requires_action": { + "type": "canceled" + } + } + } + }, { "type": "mobilepay", "async": false, diff --git a/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/PaymentMethodType.swift b/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/PaymentMethodType.swift index 1a09805909d..1704a0b667c 100644 --- a/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/PaymentMethodType.swift +++ b/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/PaymentMethodType.swift @@ -317,7 +317,7 @@ extension PaymentSheet { return [] case .alipay, .EPS, .FPX, .giropay, .grabPay, .netBanking, .payPal, .przelewy24, .klarna, .bancontact, .iDEAL, .cashApp, .affirm, .zip, .revolutPay, .amazonPay, .alma, - .mobilePay, .swish, .twint, .sunbit, .billie, .satispay: + .mobilePay, .swish, .twint, .sunbit, .billie, .satispay, .crypto: return [.returnURL] case .USBankAccount: return [ @@ -330,7 +330,7 @@ extension PaymentSheet { return [.returnURL, .userSupportsDelayedPaymentMethods] case .afterpayClearpay: return [.returnURL, .shippingAddress] - case .link, .unknown, .crypto: + case .link, .unknown: return [.unsupported] @unknown default: return [.unsupported] diff --git a/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/PaymentSheet+PaymentMethodAvailability.swift b/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/PaymentSheet+PaymentMethodAvailability.swift index 2582539d066..622e972b296 100644 --- a/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/PaymentSheet+PaymentMethodAvailability.swift +++ b/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/PaymentSheet+PaymentMethodAvailability.swift @@ -35,6 +35,7 @@ extension PaymentSheet { .sunbit, .billie, .satispay, + .crypto, .boleto, .swish, .twint, diff --git a/StripePaymentSheet/StripePaymentSheetTests/PaymentSheet/PaymentSheetLPMConfirmFlowTests.swift b/StripePaymentSheet/StripePaymentSheetTests/PaymentSheet/PaymentSheetLPMConfirmFlowTests.swift index 246326e8e52..4f1f5d279aa 100644 --- a/StripePaymentSheet/StripePaymentSheetTests/PaymentSheet/PaymentSheetLPMConfirmFlowTests.swift +++ b/StripePaymentSheet/StripePaymentSheetTests/PaymentSheet/PaymentSheetLPMConfirmFlowTests.swift @@ -227,6 +227,16 @@ final class PaymentSheet_LPM_ConfirmFlowTests: STPNetworkStubbingTestCase { } } + func testCryptoConfirmFlows() async throws { + try await _testConfirm(intentKinds: [.paymentIntent], + currency: "USD", + paymentMethodType: .crypto, + merchantCountry: .US) { form in + // Crypto has no input fields + XCTAssertEqual(form.getAllUnwrappedSubElements().count, 1) + } + } + func testAlipayConfirmFlows() async throws { try await _testConfirm(intentKinds: [.paymentIntent], currency: "USD", diff --git a/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0000_post_create_payment_intent.tail b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0000_post_create_payment_intent.tail new file mode 100644 index 00000000000..c2ed03a940b --- /dev/null +++ b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0000_post_create_payment_intent.tail @@ -0,0 +1,18 @@ +POST +https:\/\/stp-mobile-ci-test-backend-e1b3\.stripedemos\.com\/create_payment_intent$ +200 +text/html +Content-Type: text/html;charset=utf-8 +Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 +Set-Cookie: rack.session=uaLu1S5CTzddXOORYkMA9DpbmGoYYbLMdAcGTNj9naN%2B1bghmT0ovI%2BLVm7JPzzM4WUoz65qkGFLAATI6yE3ZDzuuAGdG4AgQgcujxmNP2hhN3dpiUgikVarnrGh7%2BBtSO3hkwaTCrFAq58O6GVObjfBRWVSEXW0KvCrJAugQTHzU9ywRowucqVNYj%2B95OI%2F0UHpapg0tyow2mCykhjpJmEQzNKIlJcsMItRklqfHY4%3D; path=/ +Server: Google Frontend +x-cloud-trace-context: 46b4c92cddf845f1b2249dad978275f6;o=1 +Via: 1.1 google +x-xss-protection: 1; mode=block +Date: Thu, 21 Nov 2024 22:24:19 GMT +x-robots-tag: noindex, nofollow +Content-Length: 147 +x-content-type-options: nosniff +x-frame-options: SAMEORIGIN + +{"intent":"pi_3QNinPFY0qyl6XeW1C6tfI7s","secret":"pi_3QNinPFY0qyl6XeW1C6tfI7s_secret_4H0d3AqsXKbBRJctoF9esHGLc","status":"requires_payment_method"} \ No newline at end of file diff --git a/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0001_get_v1_payment_intents_pi_3QNinPFY0qyl6XeW1C6tfI7s.tail b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0001_get_v1_payment_intents_pi_3QNinPFY0qyl6XeW1C6tfI7s.tail new file mode 100644 index 00000000000..1bc5f4daea5 --- /dev/null +++ b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0001_get_v1_payment_intents_pi_3QNinPFY0qyl6XeW1C6tfI7s.tail @@ -0,0 +1,65 @@ +GET +https:\/\/api\.stripe\.com\/v1\/payment_intents\/pi_3QNinPFY0qyl6XeW1C6tfI7s\?client_secret=pi_3QNinPFY0qyl6XeW1C6tfI7s_secret_4H0d3AqsXKbBRJctoF9esHGLc$ +200 +application/json +access-control-allow-methods: GET, HEAD, PUT, PATCH, POST, DELETE +content-security-policy: report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' +Server: nginx +Cache-Control: no-cache, no-store +reporting-endpoints: coop="https://q.stripe.com/coop-report" +x-wc: A +Strict-Transport-Security: max-age=63072000; includeSubDomains; preload +cross-origin-opener-policy-report-only: same-origin; report-to="coop" +Access-Control-Allow-Origin: * +x-stripe-routing-context-priority-tier: api-testmode +x-stripe-priority-routing-enabled: true +report-to: {"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true} +request-id: req_4VwIjD468Y6cSp +Content-Length: 891 +Vary: Origin +Date: Thu, 21 Nov 2024 22:24:19 GMT +stripe-version: 2020-08-27 +access-control-expose-headers: Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required +access-control-max-age: 300 +access-control-allow-credentials: true +Content-Type: application/json +x-content-type-options: nosniff + +{ + "payment_method_configuration_details" : null, + "canceled_at" : null, + "source" : null, + "amount" : 5050, + "capture_method" : "automatic", + "livemode" : false, + "shipping" : null, + "status" : "requires_payment_method", + "object" : "payment_intent", + "currency" : "usd", + "last_payment_error" : null, + "amount_subtotal" : 5050, + "automatic_payment_methods" : null, + "cancellation_reason" : null, + "next_action" : null, + "total_details" : { + "amount_discount" : 0, + "amount_tax" : 0 + }, + "payment_method" : null, + "client_secret" : "pi_3QNinPFY0qyl6XeW1C6tfI7s_secret_4H0d3AqsXKbBRJctoF9esHGLc", + "id" : "pi_3QNinPFY0qyl6XeW1C6tfI7s", + "confirmation_method" : "automatic", + "amount_details" : { + "tip" : { + + } + }, + "processing" : null, + "receipt_email" : null, + "payment_method_types" : [ + "crypto" + ], + "setup_future_usage" : null, + "created" : 1732227859, + "description" : null +} \ No newline at end of file diff --git a/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0002_post_v1_payment_intents_pi_3QNinPFY0qyl6XeW1C6tfI7s_confirm.tail b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0002_post_v1_payment_intents_pi_3QNinPFY0qyl6XeW1C6tfI7s_confirm.tail new file mode 100644 index 00000000000..875bd023172 --- /dev/null +++ b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0002_post_v1_payment_intents_pi_3QNinPFY0qyl6XeW1C6tfI7s_confirm.tail @@ -0,0 +1,99 @@ +POST +https:\/\/api\.stripe\.com\/v1\/payment_intents\/pi_3QNinPFY0qyl6XeW1C6tfI7s\/confirm$ +200 +application/json +access-control-allow-methods: GET, HEAD, PUT, PATCH, POST, DELETE +content-security-policy: report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent%2Fconfirm; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' +Server: nginx +Cache-Control: no-cache, no-store +reporting-endpoints: coop="https://q.stripe.com/coop-report" +x-wc: A +Strict-Transport-Security: max-age=63072000; includeSubDomains; preload +cross-origin-opener-policy-report-only: same-origin; report-to="coop" +Access-Control-Allow-Origin: * +stripe-should-retry: false +x-stripe-priority-routing-enabled: true +report-to: {"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true} +request-id: req_BoPkMucEtG7LRR +x-stripe-routing-context-priority-tier: api-testmode +Content-Length: 1593 +Vary: Origin +Date: Thu, 21 Nov 2024 22:24:22 GMT +original-request: req_BoPkMucEtG7LRR +stripe-version: 2020-08-27 +idempotency-key: e9421219-8c0f-4530-8b4c-a33b1ecd0734 +access-control-expose-headers: Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required +access-control-max-age: 300 +access-control-allow-credentials: true +Content-Type: application/json +x-content-type-options: nosniff +X-Stripe-Mock-Request: client_secret=pi_3QNinPFY0qyl6XeW1C6tfI7s_secret_4H0d3AqsXKbBRJctoF9esHGLc&expand\[0]=payment_method&payment_method_data\[allow_redisplay]=unspecified&payment_method_data\[payment_user_agent]=.*&payment_method_data\[type]=crypto&return_url=https%3A\/\/foo\.com&use_stripe_sdk=true + +{ + "payment_method_configuration_details" : null, + "canceled_at" : null, + "source" : null, + "amount" : 5050, + "capture_method" : "automatic", + "livemode" : false, + "shipping" : null, + "status" : "requires_action", + "object" : "payment_intent", + "currency" : "usd", + "last_payment_error" : null, + "amount_subtotal" : 5050, + "automatic_payment_methods" : null, + "cancellation_reason" : null, + "next_action" : { + "type" : "redirect_to_url", + "redirect_to_url" : { + "return_url" : "https:\/\/foo.com", + "url" : "https:\/\/pm-redirects.stripe.com\/authorize\/acct_1G6m1pFY0qyl6XeW\/pa_nonce_RGFI06MCC9667MFuK5qGPgu801Fu8nJ" + } + }, + "total_details" : { + "amount_discount" : 0, + "amount_tax" : 0 + }, + "payment_method" : { + "object" : "payment_method", + "crypto" : { + + }, + "id" : "pm_1QNinQFY0qyl6XeWD9ozsVmv", + "billing_details" : { + "email" : null, + "phone" : null, + "name" : null, + "address" : { + "state" : null, + "country" : null, + "line2" : null, + "city" : null, + "line1" : null, + "postal_code" : null + } + }, + "livemode" : false, + "created" : 1732227860, + "allow_redisplay" : "unspecified", + "type" : "crypto", + "customer" : null + }, + "client_secret" : "pi_3QNinPFY0qyl6XeW1C6tfI7s_secret_4H0d3AqsXKbBRJctoF9esHGLc", + "id" : "pi_3QNinPFY0qyl6XeW1C6tfI7s", + "confirmation_method" : "automatic", + "amount_details" : { + "tip" : { + + } + }, + "processing" : null, + "receipt_email" : null, + "payment_method_types" : [ + "crypto" + ], + "setup_future_usage" : null, + "created" : 1732227859, + "description" : null +} \ No newline at end of file diff --git a/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0003_get_v1_payment_intents_pi_3QNinPFY0qyl6XeW1C6tfI7s.tail b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0003_get_v1_payment_intents_pi_3QNinPFY0qyl6XeW1C6tfI7s.tail new file mode 100644 index 00000000000..4351c99eb65 --- /dev/null +++ b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0003_get_v1_payment_intents_pi_3QNinPFY0qyl6XeW1C6tfI7s.tail @@ -0,0 +1,95 @@ +GET +https:\/\/api\.stripe\.com\/v1\/payment_intents\/pi_3QNinPFY0qyl6XeW1C6tfI7s\?client_secret=pi_3QNinPFY0qyl6XeW1C6tfI7s_secret_4H0d3AqsXKbBRJctoF9esHGLc&expand%5B0%5D=payment_method$ +200 +application/json +access-control-allow-methods: GET, HEAD, PUT, PATCH, POST, DELETE +content-security-policy: report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' +Server: nginx +Cache-Control: no-cache, no-store +reporting-endpoints: coop="https://q.stripe.com/coop-report" +x-wc: A +Strict-Transport-Security: max-age=63072000; includeSubDomains; preload +cross-origin-opener-policy-report-only: same-origin; report-to="coop" +Access-Control-Allow-Origin: * +x-stripe-routing-context-priority-tier: api-testmode +x-stripe-priority-routing-enabled: true +report-to: {"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true} +request-id: req_JqJLUdYJnqqnAr +Content-Length: 1593 +Vary: Origin +Date: Thu, 21 Nov 2024 22:24:22 GMT +stripe-version: 2020-08-27 +access-control-expose-headers: Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required +access-control-max-age: 300 +access-control-allow-credentials: true +Content-Type: application/json +x-content-type-options: nosniff + +{ + "payment_method_configuration_details" : null, + "canceled_at" : null, + "source" : null, + "amount" : 5050, + "capture_method" : "automatic", + "livemode" : false, + "shipping" : null, + "status" : "requires_action", + "object" : "payment_intent", + "currency" : "usd", + "last_payment_error" : null, + "amount_subtotal" : 5050, + "automatic_payment_methods" : null, + "cancellation_reason" : null, + "next_action" : { + "type" : "redirect_to_url", + "redirect_to_url" : { + "return_url" : "https:\/\/foo.com", + "url" : "https:\/\/pm-redirects.stripe.com\/authorize\/acct_1G6m1pFY0qyl6XeW\/pa_nonce_RGFI06MCC9667MFuK5qGPgu801Fu8nJ" + } + }, + "total_details" : { + "amount_discount" : 0, + "amount_tax" : 0 + }, + "payment_method" : { + "object" : "payment_method", + "crypto" : { + + }, + "id" : "pm_1QNinQFY0qyl6XeWD9ozsVmv", + "billing_details" : { + "email" : null, + "phone" : null, + "name" : null, + "address" : { + "state" : null, + "country" : null, + "line2" : null, + "city" : null, + "line1" : null, + "postal_code" : null + } + }, + "livemode" : false, + "created" : 1732227860, + "allow_redisplay" : "unspecified", + "type" : "crypto", + "customer" : null + }, + "client_secret" : "pi_3QNinPFY0qyl6XeW1C6tfI7s_secret_4H0d3AqsXKbBRJctoF9esHGLc", + "id" : "pi_3QNinPFY0qyl6XeW1C6tfI7s", + "confirmation_method" : "automatic", + "amount_details" : { + "tip" : { + + } + }, + "processing" : null, + "receipt_email" : null, + "payment_method_types" : [ + "crypto" + ], + "setup_future_usage" : null, + "created" : 1732227859, + "description" : null +} \ No newline at end of file diff --git a/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0004_post_v1_payment_methods.tail b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0004_post_v1_payment_methods.tail new file mode 100644 index 00000000000..95e591f9ed1 --- /dev/null +++ b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0004_post_v1_payment_methods.tail @@ -0,0 +1,56 @@ +POST +https:\/\/api\.stripe\.com\/v1\/payment_methods$ +200 +application/json +access-control-allow-methods: GET, HEAD, PUT, PATCH, POST, DELETE +content-security-policy: report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_methods; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' +Server: nginx +Cache-Control: no-cache, no-store +reporting-endpoints: coop="https://q.stripe.com/coop-report" +x-wc: A +Strict-Transport-Security: max-age=63072000; includeSubDomains; preload +cross-origin-opener-policy-report-only: same-origin; report-to="coop" +Access-Control-Allow-Origin: * +stripe-should-retry: false +x-stripe-priority-routing-enabled: true +report-to: {"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true} +request-id: req_LZWVwfkC8haXtJ +x-stripe-routing-context-priority-tier: api-testmode +Content-Length: 448 +Vary: Origin +Date: Thu, 21 Nov 2024 22:24:23 GMT +original-request: req_LZWVwfkC8haXtJ +stripe-version: 2020-08-27 +idempotency-key: 957f2e51-4b87-4bfb-a916-3aefda4cc7b6 +access-control-expose-headers: Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required +access-control-max-age: 300 +access-control-allow-credentials: true +Content-Type: application/json +x-content-type-options: nosniff +X-Stripe-Mock-Request: allow_redisplay=unspecified&payment_user_agent=.*&type=crypto + +{ + "object" : "payment_method", + "crypto" : { + + }, + "id" : "pm_1QNinSFY0qyl6XeWIQQ1t8py", + "billing_details" : { + "email" : null, + "phone" : null, + "name" : null, + "address" : { + "state" : null, + "country" : null, + "line2" : null, + "city" : null, + "line1" : null, + "postal_code" : null + } + }, + "livemode" : false, + "created" : 1732227862, + "allow_redisplay" : "unspecified", + "type" : "crypto", + "customer" : null +} \ No newline at end of file diff --git a/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0005_post_create_payment_intent.tail b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0005_post_create_payment_intent.tail new file mode 100644 index 00000000000..170c18435d7 --- /dev/null +++ b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0005_post_create_payment_intent.tail @@ -0,0 +1,18 @@ +POST +https:\/\/stp-mobile-ci-test-backend-e1b3\.stripedemos\.com\/create_payment_intent$ +200 +text/html +Content-Type: text/html;charset=utf-8 +Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 +Set-Cookie: rack.session=S0Guks2MVedQkUujUuSn%2FfL3BR0mCV8%2BQDmAH%2BXnAbuBK4KuHvR7mVPbsPB5X1bHprNrQzvW7f1g1zlcdV00R5gLn%2BfaVt95bmRow0EdZi7wSjnz0KjkUsUyZpUqHzkIOBpn24rjSPHqkgMTvJG9XbURWealdmODxGqz4DgeWPLu45B1aBsIL%2FLGlarO9RyLoaeMnkn4kvSJ5XGHC4D0%2Faz6djrY7fferbx07oSDwi0%3D; path=/ +Server: Google Frontend +x-cloud-trace-context: b8251b8d8af7e4da573517f3fe68383f +Via: 1.1 google +x-xss-protection: 1; mode=block +Date: Thu, 21 Nov 2024 22:24:23 GMT +x-robots-tag: noindex, nofollow +Content-Length: 147 +x-content-type-options: nosniff +x-frame-options: SAMEORIGIN + +{"intent":"pi_3QNinTFY0qyl6XeW0WcfkihY","secret":"pi_3QNinTFY0qyl6XeW0WcfkihY_secret_sPyOuYu1sYJBYfPyHvUaKMCfD","status":"requires_payment_method"} \ No newline at end of file diff --git a/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0006_get_v1_payment_intents_pi_3QNinTFY0qyl6XeW0WcfkihY.tail b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0006_get_v1_payment_intents_pi_3QNinTFY0qyl6XeW0WcfkihY.tail new file mode 100644 index 00000000000..7dcf6f0588d --- /dev/null +++ b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0006_get_v1_payment_intents_pi_3QNinTFY0qyl6XeW0WcfkihY.tail @@ -0,0 +1,65 @@ +GET +https:\/\/api\.stripe\.com\/v1\/payment_intents\/pi_3QNinTFY0qyl6XeW0WcfkihY\?client_secret=pi_3QNinTFY0qyl6XeW0WcfkihY_secret_sPyOuYu1sYJBYfPyHvUaKMCfD&expand%5B0%5D=payment_method$ +200 +application/json +access-control-allow-methods: GET, HEAD, PUT, PATCH, POST, DELETE +content-security-policy: report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' +Server: nginx +Cache-Control: no-cache, no-store +reporting-endpoints: coop="https://q.stripe.com/coop-report" +x-wc: A +Strict-Transport-Security: max-age=63072000; includeSubDomains; preload +cross-origin-opener-policy-report-only: same-origin; report-to="coop" +Access-Control-Allow-Origin: * +x-stripe-routing-context-priority-tier: api-testmode +x-stripe-priority-routing-enabled: true +report-to: {"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true} +request-id: req_WqYPGfK43ODUbQ +Content-Length: 891 +Vary: Origin +Date: Thu, 21 Nov 2024 22:24:23 GMT +stripe-version: 2020-08-27 +access-control-expose-headers: Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required +access-control-max-age: 300 +access-control-allow-credentials: true +Content-Type: application/json +x-content-type-options: nosniff + +{ + "payment_method_configuration_details" : null, + "canceled_at" : null, + "source" : null, + "amount" : 5050, + "capture_method" : "automatic", + "livemode" : false, + "shipping" : null, + "status" : "requires_payment_method", + "object" : "payment_intent", + "currency" : "usd", + "last_payment_error" : null, + "amount_subtotal" : 5050, + "automatic_payment_methods" : null, + "cancellation_reason" : null, + "next_action" : null, + "total_details" : { + "amount_discount" : 0, + "amount_tax" : 0 + }, + "payment_method" : null, + "client_secret" : "pi_3QNinTFY0qyl6XeW0WcfkihY_secret_sPyOuYu1sYJBYfPyHvUaKMCfD", + "id" : "pi_3QNinTFY0qyl6XeW0WcfkihY", + "confirmation_method" : "automatic", + "amount_details" : { + "tip" : { + + } + }, + "processing" : null, + "receipt_email" : null, + "payment_method_types" : [ + "crypto" + ], + "setup_future_usage" : null, + "created" : 1732227863, + "description" : null +} \ No newline at end of file diff --git a/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0007_post_v1_payment_intents_pi_3QNinTFY0qyl6XeW0WcfkihY_confirm.tail b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0007_post_v1_payment_intents_pi_3QNinTFY0qyl6XeW0WcfkihY_confirm.tail new file mode 100644 index 00000000000..540bf1cac0c --- /dev/null +++ b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0007_post_v1_payment_intents_pi_3QNinTFY0qyl6XeW0WcfkihY_confirm.tail @@ -0,0 +1,99 @@ +POST +https:\/\/api\.stripe\.com\/v1\/payment_intents\/pi_3QNinTFY0qyl6XeW0WcfkihY\/confirm$ +200 +application/json +access-control-allow-methods: GET, HEAD, PUT, PATCH, POST, DELETE +content-security-policy: report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent%2Fconfirm; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' +Server: nginx +Cache-Control: no-cache, no-store +reporting-endpoints: coop="https://q.stripe.com/coop-report" +x-wc: A +Strict-Transport-Security: max-age=63072000; includeSubDomains; preload +cross-origin-opener-policy-report-only: same-origin; report-to="coop" +Access-Control-Allow-Origin: * +stripe-should-retry: false +x-stripe-priority-routing-enabled: true +report-to: {"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true} +request-id: req_Sr414KkWhmKELi +x-stripe-routing-context-priority-tier: api-testmode +Content-Length: 1593 +Vary: Origin +Date: Thu, 21 Nov 2024 22:24:25 GMT +original-request: req_Sr414KkWhmKELi +stripe-version: 2020-08-27 +idempotency-key: ca95b041-4dd3-459d-9e37-0b54a93bdd31 +access-control-expose-headers: Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required +access-control-max-age: 300 +access-control-allow-credentials: true +Content-Type: application/json +x-content-type-options: nosniff +X-Stripe-Mock-Request: client_secret=pi_3QNinTFY0qyl6XeW0WcfkihY_secret_sPyOuYu1sYJBYfPyHvUaKMCfD&expand\[0]=payment_method&payment_method=pm_1QNinSFY0qyl6XeWIQQ1t8py&return_url=https%3A\/\/foo\.com&use_stripe_sdk=true + +{ + "payment_method_configuration_details" : null, + "canceled_at" : null, + "source" : null, + "amount" : 5050, + "capture_method" : "automatic", + "livemode" : false, + "shipping" : null, + "status" : "requires_action", + "object" : "payment_intent", + "currency" : "usd", + "last_payment_error" : null, + "amount_subtotal" : 5050, + "automatic_payment_methods" : null, + "cancellation_reason" : null, + "next_action" : { + "type" : "redirect_to_url", + "redirect_to_url" : { + "return_url" : "https:\/\/foo.com", + "url" : "https:\/\/pm-redirects.stripe.com\/authorize\/acct_1G6m1pFY0qyl6XeW\/pa_nonce_RGFIE4YA9dP308uCpgXw0Ty4sGrIgAH" + } + }, + "total_details" : { + "amount_discount" : 0, + "amount_tax" : 0 + }, + "payment_method" : { + "object" : "payment_method", + "crypto" : { + + }, + "id" : "pm_1QNinSFY0qyl6XeWIQQ1t8py", + "billing_details" : { + "email" : null, + "phone" : null, + "name" : null, + "address" : { + "state" : null, + "country" : null, + "line2" : null, + "city" : null, + "line1" : null, + "postal_code" : null + } + }, + "livemode" : false, + "created" : 1732227862, + "allow_redisplay" : "unspecified", + "type" : "crypto", + "customer" : null + }, + "client_secret" : "pi_3QNinTFY0qyl6XeW0WcfkihY_secret_sPyOuYu1sYJBYfPyHvUaKMCfD", + "id" : "pi_3QNinTFY0qyl6XeW0WcfkihY", + "confirmation_method" : "automatic", + "amount_details" : { + "tip" : { + + } + }, + "processing" : null, + "receipt_email" : null, + "payment_method_types" : [ + "crypto" + ], + "setup_future_usage" : null, + "created" : 1732227863, + "description" : null +} \ No newline at end of file diff --git a/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0008_get_v1_payment_intents_pi_3QNinTFY0qyl6XeW0WcfkihY.tail b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0008_get_v1_payment_intents_pi_3QNinTFY0qyl6XeW0WcfkihY.tail new file mode 100644 index 00000000000..71c19e3a726 --- /dev/null +++ b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0008_get_v1_payment_intents_pi_3QNinTFY0qyl6XeW0WcfkihY.tail @@ -0,0 +1,95 @@ +GET +https:\/\/api\.stripe\.com\/v1\/payment_intents\/pi_3QNinTFY0qyl6XeW0WcfkihY\?client_secret=pi_3QNinTFY0qyl6XeW0WcfkihY_secret_sPyOuYu1sYJBYfPyHvUaKMCfD&expand%5B0%5D=payment_method$ +200 +application/json +access-control-allow-methods: GET, HEAD, PUT, PATCH, POST, DELETE +content-security-policy: report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' +Server: nginx +Cache-Control: no-cache, no-store +reporting-endpoints: coop="https://q.stripe.com/coop-report" +x-wc: A +Strict-Transport-Security: max-age=63072000; includeSubDomains; preload +cross-origin-opener-policy-report-only: same-origin; report-to="coop" +Access-Control-Allow-Origin: * +x-stripe-routing-context-priority-tier: api-testmode +x-stripe-priority-routing-enabled: true +report-to: {"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true} +request-id: req_ifSsLyrcDGOWQs +Content-Length: 1593 +Vary: Origin +Date: Thu, 21 Nov 2024 22:24:25 GMT +stripe-version: 2020-08-27 +access-control-expose-headers: Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required +access-control-max-age: 300 +access-control-allow-credentials: true +Content-Type: application/json +x-content-type-options: nosniff + +{ + "payment_method_configuration_details" : null, + "canceled_at" : null, + "source" : null, + "amount" : 5050, + "capture_method" : "automatic", + "livemode" : false, + "shipping" : null, + "status" : "requires_action", + "object" : "payment_intent", + "currency" : "usd", + "last_payment_error" : null, + "amount_subtotal" : 5050, + "automatic_payment_methods" : null, + "cancellation_reason" : null, + "next_action" : { + "type" : "redirect_to_url", + "redirect_to_url" : { + "return_url" : "https:\/\/foo.com", + "url" : "https:\/\/pm-redirects.stripe.com\/authorize\/acct_1G6m1pFY0qyl6XeW\/pa_nonce_RGFIE4YA9dP308uCpgXw0Ty4sGrIgAH" + } + }, + "total_details" : { + "amount_discount" : 0, + "amount_tax" : 0 + }, + "payment_method" : { + "object" : "payment_method", + "crypto" : { + + }, + "id" : "pm_1QNinSFY0qyl6XeWIQQ1t8py", + "billing_details" : { + "email" : null, + "phone" : null, + "name" : null, + "address" : { + "state" : null, + "country" : null, + "line2" : null, + "city" : null, + "line1" : null, + "postal_code" : null + } + }, + "livemode" : false, + "created" : 1732227862, + "allow_redisplay" : "unspecified", + "type" : "crypto", + "customer" : null + }, + "client_secret" : "pi_3QNinTFY0qyl6XeW0WcfkihY_secret_sPyOuYu1sYJBYfPyHvUaKMCfD", + "id" : "pi_3QNinTFY0qyl6XeW0WcfkihY", + "confirmation_method" : "automatic", + "amount_details" : { + "tip" : { + + } + }, + "processing" : null, + "receipt_email" : null, + "payment_method_types" : [ + "crypto" + ], + "setup_future_usage" : null, + "created" : 1732227863, + "description" : null +} \ No newline at end of file diff --git a/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0009_post_v1_payment_methods.tail b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0009_post_v1_payment_methods.tail new file mode 100644 index 00000000000..152b85a8ae3 --- /dev/null +++ b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0009_post_v1_payment_methods.tail @@ -0,0 +1,56 @@ +POST +https:\/\/api\.stripe\.com\/v1\/payment_methods$ +200 +application/json +access-control-allow-methods: GET, HEAD, PUT, PATCH, POST, DELETE +content-security-policy: report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_methods; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' +Server: nginx +Cache-Control: no-cache, no-store +reporting-endpoints: coop="https://q.stripe.com/coop-report" +x-wc: A +Strict-Transport-Security: max-age=63072000; includeSubDomains; preload +cross-origin-opener-policy-report-only: same-origin; report-to="coop" +Access-Control-Allow-Origin: * +stripe-should-retry: false +x-stripe-priority-routing-enabled: true +report-to: {"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true} +request-id: req_SOr6UdOD1JKT22 +x-stripe-routing-context-priority-tier: api-testmode +Content-Length: 448 +Vary: Origin +Date: Thu, 21 Nov 2024 22:24:25 GMT +original-request: req_SOr6UdOD1JKT22 +stripe-version: 2020-08-27 +idempotency-key: f3a15b98-12bb-4124-8242-5070bc3961f3 +access-control-expose-headers: Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required +access-control-max-age: 300 +access-control-allow-credentials: true +Content-Type: application/json +x-content-type-options: nosniff +X-Stripe-Mock-Request: allow_redisplay=unspecified&payment_user_agent=.*&type=crypto + +{ + "object" : "payment_method", + "crypto" : { + + }, + "id" : "pm_1QNinVFY0qyl6XeWR3SgFsNF", + "billing_details" : { + "email" : null, + "phone" : null, + "name" : null, + "address" : { + "state" : null, + "country" : null, + "line2" : null, + "city" : null, + "line1" : null, + "postal_code" : null + } + }, + "livemode" : false, + "created" : 1732227865, + "allow_redisplay" : "unspecified", + "type" : "crypto", + "customer" : null +} \ No newline at end of file diff --git a/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0010_post_create_payment_intent.tail b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0010_post_create_payment_intent.tail new file mode 100644 index 00000000000..b368deb961f --- /dev/null +++ b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0010_post_create_payment_intent.tail @@ -0,0 +1,18 @@ +POST +https:\/\/stp-mobile-ci-test-backend-e1b3\.stripedemos\.com\/create_payment_intent$ +200 +text/html +Content-Type: text/html;charset=utf-8 +Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 +Set-Cookie: rack.session=kmJQWaxHfRN03QR4VRrKbkO1H1KwmnX6SE8ZjTbDndSs9FlTMVXPqNW27O9EnJch5T1J7EPSm2PLApnsOS4XmvVigr5pBt2rebJGXfabdSJJFoucVhVEpZhAlx%2BSBsz5ZbbHS3l8uZ1UrQo1KOTfZiElXk80KBqpoZQAc6uVjaiXeL1gnmyC4AdAIHNcub9D04DEukAGLjA9o1lQeju2%2F%2FLJ0cYtcxmiilRx6Vu%2BcL4%3D; path=/ +Server: Google Frontend +x-cloud-trace-context: f40c0d2986256339d960ebf45ea18c3d +Via: 1.1 google +x-xss-protection: 1; mode=block +Date: Thu, 21 Nov 2024 22:24:27 GMT +x-robots-tag: noindex, nofollow +Content-Length: 139 +x-content-type-options: nosniff +x-frame-options: SAMEORIGIN + +{"intent":"pi_3QNinWFY0qyl6XeW0J4Xxc2e","secret":"pi_3QNinWFY0qyl6XeW0J4Xxc2e_secret_fVMWTMGYoKR8wc2PmebPQqH1N","status":"requires_action"} \ No newline at end of file diff --git a/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0011_get_v1_payment_intents_pi_3QNinWFY0qyl6XeW0J4Xxc2e.tail b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0011_get_v1_payment_intents_pi_3QNinWFY0qyl6XeW0J4Xxc2e.tail new file mode 100644 index 00000000000..9b672de0f44 --- /dev/null +++ b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0011_get_v1_payment_intents_pi_3QNinWFY0qyl6XeW0J4Xxc2e.tail @@ -0,0 +1,95 @@ +GET +https:\/\/api\.stripe\.com\/v1\/payment_intents\/pi_3QNinWFY0qyl6XeW0J4Xxc2e\?client_secret=pi_3QNinWFY0qyl6XeW0J4Xxc2e_secret_fVMWTMGYoKR8wc2PmebPQqH1N&expand%5B0%5D=payment_method$ +200 +application/json +access-control-allow-methods: GET, HEAD, PUT, PATCH, POST, DELETE +content-security-policy: report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' +Server: nginx +Cache-Control: no-cache, no-store +reporting-endpoints: coop="https://q.stripe.com/coop-report" +x-wc: A +Strict-Transport-Security: max-age=63072000; includeSubDomains; preload +cross-origin-opener-policy-report-only: same-origin; report-to="coop" +Access-Control-Allow-Origin: * +x-stripe-routing-context-priority-tier: api-testmode +x-stripe-priority-routing-enabled: true +report-to: {"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true} +request-id: req_LYhtmpYwGrmCoO +Content-Length: 1587 +Vary: Origin +Date: Thu, 21 Nov 2024 22:24:28 GMT +stripe-version: 2020-08-27 +access-control-expose-headers: Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required +access-control-max-age: 300 +access-control-allow-credentials: true +Content-Type: application/json +x-content-type-options: nosniff + +{ + "payment_method_configuration_details" : null, + "canceled_at" : null, + "source" : null, + "amount" : 5050, + "capture_method" : "automatic", + "livemode" : false, + "shipping" : null, + "status" : "requires_action", + "object" : "payment_intent", + "currency" : "usd", + "last_payment_error" : null, + "amount_subtotal" : 5050, + "automatic_payment_methods" : null, + "cancellation_reason" : null, + "next_action" : { + "type" : "redirect_to_url", + "redirect_to_url" : { + "return_url" : "foo:\/\/bar", + "url" : "https:\/\/pm-redirects.stripe.com\/authorize\/acct_1G6m1pFY0qyl6XeW\/pa_nonce_RGFI0sptwFW2aKeCBCEYyXzIQKbrt4J" + } + }, + "total_details" : { + "amount_discount" : 0, + "amount_tax" : 0 + }, + "payment_method" : { + "object" : "payment_method", + "crypto" : { + + }, + "id" : "pm_1QNinVFY0qyl6XeWR3SgFsNF", + "billing_details" : { + "email" : null, + "phone" : null, + "name" : null, + "address" : { + "state" : null, + "country" : null, + "line2" : null, + "city" : null, + "line1" : null, + "postal_code" : null + } + }, + "livemode" : false, + "created" : 1732227865, + "allow_redisplay" : "unspecified", + "type" : "crypto", + "customer" : null + }, + "client_secret" : "pi_3QNinWFY0qyl6XeW0J4Xxc2e_secret_fVMWTMGYoKR8wc2PmebPQqH1N", + "id" : "pi_3QNinWFY0qyl6XeW0J4Xxc2e", + "confirmation_method" : "automatic", + "amount_details" : { + "tip" : { + + } + }, + "processing" : null, + "receipt_email" : null, + "payment_method_types" : [ + "crypto" + ], + "setup_future_usage" : null, + "created" : 1732227866, + "description" : null +} \ No newline at end of file diff --git a/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0012_get_v1_payment_intents_pi_3QNinWFY0qyl6XeW0J4Xxc2e.tail b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0012_get_v1_payment_intents_pi_3QNinWFY0qyl6XeW0J4Xxc2e.tail new file mode 100644 index 00000000000..ecaa5b567d1 --- /dev/null +++ b/StripePayments/StripePaymentsTestUtils/Resources/recorded_network_traffic/PaymentSheetLPMConfirmFlowTests/testCryptoConfirmFlows/0012_get_v1_payment_intents_pi_3QNinWFY0qyl6XeW0J4Xxc2e.tail @@ -0,0 +1,95 @@ +GET +https:\/\/api\.stripe\.com\/v1\/payment_intents\/pi_3QNinWFY0qyl6XeW0J4Xxc2e\?client_secret=pi_3QNinWFY0qyl6XeW0J4Xxc2e_secret_fVMWTMGYoKR8wc2PmebPQqH1N&expand%5B0%5D=payment_method$ +200 +application/json +access-control-allow-methods: GET, HEAD, PUT, PATCH, POST, DELETE +content-security-policy: report-uri https://q.stripe.com/csp-report?p=v1%2Fpayment_intents%2F%3Aintent; block-all-mixed-content; default-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; img-src 'self'; script-src 'self' 'report-sample'; style-src 'self' +Server: nginx +Cache-Control: no-cache, no-store +reporting-endpoints: coop="https://q.stripe.com/coop-report" +x-wc: A +Strict-Transport-Security: max-age=63072000; includeSubDomains; preload +cross-origin-opener-policy-report-only: same-origin; report-to="coop" +Access-Control-Allow-Origin: * +x-stripe-routing-context-priority-tier: api-testmode +x-stripe-priority-routing-enabled: true +report-to: {"group":"coop","max_age":8640,"endpoints":[{"url":"https://q.stripe.com/coop-report"}],"include_subdomains":true} +request-id: req_JyMkezze8x4NaK +Content-Length: 1587 +Vary: Origin +Date: Thu, 21 Nov 2024 22:24:28 GMT +stripe-version: 2020-08-27 +access-control-expose-headers: Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required +access-control-max-age: 300 +access-control-allow-credentials: true +Content-Type: application/json +x-content-type-options: nosniff + +{ + "payment_method_configuration_details" : null, + "canceled_at" : null, + "source" : null, + "amount" : 5050, + "capture_method" : "automatic", + "livemode" : false, + "shipping" : null, + "status" : "requires_action", + "object" : "payment_intent", + "currency" : "usd", + "last_payment_error" : null, + "amount_subtotal" : 5050, + "automatic_payment_methods" : null, + "cancellation_reason" : null, + "next_action" : { + "type" : "redirect_to_url", + "redirect_to_url" : { + "return_url" : "foo:\/\/bar", + "url" : "https:\/\/pm-redirects.stripe.com\/authorize\/acct_1G6m1pFY0qyl6XeW\/pa_nonce_RGFI0sptwFW2aKeCBCEYyXzIQKbrt4J" + } + }, + "total_details" : { + "amount_discount" : 0, + "amount_tax" : 0 + }, + "payment_method" : { + "object" : "payment_method", + "crypto" : { + + }, + "id" : "pm_1QNinVFY0qyl6XeWR3SgFsNF", + "billing_details" : { + "email" : null, + "phone" : null, + "name" : null, + "address" : { + "state" : null, + "country" : null, + "line2" : null, + "city" : null, + "line1" : null, + "postal_code" : null + } + }, + "livemode" : false, + "created" : 1732227865, + "allow_redisplay" : "unspecified", + "type" : "crypto", + "customer" : null + }, + "client_secret" : "pi_3QNinWFY0qyl6XeW0J4Xxc2e_secret_fVMWTMGYoKR8wc2PmebPQqH1N", + "id" : "pi_3QNinWFY0qyl6XeW0J4Xxc2e", + "confirmation_method" : "automatic", + "amount_details" : { + "tip" : { + + } + }, + "processing" : null, + "receipt_email" : null, + "payment_method_types" : [ + "crypto" + ], + "setup_future_usage" : null, + "created" : 1732227866, + "description" : null +} \ No newline at end of file