vcatalano / py-authorize

A full-featured Python API for the Authorize.net payment gateway.
MIT License
42 stars 35 forks source link

Fix "order_number" param handling. #16

Closed clearcode closed 10 years ago

clearcode commented 10 years ago

Hi, during testing we grabbed yet another irregularity about "order_number" param.

According to docs: 1) AIM: www.authorize.net/support/AIM_guide_XML.pdf‎ 2) ARB: www.authorize.net/support/ARB_SOAP_guide.pdf‎ 3) CIM: www.authorize.net/support/CIM_SOAP_guide.pdf‎

Sounds strange, but "purchaseOrderNumber" in node "Order" is allowed ONLY on CIM transactions.

Initially we sent this parameter, but we not received it in response (eg. for Transaction.details request). When debugging, it turned out that it is not handle to XML request, so we implemented this. We have seen in the CIM transaction scheme purchase_order_number, but it seems to us that it was in the wrong place, so redundant. We had to change the tests and docs, so please carefully review this pull request and check if we're not wrong.