Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when batch is false (Undefined variable: Othr_CdtrAgt_Node) #32

Open
Vinze opened this issue Sep 27, 2016 · 1 comment
Open

Error when batch is false (Undefined variable: Othr_CdtrAgt_Node) #32

Vinze opened this issue Sep 27, 2016 · 1 comment

Comments

@Vinze
Copy link

Vinze commented Sep 27, 2016

I don't know if it's a bug or if I'm doing something wrong, but with the following code:

$config = [
    'name' => 'Company',
    'IBAN' => 'NL50INGBXXXXXXXXXX',
    'BIC' => 'INGBNL2A',
    'batch' => false,
    'creditor_id' => 'NL92ZZZ000000000000',
    'currency' => 'EUR'
];

$SEPASDD = new \SEPASDD($config);

$SEPASDD->addPayment([
    'name' => 'Customer NO1',
    'IBAN' => 'NL50INGBXXXXXXXXXX',
    'BIC' => 'INGBNL2A',
    'amount' => 10000,
    'type' => 'FRST',
    'collection_date' => '2015-10-02',
    'mandate_id' => 'ABC0021-COMPANY',
    'mandate_date' => '2014-08-20',
    'description' => 'F2016-04791'
]);

I'm getting the error: ErrorException in SEPASDD.php line 309: Undefined variable: Othr_CdtrAgt_Node. Setting batch to true solves the problem but I don't need batches. I tried to find out why this error is thrown but I couldn't find it. Could you look into this?

@freddieleeman
Copy link

Change line 309:

OLD:
if ( isset( $config['BIC'] ) ) {

NEW:
if ( isset( $this->config['BIC'] ) ) {

I've created a pull request for this bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants