Questions tagged [square]

Square APIs lets developers process payments online & in-person as well as accessing different information in Square merchant accounts.

Square offers Rest APIs for accessing merchant account data (with their permission of course!) as well as e-commerce. You can also integrate with Square's hardware in your mobile devices with the Point of Sale API for Android, iOS and the web.

Learn more about Square's offerings for developers at Square.com/developers

657 questions
3
votes
2 answers

Can bus events be seen by other process?

Imagine I'm using otto to send events over a bus. Is it possible to set up another service that runs on a separate process that can listen to the same bus events? I think since it's another JVM that the bus events will not be delivered to the other…
j2emanue
  • 60,549
  • 65
  • 286
  • 456
3
votes
0 answers

OkHttp is not caching responses on Android

I am using retrofit 1.8.0, okhttp 2.1.0 and okhttp-urlconnection 2.1.0, I want to cache the responses I get from server and use them when there is no internet connection, this is my code: RequestInterceptor requestInterceptor = new…
khaled sultan
  • 75
  • 1
  • 4
3
votes
0 answers

Is there an equivalent of Paypal's IPN (instant payment notification) with Square Connect?

I would like Square Connect to hit my URL when a new payment occurs, similar to Paypal's IPN. I couldn't find this simple but very useful use case description in SC docs, are there plans to implement it? All my app needs is a request on a URL I…
user3651020
  • 101
  • 1
  • 1
  • 4
3
votes
1 answer

Enable logging in external library

I am using retrofit library from square(added as a jar dependency), which has a logger configured. (link) private static final Logger LOGGER = Logger.getLogger(RestAdapter.class.getName()); How can I enable logging in this library (from my…
bsr
  • 57,282
  • 86
  • 216
  • 316
2
votes
0 answers

square - cash app button won't render properly

I don't know why the button won't render properly on the screen. I've copied & pasted the example from the docs found here:
JC23
  • 1,248
  • 4
  • 18
  • 28
2
votes
1 answer

Create a rectangle net/list from 2D Points in python

I have a series of points that are to be sorted into adjacent squares so that a mesh is created. is there maby anything comparable to the Delaunay triangulation? Picture from input points in blue and goal in red import numpy as np import…
xDan
  • 21
  • 2
2
votes
0 answers

Square Python API "unexpected keyword argument" TypeError despite being expected

I'm trying to use Square's Python API to GET some data using the example code they provide in their GitHub repo: from square.client import Client # Create an instance of the API Client # and initialize it with the credentials # for the Square…
2
votes
1 answer

Can't save credit card using Square's Cards API - Error: Invalid Source-id

I am trying to allow users to create monthly subscriptions via my website. To achieve the above, I've followed Square's suggested flow: Use Payments SDK to collect users card information client side and generate a token and source_id for the credit…
2
votes
1 answer

Why am I receiving "Read-only field is calculated and cannot be set by a client. (order.returns)" from Square? (I'm not sending that field)

I'm using Square for processing payments, and trying to make a refund I'm getting the following response: {"errors": [{"code": "INVALID_VALUE","detail": "Read-only field is calculated and cannot be set by a client.","field":…
2
votes
2 answers

I'm trying to approximate the square root of 2 in python

here is the code i wrote. my idea is put a number(between 0~9) at the end of x and square it and then see if it's smaller than 2 ,choosing the biggest x = 1.4 for n in range(21): next_num = [0,1,2,3,4,5,6,7,8,9] candidate = [] for…
2
votes
1 answer

Saving User's card in Square Payments

I'm new to Square and want to implement it in a React Native app with a Node backend. I see that there is a method to save the customer's card details. https://github.com/square/square-nodejs-sdk/blob/master/src/api/customersApi.ts#L230 But there is…
2
votes
2 answers

Numpy square return wrong values for array

I have a data set where pairs of numbers are represented by 32 bits, each number is represented as two 8 unsigned integers. I'm trying to get the first real part in one array and the complex part in a second array. I'm then trying to square each…
Meow
  • 25
  • 4
2
votes
2 answers

How can I minimize two integers so that their product is less than a certain value?

Given two integers, how can I minimize them so that their product is less than some other value, while maintaining their relative ratio? That's the formal problem. The practical problem is this: I have width/height pixel resolutions containing…
Tyson
  • 1,226
  • 1
  • 10
  • 33
2
votes
0 answers

React Native Square In-app payment, something went wrong, code:unexpected

I'm currently adding the Square In-App payment SDK(version 1.3.1) to the React Native app. Running it on iPhone 8 iOS:13.3 I basically copied the code from Square's doc, here is the code: async componentDidMount(){ this._loadCreditCardInfo() …
Difeng Chen
  • 155
  • 1
  • 1
  • 9
2
votes
2 answers

How do I remove the recursion from the drawSquare method and get the exact same result?

I need to remove the recursion from the drawSquare method. There is a lot more I have to do after removing the recursion from that method however the rest I can figure out on my own. I just really need a working solution that does the exact same…