1. Getting started

Please read the Feature Testing documentation before starting : https://github.com/openfoodfoundation/openfoodnetwork/wiki/Feature-Testing-Handbook

What kind of browsers and devices are we aiming to be compliant with?

Latest version of Firefox, Chrome and Safari, both mobile and desktop.

How can I test payment on OFN?

Don’t pay with real money, there are sandboxes for this :-)

Stripe

Use the Test Card Numbers page here : https://stripe.com/docs/testing

To have a various number of credit card that can lead to various cases (failure, success, missing field…)

It’s also useful to check the state of payments on Stripe Dashboard https://dashboard.stripe.com/test/dashboard (you’ll need to register and associate your hub/shop with your account)

Connect the hub/shop with Stripe, under Payment Methods (Admin). After doing this, it is possible to create two distinct Stripe payment methods, using either Stripe SCA or Stripe (Connect) as Provider for the service.

At the time of writing, these operations should work for both Stripe SCA and Stripe Connect, with basic test cards. This should work as well for Stripe SCA with cards requiring further 3D authentication.

Frontoffice tests

  • make a payment without saving a card

  • make a payment saving card

  • make a payment using previously saved card

  • add a card on account section and use it to checkout

  • delete saved card

  • capture the payment in the admin payments section of an order

  • as a user authorize a hub to use your card and verify the subscription payments work with that card

Backoffice tests - with basic test cards

  • After authorizing a hub to use your card (as a user):

  • Add an order under under /admin/orders -> New order

  • Check out using Stripe SCA and Stripe Connect as payment methods

  • Refunds: Cancel a Stripe payment in the Backoffice

All payments and payment attempts should be checked under https://dashboard.stripe.com/test/dashboard

Paypal

You can register an account with Paypal and create a test account: https://developer.paypal.com/developer/accounts/

  1. Create account in paypal - https://www.paypal.com/welcome/signup

  2. Create sandbox accounts (I think they are created automatically after creating a paypal account) - https://developer.paypal.com/developer/accounts/

  3. Verify your email

  4. Copy credentials - https://developer.paypal.com/developer/accounts/

    1. Go to API Credentials and store username, password and signature

  5. You can then use these detail to create a payment method in OFN.

When trying to pay with Paypal it will want you to log in. Create a buyer account with your developer test account (but I think it is done automatically. Once logged in your this buyer account account, you can checkout on the OFN and select "pay with visa card" for example without entering details and it should work.

You can then login to the sandbox environment, which replicates the production environment for a Paypal shop: https://developer.paypal.com/docs/business/test-and-go-live/sandbox/

  • You can login with the credentials found in the list of Business account set up for a OFN payment method - These are found in https://developer.paypal.com/developer/accounts/. After logging in you can check whether payments arrived this account, and choose to capture them, or take other actions.

Problems with PR staging?

In this page : https://semaphoreci.com/openfoodfoundation/openfoodnetwork-2/branches/dependabot-bundler-sass-3-4-25/builds/4 you can click "deploy failed" to get to https://semaphoreci.com/openfoodfoundation/openfoodnetwork-2/servers/au-staging/deploys/125 where you can open the last tab before the red one (it starts with git push -f [openfoodnetwork@staging.openfoodnetwork.org](mailto:openfoodnetwork@staging.openfoodnetwork.org)"), if you scroll down or search for failed you will see the error.

Some Differences in Staging Servers (as of 01.11.2020)

UK and AU are great for performance tests:

  • DOrV-Online enterprise has 10000 product on staging-AU

  • staging-UK has plenty of enterprises

Product Import

  • Each staging server may be configured differently, .csv files used for importing products probably won’t work throughout all staging servers. Examples:

    • Category (category): in UK possible value is “Fruit & Vegetables” whereas in FR and KA only accepts “Fruit”

    • Tax Category (tax_category): KA and FR requires a value in this field, otherwise product import fails. For ES possible value may be to be “IVA Espanyol”.

Last updated