PHP code example of inverseschool / omnipay-stripe
1. Go to this page and download the library: Download inverseschool/omnipay-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/ */
if ($response->isSuccessful()) {
// Pop open that champagne bottle, because the payment is complete.
} else if($response->isRedirect()) {
$response->redirect();
} else {
// The payment has failed. Use $response->getMessage() to figure out why and return to step (1).
}
$response = $gateway->confirm([
'paymentIntentReference' => $paymentIntentReference,
'returnUrl' => $completePaymentUrl,
])->send();
if ($response->isSuccessful()) {
// All done!! Big bucks!
} else {
// The response will not be successful if the 3DS authentication process failed or the card has been declined. Either way, it's back to step (1)!
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.