-
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.
Switch to ng-packagr, adds 'custom' parameter to IPayPalTransaction
- Loading branch information
Showing
61 changed files
with
3,914 additions
and
3,783 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
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 |
---|---|---|
|
@@ -5,4 +5,4 @@ node_js: | |
before_script: | ||
- npm install | ||
script: | ||
- ng build --aot | ||
- ng build ngx-paypal-lib |
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
Empty file.
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 |
---|---|---|
@@ -0,0 +1,117 @@ | ||
<h1>Angular PayPal</h1> | ||
|
||
<div class="mt-2"> | ||
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>. | ||
</div> | ||
|
||
<h2 class="mt-3"> | ||
Live Preview (Sandbox - client side integration) | ||
</h2> | ||
|
||
<div class="mt-2"> | ||
<ngx-paypal [config]="payPalConfig"></ngx-paypal> | ||
</div> | ||
|
||
<h2 class="mt-3"> | ||
Installation | ||
</h2> | ||
|
||
<div class="mt-2"> | ||
<pre> | ||
<code [innerText]="npmCode"></code> | ||
<code [innerText]="moduleInstallation"></code> | ||
</pre> | ||
</div> | ||
|
||
<h2> | ||
Usage | ||
</h2> | ||
|
||
<div class="mt-2"> | ||
<pre > | ||
<code [innerText]="usageCodeTs"></code> | ||
<code [innerText]="htmlCode"></code> | ||
</pre> | ||
</div> | ||
|
||
<h2> | ||
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> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { TestBed, async } from '@angular/core/testing'; | ||
import { AppComponent } from './app.component'; | ||
describe('AppComponent', () => { | ||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ | ||
AppComponent | ||
], | ||
}).compileComponents(); | ||
})); | ||
it('should create the app', async(() => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
const app = fixture.debugElement.componentInstance; | ||
expect(app).toBeTruthy(); | ||
})); | ||
it(`should have as title 'app'`, async(() => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
const app = fixture.debugElement.componentInstance; | ||
expect(app.title).toEqual('app'); | ||
})); | ||
it('should render title in a h1 tag', async(() => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
fixture.detectChanges(); | ||
const compiled = fixture.debugElement.nativeElement; | ||
expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); | ||
})); | ||
}); |
Oops, something went wrong.