diablomedia / gpcsv-generator
Library to assist with the generation of CashPro Global Payments GPCSV files
1.0.1
2021-03-17 23:09 UTC
Requires
- php: ^7.2 || ^8.0
- ext-filter: *
Requires (Dev)
- diablomedia/php-cs-fixer-config: ^2.0
- diablomedia/phpunit-pretty-printer: ^4.0
- friendsofphp/php-cs-fixer: 2.18.3
- maglnet/composer-require-checker: ^2.1 || ^3.0
- phpro/grumphp-shim: ^0.22.0 || ^1.1
- phpstan/phpstan: 0.12.81
- phpunit/phpunit: ^8.5.15
- psalm/plugin-phpunit: ^0.15.1
- vimeo/psalm: 4.6.4
- dev-master
- 1.0.1
- 1.0.0
- dev-dependabot/composer/phpstan/phpstan-1.9.14
- dev-dependabot/github_actions/actions/cache-3.2.3
- dev-dependabot/github_actions/actions/checkout-3.3.0
- dev-dependabot/github_actions/shivammathur/setup-php-2.23.0
- dev-dependabot/composer/vimeo/psalm-4.30.0
- dev-dependabot/composer/psalm/plugin-phpunit-tw-0.15.1or-tw-0.18.0
- dev-dependabot/github_actions/codecov/codecov-action-3
- dev-dependabot/composer/diablomedia/phpunit-pretty-printer-tw-4.0or-tw-9.0
- dev-dependabot/composer/friendsofphp/php-cs-fixer-2.19.3
This package is auto-updated.
Last update: 2024-11-19 16:54:52 UTC
README
Library to assist with the generation of CashPro Global Payments GPCSV files
Usage
CLI
composer require diablomedia/gpcsv
Code
<?php $payment = new GPCSV\Payment(); $payment->setDestinationCountry($country); // Set other values... $csv = new GPCSV\File(); $csv->addPayment($payment); // Add other payments... echo $csv->getCsvString();
Options
By default, the Payment class will automatically strip unsupported characters from values that are sent to it. If you would prefer it to throw an error instead, you can disable the autoClean option:
<?php $payment = new Payment(['autoClean' => false]); // or: $payment = new Payment(); $payment->setOptionAutomaticallyCleanFields(false);