Download the PHP package lunarphp/opayo without Composer
On this page you can find all versions of the php package lunarphp/opayo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package opayo
This addon enables Opayo payments on your Lunar storefront.
Alpha Release
This addon is currently in Alpha, whilst every step is taken to ensure this is working as intended, it will not be considered out of Alpha until more tests have been added and proved.
Minimum Requirements
- Lunar
1.x
- An Elavon merchant account
Installation
Require the composer package
Configure the service
Add the opayo config to the config/services.php
file.
Enable the driver
Set the driver in config/lunar/payments.php
Configuration
Below is a list of the available configuration options this package uses in config/lunar/opayo.php
Key | Default | Description |
---|---|---|
policy |
automatic |
Determines the policy for taking payments and whether you wish to capture the payment manually later or take payment straight away. Available options deferred or automatic |
Backend Usage
Get a merchant key
Authorize a charge
When authorizing a charge, you may be required to submit extra authentication in the form of 3DSV2, you can handle this in your payment endpoint.
$response
will contain all the 3DSV2 information from Opayo.
You can find more information about this using the following links:
- 3-D Secure explained
- 3D Secure Transactions
- Stack overflow SagePay 3D Secure V2 Flow
Once you have handled the 3DSV2 response on your storefront, you can then authorize again.
Opayo card tokens
When authenticated users make an order on your store, it can be good to offer the ability to save their card information for future use. Whilst we don't store the actual card details, we can use card tokens which represent the card the user has used before.
You must have saved payments enabled on your Opayo account because you can use these.
To save a card, pass in the saveCard
data key when authorizing a payment.
Assuming everything went well, there will be a new entry in the opayo_tokens
table, associated to the authenticated user. You can then display these card representations at checkout for the user to select. The token
is what replaces the card_identifier
data key.
Responses are then handled the same as any other transaction.
Contributing
Contributions are welcome, if you are thinking of adding a feature, please submit an issue first so we can determine whether it should be included.