Skip to content
This repository was archived by the owner on Oct 2, 2025. It is now read-only.

Commit badac7f

Browse files
Update paywall3.md
1 parent 50aa9d6 commit badac7f

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed

docs/paywall3.md

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,17 @@ Example:
457457
paywall.isAuthenticated();
458458
```
459459

460+
### `showDonationsFlow`
461+
462+
This method initiates the donation flow.
463+
464+
Example:
465+
466+
```js
467+
paywall.showDonationsFlow(assetId);
468+
```
469+
470+
460471
### Asset Manipulation Methods
461472

462473
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
691702

692703
Here is the list of the HTML classes that can be used for creating each of the standalone functionalities:
693704

694-
| HTML class | Description |
705+
| HTML class | Description |
695706
|--------------|---------------|
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:
717+
718+
```
719+
<button class="inplayer-paywall-donations" data-asset-id="{asset-id}" />
720+
```
721+
722+
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.
703724

704725
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.
705726

@@ -751,16 +772,6 @@ Here are listed and defined the Paywall 3.0 standalone functions:
751772

752773
Table 4
753774

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:
757-
758-
```
759-
<button class="inplayer-paywall-donations" data-asset-id="{asset-id}" />
760-
```
761-
762-
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.
764775

765776
## Custom Asset Preview
766777

0 commit comments

Comments
 (0)