square

Retrofit - @Body parameters cannot be used with form or multi-part encoding

余生颓废 提交于 2019-12-29 18:17:21
问题 I m trying to make a request in which I want to include a Header , a form-urlencoded field and a json body. My Retrofit interface is as follows @FormUrlEncoded @POST("/api/register") Observable<RegisterResponse> register( @Header("Authorization") String authorization, @Field("grant_type") String grantType, @Body RegisterBody body ); When I make this request I get back exception @Body parameters cannot be used with form or multi-part encoding. I have also tried with the @Multipart annotation:

Checkout API get email of buyer on redirect

五迷三道 提交于 2019-12-24 10:08:34
问题 So using the square checkout api, after the user uses the square checkout, I get a transaction id and checkout id, but it seems theres no way to get the information the buyer entered at checkout. How can I get the email and name of said buyer? Tried getting the info through the checkout id but it seems its not possible // pull out the transaction ID returned by Square Checkout $returnedTransactionId = $_GET["transactionId"]; // Create a new API object to verify the transaction

OpenCV detect square with difficult background

久未见 提交于 2019-12-23 22:16:46
问题 i am working on an Android app that will recognize a GO board and create a SGF file of it. i need to detect the whole board in order to warp it and to be able to find the correct lines and stones like below. (source: eightytwo.axc.nl) right now i use an Opencv RGB Mat and do the following: separate the channels canny the separate channels Imgproc.Canny(channel, temp_canny, 30, 100); combine (bitwise OR) all channels. Core.bitwise_or(temp_canny, canny, canny); find the board contour Still i am

Get String response body from retrofit2

一曲冷凌霜 提交于 2019-12-19 04:05:31
问题 I am using retrofit1 old style @GET("/loginUser") public Call<Response> login( @Query("email") String email, @Query("password") String password, Callback<Response> callback); Now i don't want to get "User" class however i want to get a String response. Previously we were using "Response" However there is no Response in retrofit2, How can i get string response or full body response from the server without using any json parsing? 回答1: Create this class import java.io.IOException; import java

How to parse Square response nested key values in Ruby 2.2.10

情到浓时终转凉″ 提交于 2019-12-13 04:44:29
问题 How would you get the value of the last_4 key form this hash? I have a response nonce from a Square transaction. I pass the response through Ajax to Ruby where it comes out as a parameter string. Iv'e tried converting the string to a hash. I've also tried JSON.parse. This is an actual response nonce from a Square sandbox transaction. I've truncated some of the IDs and replaced others. Also i put in carriage returns to make it more human readable: {:transaction=>{ :id=>"smqfzS00qbp1lOy...",

Checkout API Setup Guide references commands that kill test pages AND do not exist in API

被刻印的时光 ゝ 提交于 2019-12-13 03:56:21
问题 The following code snippets in the Checkout API Setup Guide at https://docs.connect.squareup.com/payments/checkout/setup references GetID() cause the page to fail and are not in the API: $checkoutId = $result->getId(); AND $checkoutUrl = $result->getCheckoutPageUrl(); In fact, I cannot find reference to those commands anywhere in the technical docs or API reference except on the Setup Guide. Is the Setup Guide wrong or am I missing something? Is Checkout not fully live? I am not sure why a

How to Load Square Payment Form in Shadow DOM

隐身守侯 提交于 2019-12-12 04:31:31
问题 I am trying to create a Web Component for the Square Payment form, but am having trouble getting it to load into the shadow DOM. I am wondering whether or not this is possible, since the form is populated with a script from the Square CDN. Has anyone had any luck with this use case? I am using code from an example on https://docs.connect.squareup.com/articles/adding-payment-form and inserting it into a Web Component template. The full code example is on Codepen. https://codepen.io/kvnapavl

Square Connect with node/angular

南楼画角 提交于 2019-12-11 19:13:38
问题 I am trying to integrate the Square Online payments into my web app. Here is the error I am getting: Uncaught FormNotReadyError: Cannot call SqPaymentForm#requestCardNonce before SqPaymentForm is ready. I have not been able to really find anything with integrating Square online payments into Angular, and I am still fairly new to angular/node. Thanks payment.html <div id="form-container"> <div id="sq-ccbox"> <form id="nonce-form" novalidate action="process-payment" method="post"> <fieldset>

How to generate card nonce for repeated transactions without making users to enter card details?

风格不统一 提交于 2019-12-11 18:07:10
问题 We have a requirement that payment should be initiated repeatedly without user's intervention just like monthly/yearly subscription fees for Mobile Apps in Google Play store . The payment should be triggered from the back end automatically after a particular interval (amount may not be same for every interval). We found that in square payment card nonce is used for performing a transaction. Card nonce is generated from the Payment form when the users enter their card information for the first

How to retrieve Square orderIds for Call to BatchRetrieveORders

被刻印的时光 ゝ 提交于 2019-12-11 15:43:57
问题 I want to retrieve a list of orders using the Square API. The call to retrieve orders is a POST call with a String array of order_ids however I'm not sure where I can get this information. In the docs they said I can use the ListTransactions endpoint to get this information but I'm not able to find the order_id within the response. The documentation to retrieve Orders located at: https://docs.connect.squareup.com/api/connect/v2#endpoint-batchretrieveorders see sample response of