Search the Community
Showing results for tags 'postalmethods'.
-
I go into list of clients, select an invoice, select DeliveryviaPostalMethods The first time I did this, I got a "The form token is invalid", now I get a -1 Any ideas? BTW: If we can get this working, this is another really cool Blesta feature!!!
-
There's a bug either in the PostalMethods API or in the InvoiceDelivery class that's causing PostalMethods to return a 400 Bad Request respsonse header with 0-length response body. It took me a long time to figure out, because Blesta wasn't returning an error message, just a "-1" error code, which is obviously meaningless, and nothing being logged. I eventually got myself the response code from the Http curl wrapper class, which came back with "400". I then extracted the $xml as string from the PostalMethods class before it was sent, and I did a manual post request to PostalMethods directly. It came back with the following response: HTTP/1.1 400 Bad Request Date: Tue, 12 Apr 2016 19:17:05 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Length: 0 It turned out that the cause was an ampersand (&) in the company name: <Company>Example & Co. Accountants</Company> So, I'm guessing, the data is not being properly encoded, at least for the Company element.
- 3 replies
-
- PostalMethods
- Invoice Delivery
-
(and 1 more)
Tagged with: