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
+29-18Lines changed: 29 additions & 18 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.
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,15 +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 |
702
-
|`inplayer-paywall-donations`| Invokes the donations flow for the provided asset |
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 |
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.
703
724
704
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.
705
726
@@ -751,16 +772,6 @@ Here are listed and defined the Paywall 3.0 standalone functions:
751
772
752
773
Table 4
753
774
754
-
### `donations`
755
-
756
-
This HTML class 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.
763
-
The donation options screen lists all donation options added to the asset that is being accessed. Upon selecting a donation option, with the user being logged in, the payment screen with the card payment method only available for donation will be shown. Once the payment is complete, a screen with a thank you message is displayed.
0 commit comments