Acas copy change
PaymentGatewayCheck

PaymentGatewayCheck periodically polls the payment gateway to determine its
availability status. PaymentGatewayCheck.available? returns the last result.
The check is made in a background thread.

This commit also introduces a generic PeriodicTask class, which other projects
may find reusable for these kind of lightweight tasks.
You can always rely on Travis to expose a race condtion. Cheers pal. xxx
"Gratuituous metaprogramming" cc @threedaymonk 😂
ClaimFeeCalculator

Original behaviour was incorrect. I have amended it to what I now understand
as correct and I am waiting on Helen to confirm.

Changes:

 - If there is one claimant and they are applying for remission, the remission
   amount is 100% of the application fee
 - Simplification of the specs.
Claim#payment_applicable?

Returns true if all of the following are true:

 - The payment gateway is available (PaymentGatewaycheck.available?)
 - The claim has a fee group reference
 - The application fee after remissions have been applied is > 0

Returns false all other times
Claim::FiniteStateMachine

Add an FSM to Claim to manage state transtions when submitting
PaymentGateway::Request & PaymentGateway::Response

PaymentGateway::Request prepares the form params for redircting to
the payment gateway including a cryptographic signature

PaymentGateway::Response validates the incoming request as redirected
by the gateway. This includes verifying the cryptographic signature
and providing convenience methods to reveal pertinent information
from the response
git mv PaymentGatewayCheck PaymentGateway
ClaimReviewsController & PaymentsController

ClaimReviewsController#update seals the claim and redirects to
payments page

PaymentsController#show renders EPDQ redirect form
Nix payments exception and cancel URLs

We don't require that level of granularity as we submit the claim
regardless of payment capture outcome.
BarclayCard Integration

Changes:

 - Handle return request from BC
 - Verify authenticity of above requests
 - Don't render payments page if no payment is required
 - Various filters to ensure pages can't be viewed unless application session
   is in correct state
 - Stub claim confirmation page
Merge pull request #68 from ministryofjustice/barclaycard

BarclayCard integration
Remove dead, unused code.
Merge pull request #102 from ministryofjustice/test-coverage

Remove dead, unused code.
allow blank postcode for work address (which is optional)
Merge pull request #103 from ministryofjustice/allow_blank_postcode

allow blank postcode for work address (which is optional)
PaymentGateway

Assume payment gateway is up until we find it isn't. Because classes are
reloaded every request in development, it creates a race condition where
PaymentGateway.available? may be nil in the request. Because classes are
cached in test and also eager loaded in production this shouldn't be a problem
in those environments, but it's annoying in development
Merge pull request #104 from ministryofjustice/fix-gateway-pinger

PaymentGateway dev fix
confirmation email