Package DE_EPAGES::POSTPAY::API::XML
XML functions for POSTPAY.
@EXPORT_OK |
Functions
ArrayHash2XML
building xml format needs to get a array for elements in xml and a hash for attributes for this elements example: $aStructure = [{'submitCartResponse' => [{'header' => [{'login' => 123}, {'password' => 123}, {'language' => en} ]}, {'shoppingCart' => [{'cartId' => 1}, {'shoppingCartItem' => [{'productId' => 12345}, {'name' => 'test'}, {'basePrice' => 120}, {'tax' => 'standard'}, {'quantity' => 1} ]} ]} ]}]; will be converted to: <submitCartRequest> <header> <login>123</login> <password>123</password> <language>en</language> </header> <shoppingCart> <cartId>1</cartId> <shoppingCartItem> <productId>12345</productId> <name>test</name> <basePrice>120</basePrice> <tax>Standard</tax> <quantity>1</quantity> </shoppingCartItem> </shoppingCart> </submitCartRequest>
Syntax |
$XML.= ArrayHash2XML($hXMLElements,$hXMLattributes); |
Input |
|
Return |
|
ChangeResponseXMLToHash
takes xml response from postpay and transforms it into hash
Syntax |
my $hResponse = ChangeResponseXMLToHash($XMLResponse,$Shop); |
Input |
|
Return |
|
GetXMLHeader
builds header for parameters
Syntax |
$XML.= GetXMLHeader($LineItemPayment); |
Input |
|
Return |
|