3
Opa, I’m using the transparent checkout of Pagseguro, but, if I report an amount of installments greater than 1, in a sale with credit card, I get the error: installment value invalid value:
My upload xml:
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<payment>
<mode>default</mode>
<method>creditCard</method>
<sender>
<name>Leonidas Wander</name>
<email>*************@sandbox.pagseguro.com.br</email>
<phone>
<areaCode>99</areaCode>
<number>999999999</number>
</phone>
<documents>
<document>
<type>CPF</type>
<value>99999999999</value>
</document>
</documents>
<hash>**************************************</hash>
</sender>
<currency>BRL</currency>
<notificationURL>https://www.site.com.br/notificacao</notificationURL>
<items>
<item>
<id>0001</id>
<description>Compra Pacote </description>
<quantity>1</quantity>
<amount>200.00</amount>
</item>
</items>
<extraAmount>0.00</extraAmount>
<reference>P2EV2</reference>
<shipping>
<address>
<street>Rua Santa Maria</street>
<number>11</number>
<complement></complement>
<district>Petrópolis</district>
<city>Maceió</city>
<state>AL</state>
<country>ATA</country>
<postalCode>99999999</postalCode>
</address>
<type>3</type>
<cost>0.00</cost>
</shipping>
<creditCard>
<token>********************</token>
<installment>
<quantity>2</quantity>
<value>100.00</value>
</installment>
<holder>
<name>Leonidas Waaa</name>
<documents>
<document>
<type>CPF</type>
<value>99999999999</value>
</document>
</documents>
<birthDate>01/01/1900</birthDate>
<phone>
<areaCode>99</areaCode>
<number>999999999</number>
</phone>
</holder>
<billingAddress>
<street>Rua Santa Maria</street>
<number>11</number>
<complement></complement>
<district>Petrópolis</district>
<city>Maceió</city>
<state>AL</state>
<country>ATA</country>
<postalCode>99999999</postalCode>
</billingAddress>
</creditCard>
</payment>
These parcel values are returned by Pagseguro itself. When informing only one parcel, that is, the total value, the transaction is performed.
Are you sending this XML exactly or just used as an example? Apparently you have a problem with decimals or rounding when you divide the value into plots.
– Norivan Oliveira
Oops buddy, the xml data is fictitious, but, the
<installment>
and the<item><amount>
are the same sent.– sNniffer