Integrate Square payment to B4a and B4i

DonManfred

Expert
Licensed User
Anyone here can develop me a wrapper library?
What is your budget?

Note that i only can help with a B4A Library.

A result from my first test (Note that the library is not fully finished as yet)


I do not create libraries for B4i.
 
Last edited:

Tasyo28

Member
Licensed User
Hi DonManfred,

Thanks for this quote, I'm one of your fans here in this forum :), how much is your best price for the full library in B4a?

Thanks and Regards,
Tasyo
 

Tasyo28

Member
Licensed User
You are veteran here your more than experience to know how much it will cost :) please tell me your very best price
 

DonManfred

Expert
Licensed User
For B4A Library of the Android-Soution: $25
Note that you only can start a transaction and you´ll get a few infos after the Payment is done.
There is only clientTransactionId and serverTransactionId.

B4X:
    pos.Initialize("SuareSDK","xxxxx-xxxxxxxxxxxxxxxxxxxx")
    If pos.POSInstalled = False Then
        pos.openPOSPlayStoreListing
    End If
[...]
Sub btnCharge_Click
    pos.startTransaction(98,"EUR","Testcharge") ' 0.98 Euro
End Sub


B4X:
Sub SquareSDK_Result(ResultCode As Int, result As Map)
    Log($"SquareSDK_Result(${ResultCode},${result})"$)
    If ResultCode = -1 Then
        ' Success
        Log($"ChargeRequest-Success"$)
        Log(result)
    Else
        ' Error
        Log($"ChargeRequest-Error"$)
        Log(result)
    End If
End Sub
B4X:
** Activity (main) Resume **
SquareSDK_Result(-1,{clientTransactionId=f1dbe69b-eceb-4fdb-ab5f-02957b8eaea7, requestMetadata=null, serverTransactionId=null})
ChargeRequest-Success
(MyMap) {clientTransactionId=f1dbe69b-eceb-4fdb-ab5f-02957b8eaea7, requestMetadata=null, serverTransactionId=null}
More details you may get with the REST Api which they provide....
 
Last edited:

Tasyo28

Member
Licensed User
Huwow! nice your the man!!!!, DonManfred i will go to you because of your reputation in this forum, but can we make it 20$ please? if possible.

Thank you so much!
 

DonManfred

Expert
Licensed User
Do you have documentation on it?
i guess you should consider reading the square documentation about the point of sale functionality.
How can i pay?
click oin the donatebutton in my signature and leave a comment for what you did donated... ;-)

Edit: if you have setup not to show signatures:
 

Tasyo28

Member
Licensed User
Is the library already finalized? Ok ill pay you in paypal when i get home.

Also if you can take my other job requirement? Please im sure it will be easy for you please
 

Tasyo28

Member
Licensed User
Added a Requestbuilder where you can set all Properties.
Also changed the example to use the new builder
Hi DonManfred,

I'm still newbie in this kind of payment (square), i just created an account in square developer, created an app, i already have the application ID and i copy it in your code.

B4X:
pos.Initialize("SuareSDK","xxxxx-xxxxxxxxxxxxxxxxxxxx")
    If pos.POSInstalled = False Then
        pos.openPOSPlayStoreListing
    End If
[...]
Sub btnCharge_Click
    pos.startTransaction(98,"EUR","Testcharge") ' 0.98 Euro
End Sub
but i get this error (please note that i already changed the appid)

B4X:
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
ResultArrived(0)
ResultArrived Error com.squareup.sdk.pos.ChargeRequest$Error@828465f
ResultArrived Error.Code INVALID_REQUEST
ResultArrived Error.debugDescription The app package name is unknown. Ensure your registered Package Name is b4a.example and the associated Fingerprint is DD:2B:8F:AB:67:57:7C:D9:88:1D:EB:A7:E7:6D:7B:8D:F5 on https://connect.squareup.com/apps/xxxxx-xxxxxxxxxxxxxxxxxxxx/point-of-sale-api.
ResultArrived Error.requestMetadata metadatablabla
** Activity (main) Resume **
SquareSDK_Result(0,{Code=6, CodeName=INVALID_REQUEST, requestMetadata=metadatablabla})
ChargeRequest-Error
(MyMap) {Code=6, CodeName=INVALID_REQUEST, requestMetadata=metadatablabla}
** Activity (main) Pause, UserClosed = false **
 
Last edited:

DonManfred

Expert
Licensed User
ResultArrived Error com.squareup.sdk.pos.ChargeRequest$Error@828465f
ResultArrived Error.Code INVALID_REQUEST
ResultArrived Error.debugDescription The app package name
is unknown. Ensure your registered Package Name is b4a.example and the associated Fingerprint is DD:2B:8F:AB:67:57:7C:E5:57:12:D9:88:1D:EB:A7:E7:6D:7B:8D:F5 on https://connect.squareup.com/apps/xxxxx-xxxxxxxxxxxxxxxxxxxx/point-of-sale-api.
Make sure you added your packagename in Square-site and also your signkey

 

Tasyo28

Member
Licensed User
Make sure you added your packagename in Square-site and also your signkey


Hi DonManfred,

Thank you so much! now everything runs smoothly, also i sent the donation.

One question how to change the Fingerprint value? is this autogenerated per device?

Apparently Square Point of Sale is not working in middle east sad to say :(:(

Will you update the library you created incase Squareup update their SDK?

Thanks and Regards,
Tasyo
 
Top