From 47b28945f1015fc34a8e58b35faa8fdac1178dda Mon Sep 17 00:00:00 2001
From: "rebeka.burnett" <rebeka.burnett@vipps.no>
Date: Fri, 26 May 2023 13:25:37 +0200
Subject: [PATCH 1/4] Add link to the github repo for people viewing this page
 from the vipps website

---
 README.md | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 45d88d6..fb92144 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,9 @@ This repository contains the WordPress plugin "Login with Vipps".
 
 Login with Vipps is the easiest way to sign in and create an account. No need to worry about usernames and passwords.
 
-See the main GitHub page for Vipps contact information, etc: [https://github.com/vippsas](https://github.com/vippsas)
+To contact Vipps, see the [contact us](https://developer.vippsmobilepay.com/docs/vipps-developers/contact/) page.
+
+This plugin is hosted on [GitHub](https://github.com/vippsas/vipps-login-wordpress).
 
 ## Description
 Login with Vipps is the easiest way to sign in and create an account. No need to worry about usernames and passwords. All you need to sign in is your phone number. Vipps, and you are logged in. Fully integrated with WooCommerce. Easy to customize for your own applications.
@@ -35,7 +37,7 @@ Allows login and registration on your account pages, cart, checkout and via shor
 Users don't need to worry about forgetting usernames and passwords. All they need to sign in is their phone number. For an even smoother sign in experience, the user can choose to be remembered in the browser, enabling automatic sign-ins for later visits.
 
 ### User can register with one click 
-Login with Vipps is the easiest way to create a new account. Sharing high-quality data from the user's Vipps profile with the site owner. Available information includes name, email, address, phone number, and birth date. The identity of all Vipps users is verified using BankID, Norway's leading electronic ID, so rest assured that these are real people with correct name and information.  (Please note: Standard WordPress does not register information other than name and email, so apart from WooCommerce, you will need to write code to use this information for your particular application.)
+Login with Vipps is the easiest way to create a new account. Sharing high-quality data from the user's Vipps profile with the site owner. Available information includes name, email, address, phone number, and birthdate. The identity of all Vipps users is verified using BankID, Norway's leading electronic ID, so rest assured that these are real people with correct name and information.  (Please note: Standard WordPress does not register information other than name and email, so apart from WooCommerce, you will need to write code to use this information for your particular application.)
 
 
 ### Link existing account 
@@ -69,7 +71,7 @@ Logging into basic Wordpress and into an application like WooCommerce is differe
   * Filter 'continue_with_vipps_*your application*_create_userdata'. For newly registered users, takes an array to be passed to wp_update_user, an array of userinfo from Vipps, and a session. You can here add your extra meta fields
   * Filter 'continue_with_vipps_*your application*_allow_login'. Takes a truth value, a user object, userinfo from Vipps and a session, and returns true only if the user is allowed to log in
 ###  Adding another 'action' apart from logging in 
-You may want to do other things than logging in with the users' confirmed Vipps identity, and this plugin absolutely allows this. This might be submisssions of comments, reviews and so forth without requiring logins, or even just as a convenient way of letting users input their address.
+You may want to do other things than logging in with the users' confirmed Vipps identity, and this plugin absolutely allows this. This might be submissions of comments, reviews and so forth without requiring logins, or even just as a convenient way of letting users input their address.
 
 These are the main steps:
  * Define your own action, like 'submitaddress'.

From 542f7c4a6e565a7fc3b6edee21304cbe064583fb Mon Sep 17 00:00:00 2001
From: "rebeka.burnett" <rebeka.burnett@vipps.no>
Date: Fri, 26 May 2023 13:39:24 +0200
Subject: [PATCH 2/4] Fix typos

---
 README.md  | 6 +++---
 readme.txt | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index fb92144..447dbf5 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ Login with Vipps suits all websites that need users to sign in and want to tailo
  * 
 ## Requirements
 
- * Wordpress version 4.9 or above
+ * WordPress version 4.9 or above
  * PHP version 7.0 or above
  * Your website must have an SSL certificate and be available through HTTPS
  * OpenSSL must be configured for your PHP installation
@@ -76,9 +76,9 @@ You may want to do other things than logging in with the users' confirmed Vipps
 These are the main steps:
  * Define your own action, like 'submitaddress'.
  * Create your button. The handler should call the static method `ContinueWithVipps::getAuthRedirect($action)` (you can also provide an array of sessiondata which will be available in your handlers, and restrict the scope of the data to retrieve from Vipps. The return value is an URL to which you should redirect your user.
- * Create your success handler. This should be
+ * Create your success handler.
  * Create your error handler. This should be hooked to 'continue_with_vipps_error_*your action*'. It will receive an error string, a description of the error, sometimes an error hint, and the contents of your session (which will no longer be active). You will need to redirect to your error page here, and show your user the error. The redirect is important, you should not output content in this action.
- * Create your succes handler. This should be hooked to 'continue_with_vipps_*your action*'. It will recieve an array of user information from Vipps, and a live session. This handler too should end with a redirect to your success page.
+ * Create your success handler. This should be hooked to 'continue_with_vipps_*your action*'. It will receive an array of user information from Vipps, and a live session. This handler too should end with a redirect to your success page.
 
 The rest is a simple matter of programming.
 
diff --git a/readme.txt b/readme.txt
index 364a7f0..392d416 100644
--- a/readme.txt
+++ b/readme.txt
@@ -72,7 +72,7 @@ You can use the framework of this plugin to implement other solutions that requi
 == Installation ==
 **If you are an existing Vipps customer**, log onto the Vipps portal https://portal.vipps.no and retreive your API keys that you will need to install Login with Vipps
 
-**If you are a new Vipps customer**, apply for an account [here](https://vipps.no/signup/logginnmedvipps) - before downloading the plugin. Choose "Integration through your partner", or if you don't know your partner, choose "direct integration" and fill out the form. When your application is approved, you will recieve the API keys that you will need to install the plugin.
+**If you are a new Vipps customer**, apply for an account [here](https://vipps.no/signup/logginnmedvipps) - before downloading the plugin. Choose "Integration through your partner", or if you don't know your partner, choose "direct integration" and fill out the form. When your application is approved, you will receive the API keys that you will need to install the plugin.
 
  1. Install the plugin using WordPress' [built-in installer](https://codex.wordpress.org/Managing_Plugins#Installing_Plugins). The plugin can also be installed manually by upload the plugin files to the /wp-content/plugins/ directory.
  2. Activate the plugin through the \'Plugins\' screen in WordPress.
@@ -113,7 +113,7 @@ These are the main steps:
  * Define your own action, like 'submitaddress'.
  * Create your button. The handler should call the static method `ContinueWithVipps::getAuthRedirect($action)` (you can also provide an array of sessiondata which will be available in your handlers, and restrict the scope of the data to retrieve from Vipps. The return value is an URL to which you should redirect your user.
  * Create your error handler. This should be hooked to 'continue_with_vipps_error_*your action*'. It will receive an error string, a description of the error, sometimes an error hint, and the contents of your session (which will no longer be active). You will need to redirect to your error page here, and show your user the error. The redirect is important, you should not output content in this action.
- * Create your succes handler. This should be hooked to 'continue_with_vipps_*your action*'. It will recieve an array of user information from Vipps, and a live session. This handler too should end with a redirect to your success page. 
+ * Create your succes handler. This should be hooked to 'continue_with_vipps_*your action*'. It will receive an array of user information from Vipps, and a live session. This handler too should end with a redirect to your success page. 
 
 The rest is a simple matter of programming.
 

From 62c36ea5de20e78b9b3a896e9c7523acd6c53d50 Mon Sep 17 00:00:00 2001
From: "rebeka.burnett" <rebeka.burnett@vipps.no>
Date: Fri, 26 May 2023 13:42:17 +0200
Subject: [PATCH 3/4] Tweaks for lint editor

---
 README.md | 41 ++++++++++++++++++++++++++++-------------
 1 file changed, 28 insertions(+), 13 deletions(-)

diff --git a/README.md b/README.md
index 447dbf5..05e7ef5 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,7 @@ To contact Vipps, see the [contact us](https://developer.vippsmobilepay.com/docs
 This plugin is hosted on [GitHub](https://github.com/vippsas/vipps-login-wordpress).
 
 ## Description
+
 Login with Vipps is the easiest way to sign in and create an account. No need to worry about usernames and passwords. All you need to sign in is your phone number. Vipps, and you are logged in. Fully integrated with WooCommerce. Easy to customize for your own applications.
 
 Vipps is the leading smart payment app in Norway, used by more than 75% of Norwegians and tops the list of most positive word of mouth for any brand.
@@ -29,38 +30,49 @@ Login with Vipps suits all websites that need users to sign in and want to tailo
  * The port 443 must be open for outward traffic on your servers firewall
 
 
-## Feature Highlights 
-### Fully integrated with WooCommerce 
+## Feature Highlights
+
+### Fully integrated with WooCommerce
+
 Allows login and registration on your account pages, cart, checkout and via shortcodes. Addresses automatically synchronized with Vipps on login.
 
 ### No need for usernames and passwords
+
 Users don't need to worry about forgetting usernames and passwords. All they need to sign in is their phone number. For an even smoother sign in experience, the user can choose to be remembered in the browser, enabling automatic sign-ins for later visits.
 
-### User can register with one click 
+### User can register with one click
+
 Login with Vipps is the easiest way to create a new account. Sharing high-quality data from the user's Vipps profile with the site owner. Available information includes name, email, address, phone number, and birthdate. The identity of all Vipps users is verified using BankID, Norway's leading electronic ID, so rest assured that these are real people with correct name and information.  (Please note: Standard WordPress does not register information other than name and email, so apart from WooCommerce, you will need to write code to use this information for your particular application.)
 
 
-### Link existing account 
+### Link existing account
+
 Already registered users can link their current accounts when signing in with Vipps or from their account page. Users can choose to update their address information from Vipps.
 
 ### Fully integrated with WooCommerce and available for all relevant areas of your store
-Login with Vipps can be added to all relevant pages in your webshop: login, registration, cart, and checkout pages.
+
+Login with Vipps can be added to all relevant pages in your web shop: login, registration, cart, and checkout pages.
 
 ### Free of charge
+
 Login with Vipps is free of charge for site owners and end-users. Merchants that already use Vipps online payment can add Sign in with Vipps to their account at [https://portal.vipps.no](https://portal.vipps.no). New site owners need to set-up an agreement with Vipps to use the service. This can be ordered here: [https://vipps.no/produkter-og-tjenester/bedrift/innlogging-og-identifisering/logg-inn-med-vipps/#kom-i-gang](https://vipps.no/produkter-og-tjenester/bedrift/innlogging-og-identifisering/logg-inn-med-vipps/#kom-i-gang).
 
 ### Customizable for your application
+
 You can use the framework of this plugin to implement other signed actions, such as submitting data with verified identities, without requiring the user to login.
 
-## Shortcodes 
- * `[login-with-vipps text="Log in with Vipps" application="wordpress"]` - This will print out a Login with Vipps button that will log you into the given application, which by default can be either Wordpress or WooCommerce.
+## Shortcodes
+
+ * `[login-with-vipps text="Log in with Vipps" application="wordpress"]` - This will print out a Login with Vipps button that will log you into the given application, which by default can be either WorPpress or WooCommerce.
 * `[continue-with-vipps text="Continue with Vipps" application="wordpress"]` - This is the same, except for a different default text
 
-## Customizing the Plugin 
+## Customizing the Plugin
+
 To use 'Continue with Vipps' in your application, there are two levels of customizations available, except for a mass of filters and hooks.
 
-### Adding another 'application' to log into 
-Logging into basic Wordpress and into an application like WooCommerce is different in the details, especially with regards to what page to redirect to (the profile page, or your account page, or maybe the checkout page), with handling of user data (for WooCommerce you want to update the users' address) and for error handling.  For your own application, you may well have other actions you want done after new user registration, logins etc. We aim to provide support for as many applications as possible in time, but to create your own, these are the main steps:
+### Adding another 'application' to log into
+
+Logging into basic WordPress and into an application like WooCommerce is different in the details, especially with regards to what page to redirect to (the profile page, or your account page, or maybe the checkout page), with handling of user data (for WooCommerce you want to update the users' address) and for error handling.  For your own application, you may well have other actions you want done after new user registration, logins etc. We aim to provide support for as many applications as possible in time, but to create your own, these are the main steps:
 
   * Define your application with a name. It should be a simple slug, like 'wordpress' or 'woocommerce'
   * Create your login button, and make it call the supplied Javascript function "login_with_vipps" with your application name as argument.
@@ -69,13 +81,16 @@ Logging into basic Wordpress and into an application like WooCommerce is differe
   * 'continue_with_vipps_before_*your application*_login_redirect'. This takes your logged-in user and a session (which can be called as an array) and is called right before the user is redirected. This would be a good place to add a filter to 'login_redirect' for instance.
   * Filter 'continue_with_vipps_*your application*_users_can_register'. Takes a truth value, an array of userinfo from Vipps and a session, and should return true only if you allow the user to register
   * Filter 'continue_with_vipps_*your application*_create_userdata'. For newly registered users, takes an array to be passed to wp_update_user, an array of userinfo from Vipps, and a session. You can here add your extra meta fields
-  * Filter 'continue_with_vipps_*your application*_allow_login'. Takes a truth value, a user object, userinfo from Vipps and a session, and returns true only if the user is allowed to log in
+  * Filter 'continue_with_vipps_*your application*_allow_login'. Takes a truth value, a user object, userinfo from Vipps and a session, and returns true only if the user is allowed to log in.
+
 ###  Adding another 'action' apart from logging in 
+
 You may want to do other things than logging in with the users' confirmed Vipps identity, and this plugin absolutely allows this. This might be submissions of comments, reviews and so forth without requiring logins, or even just as a convenient way of letting users input their address.
 
 These are the main steps:
- * Define your own action, like 'submitaddress'.
- * Create your button. The handler should call the static method `ContinueWithVipps::getAuthRedirect($action)` (you can also provide an array of sessiondata which will be available in your handlers, and restrict the scope of the data to retrieve from Vipps. The return value is an URL to which you should redirect your user.
+
+ * Define your own action, like 'submit address'.
+ * Create your button. The handler should call the static method `ContinueWithVipps::getAuthRedirect($action)`. You can also provide an array of session data which will be available in your handlers, and restrict the scope of the data to retrieve from Vipps. The return value is a URL to which you should redirect your user.
  * Create your success handler.
  * Create your error handler. This should be hooked to 'continue_with_vipps_error_*your action*'. It will receive an error string, a description of the error, sometimes an error hint, and the contents of your session (which will no longer be active). You will need to redirect to your error page here, and show your user the error. The redirect is important, you should not output content in this action.
  * Create your success handler. This should be hooked to 'continue_with_vipps_*your action*'. It will receive an array of user information from Vipps, and a live session. This handler too should end with a redirect to your success page.

From f58363d9650fdfedd2c2bb19f1a571df7aad2549 Mon Sep 17 00:00:00 2001
From: "rebeka.burnett" <rebeka.burnett@vipps.no>
Date: Tue, 30 May 2023 10:24:26 +0200
Subject: [PATCH 4/4] Fix broken link

---
 README.md | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index 05e7ef5..0595051 100644
--- a/README.md
+++ b/README.md
@@ -55,7 +55,7 @@ Login with Vipps can be added to all relevant pages in your web shop: login, reg
 
 ### Free of charge
 
-Login with Vipps is free of charge for site owners and end-users. Merchants that already use Vipps online payment can add Sign in with Vipps to their account at [https://portal.vipps.no](https://portal.vipps.no). New site owners need to set-up an agreement with Vipps to use the service. This can be ordered here: [https://vipps.no/produkter-og-tjenester/bedrift/innlogging-og-identifisering/logg-inn-med-vipps/#kom-i-gang](https://vipps.no/produkter-og-tjenester/bedrift/innlogging-og-identifisering/logg-inn-med-vipps/#kom-i-gang).
+Login with Vipps is free of charge for site owners and end-users. Merchants that already use Vipps online payment can add Sign in with Vipps to their account at [https://portal.vipps.no](https://portal.vipps.no). New site owners need to set up an agreement with Vipps to use the service. This can be ordered [here](https://portal.vipps.no/login).
 
 ### Customizable for your application
 
@@ -63,7 +63,7 @@ You can use the framework of this plugin to implement other signed actions, such
 
 ## Shortcodes
 
- * `[login-with-vipps text="Log in with Vipps" application="wordpress"]` - This will print out a Login with Vipps button that will log you into the given application, which by default can be either WorPpress or WooCommerce.
+ * `[login-with-vipps text="Log in with Vipps" application="wordpress"]` - This will print out a Login with Vipps button that will log you into the given application, which by default can be either WordPress or WooCommerce.
 * `[continue-with-vipps text="Continue with Vipps" application="wordpress"]` - This is the same, except for a different default text
 
 ## Customizing the Plugin
@@ -72,10 +72,10 @@ To use 'Continue with Vipps' in your application, there are two levels of custom
 
 ### Adding another 'application' to log into
 
-Logging into basic WordPress and into an application like WooCommerce is different in the details, especially with regards to what page to redirect to (the profile page, or your account page, or maybe the checkout page), with handling of user data (for WooCommerce you want to update the users' address) and for error handling.  For your own application, you may well have other actions you want done after new user registration, logins etc. We aim to provide support for as many applications as possible in time, but to create your own, these are the main steps:
+Logging into basic WordPress and into an application like WooCommerce is different in the details, especially in regard to what page to redirect to (the profile page, or your account page, or maybe the checkout page), with handling of user data (for WooCommerce you want to update the users' address) and for error handling.  For your own application, you may well have other actions you want done after new user registration, logins etc. We aim to provide support for as many applications as possible in time, but to create your own, these are the main steps:
 
   * Define your application with a name. It should be a simple slug, like 'wordpress' or 'woocommerce'
-  * Create your login button, and make it call the supplied Javascript function "login_with_vipps" with your application name as argument.
+  * Create your login button, and make it call the supplied JavaScript function "login_with_vipps" with your application name as argument.
   * To customize, you can now modify several filters and hooks, the most important of which would be:
   * 'continue_with_vipps_error_*your application*_login_redirect'. This takes and returns an error-page redirect, the error string, and the login session data as an array. You can here return your own error page.
   * 'continue_with_vipps_before_*your application*_login_redirect'. This takes your logged-in user and a session (which can be called as an array) and is called right before the user is redirected. This would be a good place to add a filter to 'login_redirect' for instance.