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

The "InitgPty" can not show correctly #34

Open
zaizai22222 opened this issue Jan 21, 2014 · 3 comments
Open

The "InitgPty" can not show correctly #34

zaizai22222 opened this issue Jan 21, 2014 · 3 comments

Comments

@zaizai22222
Copy link

I use the code in the example

$groupHeader = new GroupHeader('SEPA File Identifier', 'Your company name');

$sepaFile = new CustomerCreditTransferFile($groupHeader);

$transfer = new CustomerCreditTransferInformation(
    '0.02', // Amount
    'FI1350001540000056', //IBAN of creditor
    'Their Corp' //Name of Creditor
    );
$transfer->setBic('OKOYFIHH'); // Set the BIC explicitly
$transfer->setRemittanceInformation('Transaction Description');

// Create a PaymentInformation the Transfer belongs to
$payment = new PaymentInformation(
    'Payment Info ID',
    'FR1420041010050500013M02606', // IBAN the money is transferred from
    'PSSTFRPPMON',  // BIC
    'My Corp' // Debitor Name
    );
// It's possible to add multiple Transfers in one Payment
$payment->addTransfer($transfer);

// It's possible to add multiple payments to one SEPA File
$sepaFile->addPaymentInformation($payment);

// Attach a dombuilder to the sepaFile to create the XML output
$domBuilder = DomBuilderFactory::createDomBuilder($sepaFile);

$a = $domBuilder->asXml();

And here is the xml it output

<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.002.03" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <CstmrCdtTrfInitn>
    <GrpHdr>
       .....
      </InitgPty>
    </GrpHdr>
........

The "InitgPty" in GroupHeader should be

<InitgPty>
        <Nm>Your company name</Nm>
</InitgPty>

While here is

</InitgPty>

Is it a bug for the "InitgPty"?

@zaizai22222
Copy link
Author

I fix this issue as I enable the xmlrpc in php5.4.

@monofone
Copy link
Contributor

Hi @zaizai22222,

can you please provide some more details, especally how you enabled the xmlrpc and how you executed the example. I tried to reproduce your problem in short, but everything behaved as expected.

@zaizai22222
Copy link
Author

Hi @monofone,
My php version is PHP 5.4.24-1
You can remove php5-xmlrpc to reproduce this bug
sudo apt-get remove php5-xmlrpc

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