PHP code example of orqex / orchestrate-php

1. Go to this page and download the library: Download orqex/orchestrate-php 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/ */

    

orqex / orchestrate-php example snippets


use Orqex\Orchestrate\OrchestrateClient;

$orqex = new OrchestrateClient('sk_live_xxx');

$intent = $orqex->paymentIntents()->create([
    'amount'      => 50,
    'currency'    => 'USD',
    'description' => 'Order #1024',
    'customer'    => [
        'email'      => '[email protected]',
        'first_name' => 'Ama',
        'last_name'  => 'Mensah',
    ],
]);

echo $intent->status;          // "pending"
echo $intent->amount->value;   // 50 (major units)

use Orqex\Orchestrate\Laravel\Facades\Orchestrate;

Orchestrate::paymentIntents()->all();
bash
composer