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.
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
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.
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:
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.
Requiresphp Version
^8.2 lunarphp/core Version
self.version
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package lunarphp/opayo contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.