> For the complete documentation index, see [llms.txt](https://docs.ecommerce.seb.ee/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ecommerce.seb.ee/integration/web-plugins/magento-2/testing-and-go-live.md).

# Testing & go-live

End-to-end test flow and go-live checklist for the SEB E-commerce Payment Gateway module for Magento 2

## Test in Sandbox

Prerequisites: module [installed](/integration/web-plugins/magento-2/installation.md) and [configured](/integration/web-plugins/magento-2/configuration.md) with Environment = *Sandbox*, sandbox credentials entered, callback URL registered in the Merchant Portal at <https://merchantportal.ecommerce.sebgroup.com>.

For test cards and magic values, see [Sandbox test data](/guides/sandbox.md).

The end-to-end test script:

1. **Place an order** in the storefront with *Online Payment*; you are redirected to the SEB E-commerce Payment Gateway payment page.
2. **Pay with a test card:** use the test card number for successful authorization, any cardholder name, any valid future expiry date (e.g. 12/28) and any 3-digit CVV (e.g. 123). You return to the store and land on the success page.
3. **Verify the order** in **Sales → Orders**: the order email was sent, an invoice exists (captured if your shop uses final authorization; open if pre-authorization). The gateway payment ID isn't shown anywhere in the Magento admin UI — match orders to the Merchant Portal by amount and timestamp, or look them up by order ID with your support contact.
4. **Verify the callback**: repeat the test but close the browser right after paying without returning to the shop. The order must still be confirmed within a few minutes — if not, the callback URL isn't reachable.
5. **Capture** (pre-authorization shops): capture in the Merchant Portal; the Magento invoice must capture and the invoice email must be sent.
6. **Fail one on purpose:** either cancel on the payment page, or pay with the test card for declined authorization, which always fails authorization. The order must be cancelled and your cart restored at checkout.

![The Luma checkout payment step with Online Payment selected, and beside it Sales → Orders showing the resulting order.](https://1157570179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuBDtfypkI85zidcVwaDj%2Fuploads%2Fu9wEgYP8Cc3RNwqfTSEN%2Fm2-checkout-and-orders-grid.png?alt=media)

## Go-live checklist

* [ ] Sandbox script fully passed
* [ ] Live OAuth2 credentials obtained from the Merchant Portal → **Settings → Shop Settings → Technical Information**
* [ ] **Environment** switched to *Live*, credentials saved, cache flushed
* [ ] Callback URL registered for the live shop in the Merchant Portal; `/rest/V1/egw/payment/status` reachable from outside (no WAF/cache block)
* [ ] One real low-value order: paid → invoice captured
* [ ] Production mode: `setup:di:compile` + static content deployed after configuration

For support: module version, Magento version, order increment ID, payment ID, and relevant lines from `var/log/egw_checkout/app.log` → SEB support.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ecommerce.seb.ee/integration/web-plugins/magento-2/testing-and-go-live.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
