Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public interface PlatformPay.Provider
The wallet integration of a port that needs a dependency the port jar
cannot carry. The Android build installs the Google Pay provider; apps
and tests may install their own.
Methods
Method details
isReadyToPay
public abstract void isReadyToPay(String googlePayJson, boolean test, SuccessCallback<Boolean> callback)Answers whether the user can pay with the wallet.
Parameters
googlePayJsonString- the Google Pay
IsReadyToPayRequestJSON testboolean- true for the wallet’s test environment
callbackSuccessCallback<Boolean>- receives the answer
requestPayment
public abstract void requestPayment(String googlePayJson, boolean test, SuccessCallback<String> callback)Shows the payment sheet.
Parameters
googlePayJsonString- the Google Pay
PaymentDataRequestJSON testboolean- true for the wallet’s test environment
callbackSuccessCallback<String>- receives the encoded result, see
Result#decode(String)