Search in sources :

Example 1 with AddChargeParams

use of uk.gov.pay.connector.util.AddChargeParams in project pay-connector by alphagov.

the class ContractTest method aChargeWithIdExists.

@State("Gateway account 42 exists and has a charge for £1 with id abc123")
public void aChargeWithIdExists() {
    long accountId = 42;
    GatewayAccountUtil.setUpGatewayAccount(dbHelper, accountId);
    AddChargeParams addChargeParams = anAddChargeParams().withExternalChargeId("abc123").withGatewayAccountId(String.valueOf(accountId)).withTransactionId("aGatewayTransactionId").withAmount(100).withStatus(ChargeStatus.CAPTURED).build();
    dbHelper.addCharge(addChargeParams);
    dbHelper.updateChargeCardDetails(addChargeParams.getChargeId(), AuthCardDetailsFixture.anAuthCardDetails().build());
}
Also used : AddChargeParams(uk.gov.pay.connector.util.AddChargeParams) AddChargeParamsBuilder.anAddChargeParams(uk.gov.pay.connector.util.AddChargeParams.AddChargeParamsBuilder.anAddChargeParams) State(au.com.dius.pact.provider.junit.State) GatewayAccountCredentialState(uk.gov.pay.connector.gatewayaccountcredentials.model.GatewayAccountCredentialState)

Aggregations

State (au.com.dius.pact.provider.junit.State)1 GatewayAccountCredentialState (uk.gov.pay.connector.gatewayaccountcredentials.model.GatewayAccountCredentialState)1 AddChargeParams (uk.gov.pay.connector.util.AddChargeParams)1 AddChargeParamsBuilder.anAddChargeParams (uk.gov.pay.connector.util.AddChargeParams.AddChargeParamsBuilder.anAddChargeParams)1