Skip to content

Commit acaeed4

Browse files
Update test.mdx
1 parent 2d39e40 commit acaeed4

File tree

1 file changed

+3
-105
lines changed

1 file changed

+3
-105
lines changed

docs/invoice/development-guide/test.mdx

Lines changed: 3 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -2,111 +2,9 @@
22
sidebar_position: 2
33
---
44

5-
import Tabs from "@theme/Tabs"
6-
import TabItem from "@theme/TabItem"
5+
:::caution
76

8-
# Test
7+
Please notice that as part of the merger between MobilePay and Norwegian Vipps, we will consolidate products on one joint platform.
8+
This product is now closed. Please visit our new developer documentation to see the new APIs we offer https://developer.vippsmobilepay.com/
99

10-
In this section, you will find information on testing, as well as test data. All users, items, and payment involved in Sandbox transactions are fictitious. You are able to test all the Invoice features, just as they are in the production environment. However, it is not possible to interact with the MobilePay app, therefor it is not possible to accept or reject invoices from the app. Instead, you have access to a testing API: Invoice User Simulation API , which makes it possible to imitate user actions
11-
12-
## Making the first call
13-
14-
**Step 1. Get Tokens**
15-
When you have gone through OpenID Connect, then you can start calling the API. All calls to Invoice endpoints require access tokens, and they are used to make API requests on behalf of a user. The content of the header should look like the following.
16-
17-
```json title="Header examples"
18-
accept: application/json
19-
content-type: application/json
20-
authorization:: REPLACE_THIS_VALUE
21-
```
22-
23-
We recommend you start with getting the MerchantId .
24-
25-
**Step 2. Get MerchantId**
26-
MerchantId is a unique identifier of a merchant in our system. After you retrieve an access token from OpenID flow use the following endpoint to retrieve your MerchantId.
27-
28-
`GET /api/v1/merchants/me`
29-
30-
**Step 3. Get Invoice Issuer**
31-
Afterwards you should get an invoice issuer. Invoice issuer represents merchant’s company information. The merchant is the customer company and the Invoice Issuer is the actual service provider name under which they create invoices
32-
33-
`GET /api/v1/merchants/{merchantId}/invoiceissuers`
34-
35-
Read more about Invoice Issuer on GitHub [here](https://mobilepaydev.github.io/MobilePay-Invoice/invoice_issuers)
36-
37-
## Test Actions
38-
**InvoiceDirect**
39-
40-
1. Create an [InvoiceDirect](https://mobilepaydev.github.io/MobilePay-Invoice/api_reference#direct)
41-
2. Create multiple [InvoiceDirect](https://mobilepaydev.github.io/MobilePay-Invoice/api_reference#direct)
42-
3. [Cancel an unpaid Invoice](https://mobilepaydev.github.io/MobilePay-Invoice/api_reference#canceling)
43-
44-
**InvoiceLink**
45-
46-
4. Create an Invoice Link
47-
5. Create multiple [InvoiceLink](https://mobilepaydev.github.io/MobilePay-Invoice/api_reference#link)
48-
49-
**Consent:**
50-
51-
6. Test [User Consent](https://mobilepaydev.github.io/MobilePay-Invoice/api_reference#direct-invoice-consent) for Invoice Direct
52-
53-
## User simulation API
54-
55-
We supply a testing API, Invoice User Simulation, that simulates user actions in the app. With the API, you can:
56-
57-
- Get an Invoice PDF
58-
- Accept an Invoice
59-
- Reject an Invoice
60-
- Test User Consent
61-
62-
We expect that you have simulated the 4 features listed above, before you start the verification process. Then it can be completed in a day. You should test both InvoiceDirect and InvoiceLink.
63-
64-
## Test users and test data
65-
66-
When testing Invoice, then you'll use the Invoice User Simulation API that you'll find [here](https://developer.mobilepay.dk/api/invoice). To create an Invoice, you must supply
67-
68-
- Authenticated user id
69-
- ConsumerCard
70-
- Phone number
71-
72-
Below you can find a list of test users for Denmark and Finland. If there is an issue with a test user, please try a different user, or contact us at [email protected]
73-
74-
:::note
75-
When testing Invoice payments in Sandbox remember to use the same authenticated user id for both creating and approving the invoice. The testusers are CPR validated, so the maximum amount is 3.000 kr., which is why we recommend that you test only using low amounts.
76-
:::
77-
78-
<Tabs
79-
defaultValue="dk"
80-
values={[
81-
{label: 'DK test users', value: 'dk'},
82-
{label: 'FI test users', value: 'fi'},
83-
]}>
84-
85-
86-
<TabItem value="dk">
87-
88-
|Authenticated user id | ConsumerCard | Phone number | Consumer name |
89-
|--|--|--|--|
90-
| f1a75bb4-c8a6-41f8-8603-4cf9278cd5ba | 6956b1ae-be59-4d7c-ba1c-8aa188db83b7 | +4557373259 | Test name|
91-
| 4f474aa2-6161-4094-97fd-62616ff3d21e | a6d8044d-176b-4639-a55f-d14d1ae11e28 | +4599592431 | Test name*|
92-
| d5e4e229-b482-4304-80f1-237d2a3abc48 | d77db24c-f078-4eaf-8026-fbaa8411a8fe | +4522509895 | Test name|
93-
| 40b881f7-ac3d-43bb-81e6-2ac9ef279d89 | 6cdf304d-d4c5-4126-9775-a286ce16838b | +4554048573 | Test name|
94-
| 147a8bbd-6a87-40e7-9980-937d1b8d0de4 | 9c55892e-66dc-41c8-b256-13bf599ac377 | +4585155935 | Test name|
95-
**Card is expired. Use this testuser to test error handling for failed card scenarios*
96-
97-
</TabItem>
98-
99-
<TabItem value="fi">
100-
101-
|Authenticated user id | ConsumerCard | Phone number | Consumer name |
102-
|--|--|--|--|
103-
| 439d1721-0a36-499f-b236-8bfc61c6cbb7 | b5f78182-e2ff-402e-a646-46c7da8459a0 | +358121161343 | FI Test name|
104-
| f5588bb0-d90d-419f-9ec5-7ef138c23f83 | d7328e72-7d21-4f7d-b7f4-9a6861551b70 | +358121161892 | FI Test name|
105-
106-
</TabItem>
107-
</Tabs>
108-
109-
:::note
110-
You cannot use the MobilePay app installed on your phone when you are testing in sandbox environment.
111-
Instead you must use the Invoice User Simulation API to simulate customer actions.
11210
:::

0 commit comments

Comments
 (0)