Angular PG Integration 3
Angular PG Integration 3
WWW.SABPAISA.IN
Dummy card/UPI Details
CVV - 234
CVV - 234
CVV - 234
UPI ID merchant@sabpaisa
INTRODUCTION
This document is to provide an overview of the Payment Gateway integration(Web Integration
Kit) provided by SabPaisa.The document contains the required information for Web Integration
Kit to integrate the PG platform.
BENEFIT OF APPROACH
This document aims to provide help to quickly integrate SabPaisa into the existing application.
The document contains a sample code to help the developer understand the flow of data from
the merchant’s application to SabPaisa and the other way around. It contains a npm package
that needs to be installed on the merchant site and pass the mandatory parameters provided by
the SabPaisa.
This SDK comes with two additional functionality
■ Auto detect the card
■ Validate VPA.
INTEGRATION STEPS:
1. Open the command prompt and execute the below command.
Click here for official angular documentation.
After executing the 'ng new angular' command, enable the routing by choosing 'y'.
CSS
cd angular
3. Install the following packages in the Project.
npm i pg-test-project
ng g c pay-form
"jsx": "react",
"module": "commonjs",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
6. In the src --> assets, create the new file name SabpaisaSdk.tsx
7. Open the below link, copy the code, and paste the entire code in the SabpaisaSdk.tsx
https://bitbucket.org/sabpaisa-wp-29/angular-js-kit/src/master/src/assets/SabpaisaSdk.tsx
8. Open the src --> app, create new file name SabPaisaWrapper.tsx
9. Open the below link, copy the code, and paste the entire code in the SabPaisaWrapper.tsx
https://bitbucket.org/sabpaisa-wp-29/angular-js-kit/src/master/src/app/SabPaisaWrapper.tsx
10. Open src --> app --> pay-form --> pay-form.component.html, open the below link and
replace the given code in the pay-form.component.html file.
https://bitbucket.org/sabpaisa-wp-29/angular-js-kit/src/master/src/app/pay-form/pay-
form.component.html
11. Open src --> app --> app.module.ts, copy the below code in the app.module.ts in imports: [ ]
ReactiveFormsModule,
12. Open src --> app --> pay-form --> pay-form.component.ts, open the below link and replace
the given code in the pay-form.component.ts file.
https://bitbucket.org/sabpaisa-wp-29/angular-js-kit/src/master/src/app/pay-form/pay-
form.component.ts
13. Open src --> app --> app-routing.module.ts, copy and paste the below code in the app-
routing.module.ts.
<h1>welcome</h1>
<router-outlet></router-outlet>
15. Open src --> app --> app.module.ts, copy the below code in the app.module.ts in @NgModule({})
SabpaisaWrapperComponent
16. Open src --> app --> app.module.ts, copy the below code in the app.module.ts in imports: [ ]
ReactiveFormsModule,
17. Open the command prompt and run the below code:
cd project name
ng serve --open
Congratulations for implementing SabPaisa Web SDK.