Alento Posted April 23, 2021 Report Posted April 23, 2021 When a client attempts to use Square, as shown in this image: They receive this error: The log shows this: I contacted Square support with the information in the log as above, and their response was: Quote Thanks for reaching out to API Support! The error is because you are not passing in an `order` field, which is a required field (https://developer.squareup.com/reference/square/checkout-api/create-checkout). Essentially, the `order` field is a `CreateOrderRequest` which consists of another `order` (of type Order), so things like `line_items` need to be within this last `order` field. Please take a look at the tech reference I provided which also has some example code on the right side, and let me know if you have any questions or concerns. Quote
Alk Posted October 2, 2021 Report Posted October 2, 2021 I've just been testing the Square Gateway on my test installation of Blesta (incidentally, the Square Gateway plugin that ships with Blesta doesn't support the Square Sandbox, so all testing has to be done with live payments ). I cannot re-create your issue above and I have been able to successfully process a live payment for an invoice using Square. I am using Blesta v5.1.2 and Square Gateway v1.4.0. In my Square Gateway logs, my Input is the same as yours above, except that I have s:10:"Invoice #2"; as you can see here: /dev/blesta/client/pay/confirm/ a:1:{i:0;a:3:{s:4:"name";s:10:"Invoice #2";s:8:"quantity";i:1;s:16:"base_price_money";a:2:{s:6:"amount";s:4:"2.00";s:8:"currency";s:3:"GBP";}}} Looking at the Email that I receive from Square, when the transaction is completed, the email lists "Order" and "Order Details" of: #2=2.00 So that is derived from the Invoice number #2 and the cost of the invoice 2.00. I think that your problem is that you are using an invoice format which is not the Blesta standard. My invoice format is the default of {num} but I think that your invoice format is "BL-{num}" and I suspect that the problem could be the dash for the Square gateway (or maybe the BL as well). I would suggest you try changing your invoice format to the default of {num} just to see if Square works. Just a thought as to what the problem could be for you. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.