does CodeNameOne support ApplePay & GooglePay using AWS cognito token?

14 views
Skip to first unread message

jenny...@gmail.com

unread,
Aug 27, 2018, 1:04:36 PM8/27/18
to CodenameOne Discussions
I am trying to find an example codenameone project for online payment app (e.g. Apple Pay, googlePay etc.); managed to set-up this project here - https://github.com/codenameone/BraintreeCodenameOne; but it failed at the function below with null pointer -
public static void startOrder(Callback callback) {
    // fetch token from the server
BraintreePaymentCallback.cb = callback;
String token = callback.fetchToken();

I wonder has anybody implemented the fetchToken() function before?

Thanks

Shai Almog

unread,
Aug 28, 2018, 1:43:24 AM8/28/18
to CodenameOne Discussions
Did it fail on the device?
Notice that this API doesn't work well on the simulator but should work on the device.
Did you pass the callback object instance?

The fetch token method is implemented in the server side, we used this API in several apps within the online course here https://codenameone.teachable.com/p/build-real-world-full-stack-mobile-apps-in-java

Generally that method is pretty easy to implement in the server by following the braintree tutorials.
Reply all
Reply to author
Forward
0 new messages