Download the PHP package iss/laravel-maya-sdk without Composer
On this page you can find all versions of the php package iss/laravel-maya-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-maya-sdk
Laravel Maya SDK
Laravel Package that will handle the Maya Payments / Checkout and other Maya API
Request Feature
Table Of Contents
- What It Does
- Getting Started
- Installation
- Usage
- Adding An Item
- Customer Shipping
- Customer Billing
- Buyer Details
- Redirect URLs
- Checkout
- Webhook Management
- Get All Webhook
- Create New Webhook
- Get Webhook
- Update Webhook
- Delete Webhook
- Customizations
- Roadmap
- Contributing
- Etiquette
- Viability
- Procedure
- Credits
- License
What It Does
This package allows you manage your customer checkouts, webhooks, and other payments using Maya API.
Supported Features:
- Checkout
- Wallet
- Create Single Payment
- Webhooks
- Customizations
Next Release:
- Payment Transactions
- Card Payment Vault
- Wallet
- QR
Getting Started
This is how you can install or use the library.
Installation
-
Install Maya Payment to your Laravel Application
-
Publish the configuration
- In your
config/maya.php
, add yourpublic_key
andprivate_key
from your PayMaya account.config/maya.php
Usage
Integrate to your Laravel Application.
Adding an Item
Calculating the total amount, discounts, shipping fee and other charges
You need to pass the Maya::item()->getItems()
to calculate the total amount.
or
To get the totalAmount object you can call the get()
method:
Result:
Customer Shipping Address
Customer Billing Address
Buyer's Details
To add shipping / billing address to the buyer, you can use this:
For shipping address:
For billing address:
Redirect URLs
You can use route name from your web.php
or api.php
file or use static URL with parameters.
The $custom_uuid
is from your order's table or any reference ID from your application.
Checkout
Build body request for your checkout based on our created objects above.
Array Response from Maya Checkout Request:
Webhooks Management
Use the MayaWebhook
by injecting the facade to your application and to be able to manage your webhooks.
Get All Webhooks
Response:
Create New Webhook
The supported events that you can pass through for
method are the following:
AUTHORIZED
,PAYMENT_SUCCESS
,PAYMENT_FAILED
,PAYMENT_EXPIRED
,PAYMENT_CANCELLED
,3DS_PAYMENT_SUCCESS
,3DS_PAYMENT_FAILURE
,3DS_PAYMENT_DROPOUT
,RECURRING_PAYMENT_SUCCESS
,RECURRING_PAYMENT_FAILURE
,CHECKOUT_SUCCESS
,CHECKOUT_FAILURE
,CHECKOUT_DROPOUT
,CHECKOUT_CANCELLED
Pass the URL
parameter on create()
method.
Response:
Get Webhook
Pass the ID of the webhook
Response:
Update Webhook
Pass the ID of the webhook that you want update and the new URL
. The first
parameter will be the ID of the webhook and the second
parameter will be the new URL
.
Response:
Delete Webhook
Pass the ID of the webhook that you want to delete.
Response:
Customizations
Use the MayaCustomization
by injecting the facade to your application.
Set Customization
Set your LogoUrl
, IconUrl
, AppleTouchIconUrl
, CustomTitle
and ColorScheme
. These are the required fields.
Helper functions:
hideReceipt()
orshowReceipt()
- Indicates if the merchant does not allow its payers to freely send transaction receipts.skipResultPage()
ordoNotSkipResultPage()
- Indicates if the merchant does not want to show the payment result page. When skipped, the payment page redirects immediately to the merchant's redirect URL.showMerchantName()
orhideMerchantName()
- Indicates if the merchant name on the result page is displayed.
Response:
Get Customization
Response:
Delete Customization
Response:
Roadmap
See the open issues for a list of proposed features (and known issues).
Contributing
Contributions are welcome and will be fully credited.
Please read and understand the contribution guide before creating an issue or pull request.
Etiquette
This project is open source, and as such, the maintainers give their free time to build and maintain the source code held within. They make the code freely available in the hope that it will be of use to other developers. It would be extremely unfair for them to suffer abuse or anger for their hard work.
Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the world that developers are civilized and selfless people.
It's the duty of the maintainer to ensure that all submissions to the project are of sufficient quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.
Viability
When requesting or submitting new features, first consider whether it might be useful to others. Open source projects are used by many developers, who may have entirely different needs to your own. Think about whether or not your feature is likely to be used by other users of the project.
Procedure
Before filing an issue:
- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
- Check to make sure your feature suggestion isn't already present within the project.
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
- Check the pull requests tab to ensure that the feature isn't already in progress.
Before submitting a pull request:
- Check the codebase to ensure that your feature doesn't already exist.
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
Credits
- Maya
- All Contributors
License
Distributed under the MIT License. See LICENSE for more information.