Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public interface PaywallListener

Receives what happens on a paywall. Every method is called on the EDT.

Methods

public abstract void purchaseStarted(CommercePackage pkg)The customer pressed the purchase button and the store was asked to sell the package.
public abstract void purchaseCompleted(CustomerInfo info)The cloud confirmed the purchase: the customer now owns the product of the package.
public abstract void purchaseCancelled()The paywall was closed after a purchase was started and before the cloud confirmed it.
public abstract void restoreCompleted(CustomerInfo info)The customer information changed after the customer asked to restore purchases.
public abstract void closed()The paywall was closed: by the customer, or by itself after a completed purchase or restore when Paywall.show(Offering, PaywallListener) showed it.

Method details

purchaseStarted

public abstract void purchaseStarted(CommercePackage pkg)
The customer pressed the purchase button and the store was asked to sell the package.

Parameters

pkg CommercePackage
the package being bought

purchaseCompleted

public abstract void purchaseCompleted(CustomerInfo info)
The cloud confirmed the purchase: the customer now owns the product of the package. A paywall shown by Paywall.show(Offering, PaywallListener) has already returned to the form it was shown over; a PaywallView in a form of the application is still showing.

Parameters

info CustomerInfo
the customer information that includes the purchase

purchaseCancelled

public abstract void purchaseCancelled()
The paywall was closed after a purchase was started and before the cloud confirmed it.

restoreCompleted

public abstract void restoreCompleted(CustomerInfo info)
The customer information changed after the customer asked to restore purchases. A paywall shown by Paywall.show(Offering, PaywallListener) has already returned to the form it was shown over.

Parameters

info CustomerInfo
the customer information after the restore

closed

public abstract void closed()
The paywall was closed: by the customer, or by itself after a completed purchase or restore when Paywall.show(Offering, PaywallListener) showed it.