Jump to content

Square Payment Gateway (Alpha)


Recommended Posts

17 minutes ago, Blesta Addons said:

you can paste the logs and change sensitive data with asterisk .

 

Hi,

Most recent log is:

/callback/gw/1/square/?checkoutId=***********************&client_id=12&referenceId=5a11a80178afd&transactionId=******7de2-a937-595a-7fe8-0c*********44ea:6:{i:0;s:1:"1";i:1;s:6:"square";s:10:"checkoutId";s:30:"C******************OogAQ";s:9:"client_id";s:2:"12";s:11:"referenceId";s:13:"5*****80178afd";s:13:"transactionId";s:36:"d1***de2-a937-**5a-7fe8-0c928******4e";}

One before that is:

/client/pay/confirm/
a:1:{i:0;a:3:{s:4:"name";s:14:"Payment Credit";s:8:"quantity";i:1;s:16:"base_price_money";a:2:{s:6:"amount";s:5:"28.85";s:8:"currency";s:3:"CAD";}}}

Then another one is:

INPUT:

/client/pay/confirm/
a:1:{i:0;a:3:{s:4:"name";s:14:"Payment Credit";s:8:"quantity";i:1;s:16:"base_price_money";a:2:{s:6:"amount";s:5:"28.85";s:8:"currency";s:3:"CAD";}}}

OUTPUT:

/client/pay/confirm/
O:8:"stdClass":1:{s:8:"checkout";O:8:"stdClass":8:{s:2:"id";s:30:"CBASEHpBfiAS*********wSu6OogAQ";s:17:"checkout_page_url";s:106:"https://connect.squareup.com/v2/checkout?c=CBASEHp*********wSu6OogAQ&l=CBASE*********2z8bcvY5gU*********gAQ";s:24:"ask_for_shipping_address";b:1;s:24:"pre_populate_buyer_email";s:15:"***@***.***";s:29:"pre_populate_shipping_address";O:8:"stdClass":8:{s:14:"address_line_1";s:25:"***-***";s:14:"address_line_2";s:0:"";s:8:"locality";s:7:"***";s:31:"administrative_district_level_1";s:7:"***";s:11:"postal_code";s:7:"***";s:7:"country";s:2:"CA";s:10:"first_name";s:5:"***";s:9:"last_name";s:6:"***";}s:12:"redirect_url";s:68:"https://***.***.com/callback/gw/1/square/?client_id=12";s:5:"order";O:8:"stdClass":6:{s:11:"location_id";s:30:"CBASEMK_*********UHIQgAQ";s:12:"reference_id";s:13:"***";s:10:"line_items";a:1:{i:0;O:8:"stdClass":7:{s:4:"name";s:14:"Payment Credit";s:8:"quantity";s:1:"1";s:16:"base_price_money";O:8:"stdClass":2:{s:6:"amount";i:2885;s:8:"currency";s:3:"CAD";}s:17:"gross_sales_money";O:8:"stdClass":2:{s:6:"amount";i:2885;s:8:"currency";s:3:"CAD";}s:15:"total_tax_money";O:8:"stdClass":2:{s:6:"amount";i:0;s:8:"currency";s:3:"CAD";}s:20:"total_discount_money";O:8:"stdClass":2:{s:6:"amount";i:0;s:8:"currency";s:3:"CAD";}s:11:"total_money";O:8:"stdClass":2:{s:6:"amount";i:2885;s:8:"currency";s:3:"CAD";}}}s:11:"total_money";O:8:"stdClass":2:{s:6:"amount";i:2885;s:8:"currency";s:3:"CAD";}s:15:"total_tax_money";O:8:"stdClass":2:{s:6:"amount";i:0;s:8:"currency";s:3:"CAD";}s:20:"total_discount_money";O:8:"stdClass":2:{s:6:"amount";i:0;s:8:"currency";s:3:"CAD";}}s:10:"created_at";s:20:"2017-11-19T15:49:21Z";}}

Link to post
Share on other sites

I found the problem, it looks like Square's API has been updated and broke the gateway.

Square released the Connect v2.5 version on November 2nd, with changes in transaction management.

