Download the PHP package superbig/craft-vipps without Composer
On this page you can find all versions of the php package superbig/craft-vipps. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download superbig/craft-vipps
More information about superbig/craft-vipps
Files in superbig/craft-vipps
Package craft-vipps
Short Description Integrate Commerce with Vipps
License proprietary
Informations about the package craft-vipps
Vipps plugin for Craft CMS 3.x
Integrate Craft Commerce with Vipps.
Requirements
This plugin requires Craft CMS 3.1.0 and Craft Commerce 2.0 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require superbig/craft-vipps
- In the Control Panel, go to Settings → Plugins and click the “Install” button for Vipps.
Vipps Overview
This plugin provides your Craft Commerce shop with two payment alternatives:
- A normal gateway for Craft Commerce, where a customer can select Vipps when checkout out
- Express Checkout - where a user taps the familiar, orange Vipps Checkout button and jumps right to the Vipps app to pay.
What is Vipps?
Vipps is a mobile app that makes it easy to transfer money to others, pay in stores, online stores and bills.
Vipps has 2.9 million users in Norway and is used daily by tens of thousands to shop online.
Configuring Vipps
You may either configure the gateway on the Gateway Settings screen, or create a config file named commerce-gateways.php
in config/
.
Note that the gatewayHandle
here has to match your gateway's handle in the Commerce Gateway settings.
See Commerce docs for more information on how to configure gateways with a config file.
Overview of config settings
This is an overview that shows you where to get the different config values through the Vipps Developer Portal.
Config value | Description | Where to get it | Example value |
---|---|---|---|
testMode | Enable test mode | true/false |
|
clientId | Client ID | Utvikler -> Select Showing test keys -> Show keys -> Client Id | String |
clientSecret | Client Secret | Utvikler -> Select Showing test keys -> Show keys -> Client Secret | String |
subscriptionKeyAccessToken | Subscription Key for authorizing Vipps API calls | Utvikler -> Select Showing test keys -> Show keys -> Primary or secondary key | String |
merchantSerialNumber | Merchant Serial Number | Utvikler -> Select Showing test keys -> Merchant Serial Number | String |
transactionText | This text will show up in the Vipps app when a customer is paying | String | |
expressCheckout | Enable Express Checkout | true/false |
|
addItemToCartIfAlreadyExists | On Express Checkout, this will decide if a item should be added to the existing cart instead of replaced | true/false |
|
newCartOnExpressCheckout | Creates a new cart on Express Checkout | true/false |
|
fallbackUrl | Vipps will redirect to this URL when a payment is completed or cancelled. | String | |
errorFallbackUrl | If you want to override the fallback URL customers are returned to when a error happens, use this option | String | |
authToken | Read-only - Token used to verify callbacks from Vipps | String | |
captureOnStatusChange | Enable automatic capture when switching order to new Order Status | true/false |
|
captureStatusUid | The uid of the Order Status to capture automatically | String | |
useBillingPhoneAsVippsPhoneNumber | Pull the Vipps phone number automatically from billing address, if set and not empty | true/false |
Callback URLs
Note that all URLs passed to Vipps will have to be publicly available. Vipps will validate the URL, and return an error if its accessible from their servers.
Using Vipps
Express Checkout Buttons
Vipps allow a customer to check and pay for a order straight in the Vipps out, decreasing the number of steps a customer have to take to finish a order.
To display a Express Checkout button for a variant:
To display a Express Checkout button for a cart:
Custom Express Checkout
If you need to do something custom around the Express Checkout flow, like allow the customer to provide a note, select quantity or use line item options
, you can handle the input manually and submit to /vipps/express/checkout
. This endpoint receives the same purchasables
input as the normal Commerce endpoint.
See the Commerce docs on Add to Cart for more information.
See Brand Guidelines for more advice on how to use the payment buttons.
Get Support
Discord
Get in touch via the Craft Discord, in the #craft3-help
channel. Mention one of our team members on the following handles:
@superbig
@fred
Get our attention on Twitter by using the #craftcms
hashtag and mentioning @sjelfull
If you have any feedback, comments, questions or suggestion: email us at contact at superbig.co
.
Troubleshooting
"Invalid auth token received from Vipps" error
If you see this in logs, this typically means that there is a layer between Craft and Vipps that strips away the Authorization header. You should start by checking if your webserver or firewall is removing it.
Vipps Roadmap
Some things to do, and ideas for potential features:
- [ ] Handle signup after payment
- [ ] Support for user signups via Vipps
- [ ] Support for subscriptions
- [ ] Better handling of addresses and existing customers
Brought to you by Superbig