1. Go to this page and download the library: Download lunarphp/stripe 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/ */
$paymentIntentId = $cart->meta['payment_intent']; // The resulting ID from the method above.
$cart->meta->payment_intent;
use \Lunar\Stripe\Facades\Stripe;
Stripe::fetchIntent($paymentIntentId);
use \Lunar\Stripe\Facades\Stripe;
Stripe::syncIntent(\Lunar\Models\Cart $cart);
use \Lunar\Stripe\Facades\Stripe;
Stripe::updateIntent(\Lunar\Models\Cart $cart, [
'shipping' => [/*..*/]
]);
use Lunar\Stripe\Enums\CancellationReason;
CancellationReason::ABANDONED;
CancellationReason::DUPLICATE;
CancellationReason::REQUESTED_BY_CUSTOMER;
CancellationReason::FRAUDULENT;
use Lunar\Stripe\Facades\Stripe;
use Lunar\Stripe\Enums\CancellationReason;
Stripe::cancelIntent(\Lunar\Models\Cart $cart, CancellationReason $reason);
use \Lunar\Stripe\Facades\Stripe;
Stripe::updateShippingAddress(\Lunar\Models\Cart $cart);
use \Lunar\Stripe\Facades\Stripe;
Stripe::getCharge(string $chargeId);
use \Lunar\Stripe\Facades\Stripe;
Stripe::getCharges(string $paymentIntentId);