Documentation / Integration guide / Part 14 of 18

14. Test the integration

Build and test on a test publication before the first live view.

  • The test publication. The operator of Norspire creates a test publication for you in a sandbox. The sandbox uses test credentials. No real money moves, and no data of the sandbox reaches a production installation. In a shared sandbox, no admin moves the platform clock or runs the due jobs.
  • The test card. Pay with the test card 4242 4242 4242 4242, any future expiry date and any 3 digits. In Norway and Denmark, the Vipps MobilePay test environment gives the test payments.
  • The 2 key prefixes. A key of the sandbox starts with ns_sk_test_. A key of production starts with ns_sk_live_.
  • The problem code. A key of the other mode gets 401 key_mode_mismatch. A staging server with a live key, or a live server with a test key, fails with a named code.
  • The webhook endpoint. Add the endpoint of your staging site on the Webhooks tab of the test publication, for example https://staging.example.no/norspire/webhooks. A test checkout sends its events to your staging receiver, and the delivery log shows each attempt. A sandbox delivers webhooks to public addresses, and development delivers to localhost and *.localhost names only.
  • A warning. A staging site that uses a live key writes wall views and meter counts into the live Dashboard of the publication. Give your staging site a test key and its own site origin.

5 cases to test

  1. A visitor sees the offer box, and the raw HTML response has no paid part.
  2. A subscriber sees the paid part after a log-in from the embed.
  3. With Norspire stopped, a subscriber and a visitor both get the teaser and unavailable, and no paid part.
  4. With JavaScript off, the page shows the fallback links.
  5. A test checkout sends a signed event to your staging receiver, and your receiver lists it 1 time. A copy of the event with 1 changed character gets HTTP 400 and writes no new row.

Try the demo