3
votes

Hi I currently have a spree app and I'm trying to test out checkout in my preview environment, however it's not working. I have only have one payment method:

Credit Card     Gateway::Bogus  Preview     Both    Yes

but when I try to check out it says

Unable to Authorize Credit Card: Bogus Gateway: Forced failure.

However, in my staging environment, the checkout works with the same payment method configuration. Isn't the Bogus gateway supposed to just work since it's just for testing purposes? I'm really not familiar with spree (this is a legacy app), so any help to get me past the checkout is much appreciated. Let me know if you need more info.

2

2 Answers

10
votes

The source behind this will perhaps yield some insight:

https://github.com/spree/spree/blob/v2.1.2/core/app/models/spree/gateway/bogus.rb#L37-L41

The bogus gateway will only accept credit card numbers in the list at the top of the class. Are you using one of those numbers?

4
votes

To pass the checkout steps in other to place a successful test order follow the following steps.

Name on card

Enter Bogus Gateway

Credit card number

Enter each of these in turn to simulate different types of transaction:

  1. Enter 1 to simulate a successful transaction
  2. Enter 2 to simulate a failed transaction
  3. Enter 3 to simulate an Exception (this generates a message indicating that an error has occurred with the provider.)

CVV

Enter any 3-digit number (for example, 111.)

Expiry Date

Enter any date in the future.

Source Shopify