-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ability to hide shipping address field and customize business name, l…
…ogo image and locale in which the payment page is shown.
- Loading branch information
1 parent
b980f77
commit a077b66
Showing
4 changed files
with
147 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,132 +1,146 @@ | ||
<h1>Angular PayPal</h1> | ||
|
||
<div class="mt-2"> | ||
Supported versions: <strong>Angular 6+</strong> | ||
Supported versions: | ||
<strong>Angular 6+</strong> | ||
</div> | ||
|
||
<div class="alert alert-warning mt-2" role="alert"> | ||
More features will be added depending on how much traction this gets. <a href="https://github.com/Enngage/ngx-paypal">Star repo</a>. | ||
More features will be added depending on how much traction this gets. | ||
<a href="https://github.com/Enngage/ngx-paypal">Star repo</a>. | ||
</div> | ||
|
||
<h2 class="mt-3"> | ||
Live Preview (Sandbox - client side integration) | ||
<h2 class="mt-3"> | ||
Live Preview (Sandbox - client side integration) | ||
</h2> | ||
|
||
<div class="mt-2"> | ||
<ngx-paypal [config]="payPalConfig"></ngx-paypal> | ||
<ngx-paypal [config]="payPalConfig"></ngx-paypal> | ||
</div> | ||
|
||
<h2 class="mt-3"> | ||
Installation | ||
Installation | ||
</h2> | ||
|
||
<div class="mt-2"> | ||
<pre> | ||
<pre> | ||
<code [innerText]="npmCode"></code> | ||
<code [innerText]="moduleInstallation"></code> | ||
</pre> | ||
</div> | ||
|
||
<h2> | ||
Usage | ||
Usage | ||
</h2> | ||
|
||
<div class="mt-2"> | ||
<pre > | ||
<pre> | ||
<code [innerText]="usageCodeTs"></code> | ||
<code [innerText]="htmlCode"></code> | ||
</pre> | ||
</div> | ||
|
||
<h2> | ||
Configuration (<em>PayPalConfig</em>) | ||
Configuration ( | ||
<em>PayPalConfig</em>) | ||
</h2> | ||
|
||
<div class="mt-2"> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th scope="col">Property</th> | ||
<th scope="col">Type</th> | ||
<th scope="col">Description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>integrationType</td> | ||
<td>PayPalIntegrationType</td> | ||
<td>Type of the integration (client | server)</td> | ||
</tr> | ||
<tr> | ||
<td>environment</td> | ||
<td>PayPalEnvironment</td> | ||
<td>Environment (sandbox | production)</td> | ||
</tr> | ||
<tr> | ||
<td>commit</td> | ||
<td>boolean</td> | ||
<td>SShow 'Pay Now' button config</td> | ||
</tr> | ||
<tr> | ||
<td>payment</td> | ||
<td>() => Observable<string></td> | ||
<td>Called to create new payment for server side integration</td> | ||
</tr> | ||
<tr> | ||
<td>onAuthorize</td> | ||
<td>(data: IPayPalPaymentCompleteData, actions: any) => Observable<void></td> | ||
<td>Called to execute payment for server side integration</td> | ||
</tr> | ||
<tr> | ||
<td>client</td> | ||
<td>IPaypalClient</td> | ||
<td>Client tokens for client side integration</td> | ||
</tr> | ||
<tr> | ||
<td>transactions</td> | ||
<td>IPayPalTransaction[]</td> | ||
<td>Array of transaction, required for client side integration</td> | ||
</tr> | ||
<tr> | ||
<td>onPaymentComplete</td> | ||
<td>(data: IPayPalPaymentCompleteData, actions: any) => void</td> | ||
<td>Called for client side integration when payment is executed</td> | ||
</tr> | ||
<tr> | ||
<td>button</td> | ||
<td>IPayPalButtonStyle</td> | ||
<td>Button configuration</td> | ||
</tr> | ||
<tr> | ||
<td>funding</td> | ||
<td>IPayPalFunding</td> | ||
<td>Paypal funding configuration</td> | ||
</tr> | ||
<tr> | ||
<td>onError</td> | ||
<td>(err: any) => void</td> | ||
<td>Called when PayPal experiences an error</td> | ||
</tr> | ||
<tr> | ||
<td>onCancel</td> | ||
<td>(data: IPayPalCancelPayment, actions: any) => void</td> | ||
<td>Called when user cancels payment</td> | ||
</tr> | ||
<tr> | ||
<td>onClick</td> | ||
<td>() => void</td> | ||
<td>Called when user clicks on PayPal button</td> | ||
</tr> | ||
<tr> | ||
<td>validate</td> | ||
<td>(actions: any) => void</td> | ||
<td>Can be used to perform validation as mentioned <a href="https://developer.paypal.com/demo/checkout/#/pattern/validation" target="_blank">here</a></td> | ||
</tr> | ||
<tr> | ||
<td>note_to_payer</td> | ||
<td>string?</td> | ||
<td>Note to payer</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th scope="col">Property</th> | ||
<th scope="col">Type</th> | ||
<th scope="col">Description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>integrationType</td> | ||
<td>PayPalIntegrationType</td> | ||
<td>Type of the integration (client | server)</td> | ||
</tr> | ||
<tr> | ||
<td>environment</td> | ||
<td>PayPalEnvironment</td> | ||
<td>Environment (sandbox | production)</td> | ||
</tr> | ||
<tr> | ||
<td>commit</td> | ||
<td>boolean</td> | ||
<td>Show 'Pay Now' button config</td> | ||
</tr> | ||
<tr> | ||
<td>payment</td> | ||
<td>() => Observable<string></td> | ||
<td>Called to create new payment for server side integration</td> | ||
</tr> | ||
<tr> | ||
<td>onAuthorize</td> | ||
<td>(data: IPayPalPaymentCompleteData, actions: any) => Observable<void></td> | ||
<td>Called to execute payment for server side integration</td> | ||
</tr> | ||
<tr> | ||
<td>client</td> | ||
<td>IPaypalClient</td> | ||
<td>Client tokens for client side integration</td> | ||
</tr> | ||
<tr> | ||
<td>transactions</td> | ||
<td>IPayPalTransaction[]</td> | ||
<td>Array of transaction, required for client side integration</td> | ||
</tr> | ||
<tr> | ||
<td>onPaymentComplete</td> | ||
<td>(data: IPayPalPaymentCompleteData, actions: any) => void</td> | ||
<td>Called for client side integration when payment is executed</td> | ||
</tr> | ||
<tr> | ||
<td>button</td> | ||
<td>IPayPalButtonStyle</td> | ||
<td>Button configuration</td> | ||
</tr> | ||
<tr> | ||
<td>funding</td> | ||
<td>IPayPalFunding</td> | ||
<td>Paypal funding configuration</td> | ||
</tr> | ||
<tr> | ||
<td>onError</td> | ||
<td>(err: any) => void</td> | ||
<td>Called when PayPal experiences an error</td> | ||
</tr> | ||
<tr> | ||
<td>onCancel</td> | ||
<td>(data: IPayPalCancelPayment, actions: any) => void</td> | ||
<td>Called when user cancels payment</td> | ||
</tr> | ||
<tr> | ||
<td>onClick</td> | ||
<td>() => void</td> | ||
<td>Called when user clicks on PayPal button</td> | ||
</tr> | ||
<tr> | ||
<td>validate</td> | ||
<td>(actions: any) => void</td> | ||
<td>Can be used to perform validation as mentioned | ||
<a href="https://developer.paypal.com/demo/checkout/#/pattern/validation" | ||
target="_blank">here</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>note_to_payer</td> | ||
<td>string?</td> | ||
<td>Note to payer</td> | ||
</tr> | ||
<tr> | ||
<td>experience</td> | ||
<td>IPayPalExperience</td> | ||
<td>Payment Experience configurations as documented | ||
<a href="https://developer.paypal.com/docs/api/payment-experience/v1/#definition-presentation" | ||
target="_blank">here</a> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters