logApiCall(loggingParams, loggingOptions, loggingResponseListener); final String paymentIntentId = PaymentIntent.parseIdFromClientSecret( paymentIntentParams.getClientSecret()); final StripeResponse response = requestData(GET, retrievePaymentIntentUrl(paymentIntentId), paramMap, options);
logApiCall(loggingParams, loggingOptions, loggingResponseListener); final String paymentIntentId = PaymentIntent.parseIdFromClientSecret( paymentIntentParams.getClientSecret()); final StripeResponse response = requestData( POST, confirmPaymentIntentUrl(paymentIntentId), paramMap, options);
@Test public void createConfirmPaymentIntentWithSourceIdParams_withAllFields_hasExpectedFields() { PaymentIntentParams params = PaymentIntentParams.createConfirmPaymentIntentWithSourceIdParams( TEST_SOURCE_ID, TEST_CLIENT_SECRET, TEST_RETURN_URL); Assert.assertEquals(TEST_CLIENT_SECRET, params.getClientSecret()); Assert.assertEquals(TEST_RETURN_URL, params.getReturnUrl()); Assert.assertEquals(TEST_SOURCE_ID, params.getSourceId()); }
@Test public void createConfirmPaymentIntentWithSourceDataParams_withAllFields_hasExpectedFields() { SourceParams sourceParams = SourceParams.createCardParams(FULL_FIELDS_VISA_CARD); PaymentIntentParams params = PaymentIntentParams.createConfirmPaymentIntentWithSourceDataParams( sourceParams, TEST_CLIENT_SECRET, TEST_RETURN_URL); Assert.assertEquals(TEST_CLIENT_SECRET, params.getClientSecret()); Assert.assertEquals(TEST_RETURN_URL, params.getReturnUrl()); Assert.assertEquals(sourceParams, params.getSourceParams()); }
@Test public void createRetrievePaymentIntentWithSourceIdParams_hasExpectedFields() { PaymentIntentParams params = PaymentIntentParams.createRetrievePaymentIntentParams( TEST_CLIENT_SECRET); Assert.assertEquals(TEST_CLIENT_SECRET, params.getClientSecret()); Assert.assertNull(params.getReturnUrl()); Assert.assertNull(params.getExtraParams()); Assert.assertNull(params.getSourceId()); Assert.assertNull(params.getSourceParams()); }