You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 2, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/paywall3.md
+30-7Lines changed: 30 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -457,6 +457,17 @@ Example:
457
457
paywall.isAuthenticated();
458
458
```
459
459
460
+
### `showDonationsFlow`
461
+
462
+
This method initiates the donation flow for the provided `assetId`. The donation flow lists all donation options added to the asset that is being accessed.
463
+
464
+
Example:
465
+
466
+
```js
467
+
paywall.showDonationsFlow(assetId);
468
+
```
469
+
470
+
460
471
### Asset Manipulation Methods
461
472
462
473
The Paywall 3.0 increases flexibility by introducing methods that help you easily manipulate with adding or removing specific or all assets to/from a paywall instance. Also, aids optimization of created paywall instances by giving you the choice of destroying those that are most likely not to be used in the recent future.
@@ -691,14 +702,25 @@ Although you may use the paywall's JavaScript methods to invoke some of the func
691
702
692
703
Here is the list of the HTML classes that can be used for creating each of the standalone functionalities:
693
704
694
-
| HTML class | Description |
705
+
| HTML class | Description |
695
706
|--------------|---------------|
696
-
|`inplayer-paywall-login`| Invokes the login screen of the paywall |
697
-
|`inplayer-paywall-logout`| Invokes the logout action |
698
-
|`inplayer-paywall-account`| Invokes the 'My Account' screen of the registered user |
699
-
|`inplayer-paywall-ccm`| Invokes the default card management screen |
700
-
|`inplayer-paywall-change-pass`| Invokes the 'Change Password' screen |
701
-
|`inplayer-paywall-purchases`| Invokes the 'My Purchases' paywall screen where an end-user can see the list of payments they have completed |
707
+
|`inplayer-paywall-login`| Invokes the login screen of the paywall |
708
+
|`inplayer-paywall-logout`| Invokes the logout action |
709
+
|`inplayer-paywall-account`| Invokes the 'My Account' screen of the registered user |
710
+
|`inplayer-paywall-ccm`| Invokes the default card management screen |
711
+
|`inplayer-paywall-change-pass`| Invokes the 'Change Password' screen |
712
+
|`inplayer-paywall-purchases`| Invokes the 'My Purchases' paywall screen where an end-user can see the list of payments they have completed |
713
+
|`inplayer-paywall-donations`| Invokes the donations flow for the provided asset. See below for example of usage |
714
+
715
+
716
+
The HTML class **inplayer-paywall-donations** can be added to any HTML element. The `asset-id` represents the ID of a specific InPlayer asset. Usage example:
When clicking on this element, the donations flow for the provided asset is initiated by opening the donation options screen.
723
+
The donation options screen lists all donation options added to the asset that is being accessed. After selecting a donation option the end-user can proceed with the donation payment.
702
724
703
725
The advantage of using these classes is that they come with a built-in logic for displaying and hiding the elements, depending on whether the user is authenticated or not. For example, the HTML element with the **inplayer-paywall-logout class** will only be shown when the user is authenticated.
704
726
@@ -750,6 +772,7 @@ Here are listed and defined the Paywall 3.0 standalone functions:
750
772
751
773
Table 4
752
774
775
+
753
776
## Custom Asset Preview
754
777
755
778
There's a default asset preview template that you can tweak via our dashboard but if that doesn't meet your custom needs, you can always use the `noPreview` flag (by setting it to `true`) to disable displaying of the default preview altogether and put your own preview HTML code in the asset div.
0 commit comments