use of uk.gov.pay.connector.model.domain.AuthCardDetailsFixture.anAuthCardDetails in project pay-connector by alphagov.
the class StripePaymentProviderTest method shouldAuthoriseSuccessfully_WithCanadaAddress.
@Test
public void shouldAuthoriseSuccessfully_WithCanadaAddress() {
Address canadaAddress = new Address();
canadaAddress.setLine1("125 Kingsway");
canadaAddress.setLine2("Aviation House");
canadaAddress.setPostcode("X0A0A0");
canadaAddress.setCity("Arctic Bay");
canadaAddress.setCountry("CA");
AuthCardDetails authCardDetails = AuthCardDetailsFixture.anAuthCardDetails().withAddress(canadaAddress).withEndDate(CardExpiryDate.valueOf("01/30")).build();
CardAuthorisationGatewayRequest request = CardAuthorisationGatewayRequest.valueOf(getCharge(), authCardDetails);
GatewayResponse gatewayResponse = stripePaymentProvider.authorise(request);
assertTrue(gatewayResponse.isSuccessful());
}
use of uk.gov.pay.connector.model.domain.AuthCardDetailsFixture.anAuthCardDetails in project pay-connector by alphagov.
the class StripePaymentProviderTest method shouldAuthoriseSuccessfully_WithNoBillingAddress.
@Test
public void shouldAuthoriseSuccessfully_WithNoBillingAddress() {
AuthCardDetails authCardDetails = AuthCardDetailsFixture.anAuthCardDetails().withAddress(null).withEndDate(CardExpiryDate.valueOf("01/30")).build();
CardAuthorisationGatewayRequest request = CardAuthorisationGatewayRequest.valueOf(getCharge(), authCardDetails);
GatewayResponse gatewayResponse = stripePaymentProvider.authorise(request);
assertTrue(gatewayResponse.isSuccessful());
}
use of uk.gov.pay.connector.model.domain.AuthCardDetailsFixture.anAuthCardDetails in project pay-connector by alphagov.
the class StripePaymentProviderTest method shouldAuthoriseSuccessfully_WithUsAddress.
@Test
public void shouldAuthoriseSuccessfully_WithUsAddress() {
Address usAddress = new Address();
usAddress.setLine1("125 Kingsway");
usAddress.setLine2("Aviation House");
usAddress.setCity("Washington D.C.");
usAddress.setPostcode("20500");
usAddress.setCountry("US");
AuthCardDetails authCardDetails = AuthCardDetailsFixture.anAuthCardDetails().withAddress(usAddress).withEndDate(CardExpiryDate.valueOf("01/30")).build();
CardAuthorisationGatewayRequest request = CardAuthorisationGatewayRequest.valueOf(getCharge(), authCardDetails);
GatewayResponse gatewayResponse = stripePaymentProvider.authorise(request);
assertTrue(gatewayResponse.isSuccessful());
}
Aggregations