Hi, I'm new to square but not credit card processing. I'm currently using Authorize.net's Advanced Integration Method (AIM) to charge cards in an eCommerce application from a back end server. Is there an example of how to integrate Square into a back end system using Java?
ANet uses code such as:
import net.authorize.*;
import net.authorize.aim.*;
Merchant merchant_ = Merchant.createMerchant(Environment.SANDBOX, apiLoginID, transactionKey);
Transaction anetTrans = merchant_.createAIMTransaction(anetTransType, new BigDecimal(ccrTrans.amount()));
Result<Transaction> result = (Result<Transaction>) merchant_.postTransaction(anetTrans);
Thanks Sean. I have it figured out. It seems like its just a simple HTTPSConnection with a get for the Locations and a post for the transactions. I'm having other problems getting the nonce for the transaction from SqPaymentForm but that a different challange.
@zappullae - Let me check with our developer team on this one. 🙃
Thanks Sean. I have it figured out. It seems like its just a simple HTTPSConnection with a get for the Locations and a post for the transactions. I'm having other problems getting the nonce for the transaction from SqPaymentForm but that a different challange.
@zappullae - Glad to hear, and I think that Spenser might be helping you out with that thread.
@zappullae - Our developer team did share the following details as well: we don't currently have a Java SDK or examples yet, but you may find using the Unirest or OkHttp libraries useful in making calls to our API. If it's helpful, you can use code samples for other languages as a reference (https://docs.connect.squareup.com/articles/code-samples/). We'll forward Java examples and SDKs to the team as a feature request.
Thanks. I decyphered the PHP code and turned it into Java.
Square Community