Skip to content

cmsmaxinc/omnipay-paya

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Omnipay: Paya

Paya gateway for the Omnipay PHP payment processing library

Software License

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP. This package implements Paya (Nuvei) support for Omnipay.

Installation

Omnipay is installed via Composer. To install, simply require league/omnipay and cmsmaxinc/omnipay-paya with Composer:

composer require league/omnipay cmsmaxinc/omnipay-paya

Basic Usage

The following gateways are provided by this package:

  • Paya

For general usage instructions, please see the main Omnipay repository.

Gateway Parameters

The following parameters are required when creating the gateway:

  • merchantId - Your paya merchant ID
  • username - Your paya API username
  • password - Your paya API password
  • productionWsdlUrl
  • sandboxWsdlUrl

Additionally, you can set:

  • testMode - Set to true to use the sandbox environment

Available Methods

The gateway supports the following methods:

  • purchase() - Authorize and capture a payment
  • refund() - Refund a previously captured payment

Sandbox Testing

paya provides a sandbox environment for testing your integration. To use the sandbox:

  1. Set the gateway to test mode:

    $gateway->setTestMode(true);
  2. Use the sandbox credentials provided by paya:

    $gateway->setMerchantId('your-test-merchant-id');
    $gateway->setUsername('your-test-username');
    $gateway->setPassword('your-test-password');
    $gateway->setProductionWsdlUrl('');
    $gateway->setSandboxWsdlUrl('');
  3. Set ACH account credentials

    $achAccount = $gateway->createAchAccount([
       // Bank account details
       'routingNumber' => '123456789',
       'accountNumber' => '987654321',
       'accountType' => 'Checking',
       
       // Customer information
       'firstName' => 'John',
       'lastName' => 'Doe',
       'billingAddress1' => '123 Main Street',
       'billingAddress2' => 'Apt 456',
       'billingCity' => 'Anytown',
       'billingState' => 'CA',
       'billingPostcode' => '12345',
       'phone' => '555-123-4567',
       
       // Optional verification information
       'dlState' => 'CA',
       'dlNumber' => 'D1234567',
       'courtesyCardId' => 'CC12345'
    ]);
    
    // Process a purchase transaction
    $purchaseResponse = $gateway->purchase([
       'requestId' => uniqid(),
       'transactionId' => 'INV-' . time(),
       'amount' => '50.00',
       'achAccount' => $achAccount
    ])->send();

Support

If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.

If you want to keep up to date with release announcements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.

If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages