Download the PHP package bulldots-bulletpoint/laravel-joyn without Composer
On this page you can find all versions of the php package bulldots-bulletpoint/laravel-joyn. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bulldots-bulletpoint/laravel-joyn
More information about bulldots-bulletpoint/laravel-joyn
Files in bulldots-bulletpoint/laravel-joyn
Package laravel-joyn
Short Description Simple Laravel package for the Joyn API
License MIT
Homepage https://github.com/bulldots-bulletpoint/laravel-joyn
Informations about the package laravel-joyn
Laravel Joyn API Package
Laravel Joyn API Package.
Generate a Joyn QR code that the user can scan after buying products from the shop.
Installation
You can install the package via composer:
Usage
Example:
A user buys something from your webshop. After the payment is done an email is send to the user to verify that the order is payed.
You can add the joyn qr code to that email. Example:
Here we add the code in the webhookController
//Http/Controllers/Front/webhookController.php
...
$joyn = new JoynController();
$auth = $joyn->getAuthorization();
$result = $joyn->setLoyaltyToken($auth,$order->reference,$payment->paymentData['amount']);
Mail::send("emails.orderConfirmation", [
"order" => $order,
"joyn" => $result,
"status" => "Your order is payed and confirmed."
]);
...
And then you edit the OrderConfirmation mail template:
//resources/views/emails/orderConfirmation.blade.php
...
<p>Joyn points</p>
<p>Scan QR-Code below with the Joyn-app</p>
<img src="{{$joyn['qrCodeUrl']}}" alt="Joyn QR-Code">
<p>Can't read the QR-Code? <a href="{{$joyn['tokenUrl']}}">Click here</a></p>
...
Changelog
Please see CHANGELOG for more information what has changed recently.
Security
If you discover any security related issues, please email [email protected] or [email protected] instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.