FSCheckoutSheet

1.0.0

A WKWebView wrapper that handles interaction w/ a FastSpring checkout form
ZeeZide/FSCheckoutSheet

What's New

Checking Out

2021-05-10T15:29:22Z

Initial release, driving Shrugs for over a year now, so probably worth a 1.0.

FSCheckoutSheet

A WKWebView wrapper that handles interaction w/ a FastSpring checkout form. FastSpring is an online store provider, useful for selling digital products. For example Mac applications outside of Apple's Mac App Store.

This package is only dealing with the actual FastSpring checkout process, it doesn't provide any In-App store parts. To see it in a live app, download Shrugs.app.

Inspired by Make Money Outside the Mac App Store. This code doesn't require a "classic" FastSpring store, but uses the regular one. It uses the Store Builder Library to configure the checkout, and scans the result for licenses after a successful checkout.

Usage

The package provides a single NSViewController used for checkout: FastSpringCheckoutVC.

let vc = FastSpringCheckoutVC()
vc.checkoutProduct("soy-for-community-slacks",
                   in: "zeezide.onfastspring.com") {
    licenseKeys in

    for licenseKey in licenseKeys {
        print("User",   licenseKey.name,
              "bought", licenseKey.sku,
              "code:",  licenseKey.code)
    }
}

self.presentAsSheet(vc)

Note: Currently this is only reporting CocoaFob licenses.

Don't forget to enable client network connections if your hosting app is sandboxed! Otherwise you'll just see the spinner or a white background.

Import Package

The Package URL is: https://github.com/ZeeZide/FSCheckoutSheet.git, can be added to your Xcode project.

Demo Application

The Demo folder contains a demo application for the sheet. Configure your store (e.g. a test store) in the Configuration.swift file, to play with the panel. By default it is configured to access the live Shrugs.app store, so careful, what you buy is what you buy :-)

Looks like this:

Who

FSCheckoutSheet is brought to you by ZeeZide. We like feedback, GitHub stars, cool contract work, presumably any form of praise you can think of.

Description

  • Swift Tools 5.0.0
View More Packages from this Author

Dependencies

  • None
Last updated: Mon Apr 15 2024 10:22:22 GMT-0900 (Hawaii-Aleutian Daylight Time)