PHP code example of dystcz / lunar-api-stripe-adapter

1. Go to this page and download the library: Download dystcz/lunar-api-stripe-adapter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dystcz / lunar-api-stripe-adapter example snippets


$payment = App::make(StripePaymentAdapter::class);

// Get payment driver
$payment->getDriver();

// Get payment type
$payment->getType();

// Create a payment intent
$payment->createIntent($cart)

// Handle a webhook (validate and authorize payment)
$payment->handleWebhook($request)
bash
php artisan vendor:publish --provider="Dystcz\LunarApiStripeAdapter\LunarApiStripeAdapterServiceProvider" --tag="lunar-api.stripe"