Skip to content

createElement with special character #18

@istvanfodor

Description

@istvanfodor

Hi Andrew,

I found a small problem: when the billing company of the card data contains a special character(& sign), the code crashed.
Bug place:
Omnipay\Realex\Message\CreateCustomerRequest.php
70. line:
$companyEl = $domTree->createElement('company', $card->getBillingCompany());
My solution was, replace all createElement to this:
$companyEl = $domTree->createElement('company');
$companyEl->appendChild($domTree->createTextNode($card->getBillingCompany()));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions