PHP code example of azaharizaman / nexus-payment

1. Go to this page and download the library: Download azaharizaman/nexus-payment 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/ */

    

azaharizaman / nexus-payment example snippets


use Nexus\Payment\Contracts\PaymentPersistInterface;
use Nexus\Payment\Enums\PaymentDirection;
use Nexus\Payment\Enums\PaymentMethod;
use Nexus\Common\ValueObjects\Money;

final readonly class PaymentService
{
    public function __construct(
        private PaymentPersistInterface $paymentPersist,
    ) {}

    public function recordPayment(
        string $tenantId,
        string $payerId,
        Money $amount,
    ): string {
        // Implementation
    }
}