We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
require 'vendor/autoload.php'; use Omnipay\Omnipay; // Initialize the Omnipay gateway with the mock driver $gateway = Omnipay::create('Mock'); // Set parameters for the mock transaction (e.g., amount, currency) $params = [ 'amount' => '10.00', 'currency' => 'USD', 'card' => [ 'number' => '4242424242424242', // A test credit card number 'expiryMonth' => '12', 'expiryYear' => '2023', 'cvv' => '123', ], ]; // Send a purchase request to the mock gateway $response = $gateway->purchase($params)->send(); // Check if the transaction was successful if ($response->isSuccessful()) { // Mock success message echo "Transaction successful. Mock payment ID: " . $response->getTransactionReference(); } else { // Handle failed transaction echo "Transaction failed: " . $response->getMessage(); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: