Skip to content

Commit 0cf7b31

Browse files
ashinzekeneonyilo
andauthored
Add split code option (#85)
* Split Code Option Added * Merged * remove lock * reset package-lock * fix number * Build docs --------- Co-authored-by: Joe Onyilo <[email protected]>
1 parent 7638c69 commit 0cf7b31

11 files changed

+16
-5
lines changed

docs/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
<link rel="stylesheet" href="styles.ef46db3751d8e999.css"></head>
88
<body>
99
<app-root></app-root>
10-
<script src="runtime.28d09d76bf1169de.js" type="module"></script><script src="polyfills.359a8d996a1015c2.js" type="module"></script><script src="main.1457c096e037997a.js" type="module"></script>
10+
<script src="runtime.28d09d76bf1169de.js" type="module"></script><script src="polyfills.359a8d996a1015c2.js" type="module"></script><script src="main.3d57e84c18aab1d8.js" type="module"></script>
1111

1212
</body></html>

docs/main.1457c096e037997a.js renamed to docs/main.3d57e84c18aab1d8.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

projects/angular4-paystack/src/lib/angular4-paystack-embed.component.ts

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export class Angular4PaystackEmbedComponent implements OnInit {
2424
@Input() plan: string;
2525
@Input() quantity: string;
2626
@Input() subaccount: string;
27+
@Input() split_code: string;
2728
@Input() transaction_charge: number; // tslint:disable-line
2829
@Input() bearer: string;
2930
@Input() paystackOptions: PaystackOptions;

projects/angular4-paystack/src/lib/angular4-paystack.component.ts

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export class Angular4PaystackComponent {
2121
@Input() plan: string;
2222
@Input() quantity: string;
2323
@Input() channels: string[];
24+
@Input() split_code: string;
2425
@Input() subaccount: string;
2526
@Input() transaction_charge: number; // tslint:disable-line
2627
@Input() bearer: string;

projects/angular4-paystack/src/lib/angular4-paystack.directive.ts

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export class Angular4PaystackDirective {
2323
@Input() quantity: string;
2424
@Input() subaccount: string;
2525
@Input() channels: string[];
26+
@Input() split_code: string;
2627
@Input() transaction_charge: number; // tslint:disable-line
2728
@Input() bearer: string;
2829
@Input() class: string;

projects/angular4-paystack/src/lib/angular4-paystack.service.ts

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export class Angular4PaystackService {
6262
subaccount: obj.subaccount || '',
6363
transaction_charge: obj.transaction_charge || 0, // tslint:disable-line
6464
bearer: obj.bearer || '',
65+
split_code: obj.split_code || '',
6566
};
6667
return paystackOptions;
6768
}

projects/angular4-paystack/src/lib/paystack-options.ts

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ export interface PaystackOptions {
5151
* Send 'card' or 'bank' or 'card','bank' as an array to specify what options to show the user paying
5252
*/
5353
channels?: string[];
54+
/**
55+
* Used to apply multiple Split on Payments
56+
*/
57+
split_code?: string;
5458
}
5559

5660
export interface PrivatePaystackOptions extends PaystackOptions {

src/app/app.component.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
[class]="'btn btn-primary m-3'"
77
[email]="'[email protected]'"
88
(paymentInit)="paymentInit()"
9-
[amount]="5000000"
9+
[amount]="50000"
10+
[split_code]="'SPL_K0t6TE0Fmm'"
1011
[ref]="tRef"
1112
(onClose)="paymentCancel()"
1213
(callback)="paymentDone($event)"
@@ -39,6 +40,7 @@ <h3 class="text-center my-3">Paystack Embed</h3>
3940
<angular4-paystack-embed
4041
angular4-paystack
4142
[email]="'[email protected]'"
43+
[split_code]="'SPL_K0t6TE0Fmm'"
4244
(paymentInit)="paymentInit()"
4345
[amount]="5000000" [ref]="tRef" (onClose)="paymentCancel()" (callback)="paymentDone($event)"
4446
[class]="'btn btn-primary btn-lg'" [channels]="['card']"

src/app/app.component.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export class AppComponent implements OnInit {
1212
options: PaystackOptions = {
1313
amount: 50000,
1414
15+
split_code: 'SPL_nZXNafVgCd',
1516
ref: `${Math.ceil(Math.random() * 10e10)}`
1617
};
1718
public results = {

src/app/app.module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { Angular4PaystackModule } from 'angular4-paystack';
1010
],
1111
imports: [
1212
BrowserModule,
13-
Angular4PaystackModule.forRoot('pk_test_c613fc7d428a64fd1e5daea22f8380551b28c78e')
13+
Angular4PaystackModule.forRoot('pk_test_24673c9637a1bf06e5fb6eb989012747183eb2ae')
1414
],
1515
providers: [],
1616
bootstrap: [AppComponent]

0 commit comments

Comments
 (0)