0

I have difficulties to use this project : https://github.com/php-sepa-xml/php-sepa-xml

I set up everything with composer but I don't know how to generate the xml file.

In the doc folder, there is a sample file, I copy / paste the content in a new php file

<?php
use Digitick\Sepa\TransferFile\Factory\TransferFileFacadeFactory;
use Digitick\Sepa\PaymentInformation;

// Code....
?>

when I run the code I have an error:

Fatal error: Uncaught Error: Class 'Digitick\Sepa\TransferFile\Factory\TransferFileFacadeFactory' not found
 in C:\dev\php-sepa-xml\vendor\digitick\sepa-xml\lib\sample.php:5

I tried to move my php file in different folders and also to change the path but I always have the error.

Note: I'm on Windows so the path may be different.

2
  • 1
    Are you importing the composer auto loader somewhere…? use by itself doesn't do anything to load the .php files. Commented Jun 12, 2017 at 11:04
  • Yes, the autoload file, something like require DIR . '/../vendor/autoload.php'; Commented Jun 12, 2017 at 11:06

1 Answer 1

4

If you set it up using composer, please add autoloader in the top of php file.

<?php
require "vendor/autoload.php";
use Digitick\Sepa\TransferFile\Factory\TransferFileFacadeFactory;
use Digitick\Sepa\PaymentInformation;

// Code....
?>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.