PHP SDK
Official PHP SDK for the Wire payment API.
The official PHP SDK for Wire.
- Repository: github.com/buildry-wire/wire-php
- Packagist: packagist.org/packages/buildry-wire/wire-php
Install
composer require buildry-wire/wire-phpFirst call
use BuildryWire\Wire\Wire;
$wire = new Wire('sk_live_...');
// Amounts are whole tögrög (15000 = 15,000 ₮). Without allowed_operators every operator switched on for your project is used.
$pi = $wire->paymentIntents->create([
'amount' => 15000,
'currency' => 'MNT',
]);
echo $pi->id, ' ', $pi->status, PHP_EOL;
// Confirm it.
$pi = $wire->paymentIntents->confirm($pi->id, [
'return_url' => 'https://example.com/return',
]);