Skip to content

Latest commit

 

History

History
46 lines (39 loc) · 996 Bytes

README.md

File metadata and controls

46 lines (39 loc) · 996 Bytes

extern-js-in-app-purchase

  • Target : Javascript (NodeJS)
  • Library : in-app-purchase
  • Last tested version : 1.1.1
  • Available on : Github - NPM

Usage

import js.inapppurchase.*;

class Main
{
  static function main()
  {
    InAppPurchase.setup(function(error) {
      if (null != error) {
        trace(error);
        return; 
      }

      InAppPurchase.validate(InAppPurchase.APPLE, receipt, function(error, response) {
        if (null != error) {
            trace(error);
            return; 
        }
        
        if (InAppPurchase.isValidated(response)) {
          var purchaseDataList = InAppPurchase.getPurchaseData(response);
          /*
            [
              {
                productId: xxx,
                purchasedDate: yyy,
                quantity: zzz
              }
            ]
          */
        }
      });
    });
  }
}