HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/demo.sports-crowd.com/vendor/dnetix/redirection/examples/basic/payment.php
<?php

require_once __DIR__ . '/../bootstrap.php';

// Creating a random reference for the test
$reference = 'TEST_' . time();

// Request Information
$request = [
    'locale' => 'es_CO',
    'payer' => [
        'name' => 'Kellie Gerhold',
        'surname' => 'Yost',
        'email' => 'flowe@anderson.com',
        'documentType' => 'CC',
        'document' => '1848839248',
        'mobile' => '3006108300',
        'address' => [
            'street' => '703 Dicki Island Apt. 609',
            'city' => 'North Randallstad',
            'state' => 'Antioquia',
            'postalCode' => '46292',
            'country' => 'US',
            'phone' => '363-547-1441 x383',
        ],
    ],
    'buyer' => [
        'name' => 'Kellie Gerhold',
        'surname' => 'Yost',
        'email' => 'flowe@anderson.com',
        'documentType' => 'CC',
        'document' => '1848839248',
        'mobile' => '3006108300',
        'address' => [
            'street' => '703 Dicki Island Apt. 609',
            'city' => 'North Randallstad',
            'state' => 'Antioquia',
            'postalCode' => '46292',
            'country' => 'US',
            'phone' => '363-547-1441 x383',
        ],
    ],
    'payment' => [
        'reference' => $reference,
        'description' => 'Iusto sit et voluptatem.',
        'amount' => [
            'taxes' => [
                [
                    'kind' => 'ice',
                    'amount' => 56.4,
                    'base' => 470,
                ],
                [
                    'kind' => 'valueAddedTax',
                    'amount' => 89.3,
                    'base' => 470,
                ],
            ],
            'details' => [
                [
                    'kind' => 'shipping',
                    'amount' => 47,
                ],
                [
                    'kind' => 'tip',
                    'amount' => 47,
                ],
                [
                    'kind' => 'subtotal',
                    'amount' => 940,
                ],
            ],
            'currency' => 'USD',
            'total' => 1076.3,
        ],
        'items' => [
            [
                'sku' => 26443,
                'name' => 'Qui voluptatem excepturi.',
                'category' => 'physical',
                'qty' => 1,
                'price' => 940,
                'tax' => 89.3,
            ],
        ],
        'shipping' => [
            'name' => 'Kellie Gerhold',
            'surname' => 'Yost',
            'email' => 'flowe@anderson.com',
            'documentType' => 'CC',
            'document' => '1848839248',
            'mobile' => '3006108300',
            'address' => [
                'street' => '703 Dicki Island Apt. 609',
                'city' => 'North Randallstad',
                'state' => 'Antioquia',
                'postalCode' => '46292',
                'country' => 'US',
                'phone' => '363-547-1441 x383',
            ],
        ],
        'allowPartial' => false,
    ],
    'expiration' => date('c', strtotime('+1 hour')),
    'ipAddress' => '127.0.0.1',
    'userAgent' => 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36',
    'returnUrl' => 'http://dnetix.dev/p2p/client',
    'cancelUrl' => 'https://dnetix.co',
    'skipResult' => false,
    'noBuyerFill' => false,
    'captureAddress' => false,
    'paymentMethod' => null,
];

try {
    $placetopay = placetopay();
    $response = $placetopay->request($request);

    if ($response->isSuccessful()) {
        // Redirect the client to the processUrl or display it on the JS extension
        // $response->processUrl();
    } else {
        // There was some error so check the message
        // $response->status()->message();
    }
    var_dump($response);
} catch (Exception $e) {
    var_dump($e->getMessage());
}