I fixed the API and tested the gateway in Blesta 4.x and works pretty well. I attached the fixed version in this post.

square.zip

Link to post
Share on other sites
29 minutes ago, cyandark said:

I found the problem, it looks like Square's API has been updated and broke the gateway.

Square released the Connect v2.5 version on November 2nd, with changes in transaction management.

I fixed the API and tested the gateway in Blesta 4.x and works pretty well. I attached the fixed version in this post.

square.zip

You sure did :) 

DASFG.thumb.PNG.b6b3e5769862a4d6017499a880ad02c9.PNG

Thank you!!!!!

Link to post
Share on other sites
8 hours ago, cyandark said:

I found the problem, it looks like Square's API has been updated and broke the gateway.

Square released the Connect v2.5 version on November 2nd, with changes in transaction management.

I fixed the API and tested the gateway in Blesta 4.x and works pretty well. I attached the fixed version in this post.

square.zip

is there a way you could add a currency converter if the currency isn't in the currency set by Square mate? so USD is turned into GBP and recorded in Blesta in USD.

Link to post
Share on other sites
  • 2 weeks later...

@BlestaStore

Couple issues/questions:

  1. When a customer is "viewing the invoice and clicks on "Make Payment", it kicks the customer to their dashboard:|
    0001.thumb.PNG.df7963a2df3fac5febbb3b513ad62a4c.PNG

     
  2. When a customer is ready to pay the invoice, the payment options screen shows "Square". Is there any way for me to rename this to Credit Card, etc? Some customers have complained they don't understand how to proceed here. I may also add the credit card icons here..
     00002.thumb.PNG.c1233ff2082de35b78e5fc00cb6d26f2.PNG

     
  3. When a customer wants to click on "view" to see the invoice, the box doesn't resize automatically - any way to fix this?:
    00003.PNG.b83a08aeaa10e2feeeffe2d42b318696.PNG
    00004..PNG.693f6a3ecc15ef96cf781735bc247f3e.PNG
 
Any help is appreciated.
Link to post
Share on other sites

1. is a third party addon isn't it mate.

2. I edited the database label. In the "gateways" table find Square and change it to: name: Square (Card Payments)

3. That's a theme issue use this in the css:

FIX TABLE DROPDOWN CONFLICTS:
.panel_content .table-responsive{
  overflow-x: visible !important;
}

without the title :) it's just what I have it in my integration text file.

Link to post
Share on other sites
14 minutes ago, BlestaStore said:

1. is a third party addon isn't it mate.

2. I edited the database label. In the "gateways" table find Square and change it to: name: Square (Card Payments)

3. That's a theme issue use this in the css:

FIX TABLE DROPDOWN CONFLICTS:
.panel_content .table-responsive{
  overflow-x: visible !important;
}

without the title :) it's just what I have it in my integration text file.

Thank you mate.

I don't understand what you mean by the first comment though... The button just doesn't work. How can I edit it's hyperlink to kick the person to the same button as the dashboard (pay invoice), which works? Where's the location for that button?

Link to post
Share on other sites
1 minute ago, MistaGrk said:

I don't understand what you mean by the first comment though... The button just doesn't work. How can I edit it's hyperlink to kick the person to the same button as the dashboard (pay invoice), which works? Where's the location for that button?

I don't know that doesn't happen on mine.  I don't have a view invoice in my browser if it's default Blesta. 

Link to post
Share on other sites
On 11/30/2017 at 2:40 PM, BlestaStore said:

I don't know that doesn't happen on mine.  I don't have a view invoice in my browser if it's default Blesta. 

Ok, I get it doesn't happen to you but I'm asking for help on why it's happening on mine and how I can fix it.

I thought Blesta support was via this forum. Where should I go and ask?

Link to post
Share on other sites
10 hours ago, MistaGrk said:

Ok, I get it doesn't happen to you but I'm asking for help on why it's happening on mine and how I can fix it.

I thought Blesta support was via this forum. Where should I go and ask?

Whomever you got the new invoice template from as I've asked Paul and that doesn't ship with blesta so it's not one I and they can help with sorry.

Link to post
Share on other sites
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...