Testing a payment gateway integration

Testing the integration itself

  1. On a LearningBuilder™ support site, set up the Payment Gateway in a test mode.

    • Attempt an invalid payment (using an expiration date in the past)

    • Attempt a valid `payment (using the special credit card number)

  2. On the LearningBuilder™ support site, set up the Payment Gateway in a live mode.

    • Attempt an invalid payment (using an expiration date in the past)

    • Attempt a valid payment (using a real credit card and a small payment amount; e.g. $0.02)

  3. On the LearningBuilder™ live site, set up the Payment Gateway to match the support site.

    • Attempt an invalid payment (using an expiration date in the past)

  4. On the LearningBuilder™ support site, set the Payment Gateway back into a test mode.

Testing the flow through LearningBuilder, without an actual integration

Testing payment gateway settings

If you append "Fake" to the end of the PaymentGateway app config value, the system will simulate connecting to the gateway without actually doing so. This is useful when testing in a non-production environment.

The Fake gateways support three simulated responses:

  • FirstName = "MissingId": This will result in an Approval but no Transaction ID

  • FirstName = "Decline": This will result in a Declined status.

  • FirstName = Anything else: This will result in an approval.