1.0.2 • Published 5 months ago

ngx-loovpay v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Config ngx-loovpay

To configure the ngx-loovpay module in your project use import the module to your application module

   NgxLoovModule.forRoot({
     app_key: 'app_key',
     merchant_key: 'merchant_key',
     loov_url: 'https://api.secure.payment.loov-solutions.com/v1'
   }), 
   

Init payment

Function used to initiate a payment. This function is used to initiate mobile or card payments. Please note the information requested in the function interface.

  initPayment(payload: PaymentMobile | PaymentCard):Observable<LoovResponse>

Checkout payment status

checking the status of a payment requires the transaction reference

checkStatus(reference:string):Observable<CheckRefResponse>

Pay out

Please note that this API is only available to merchants who have subscribed to this service and have been approved by our compliance department.

Be sure to manage the response appropriately in your application to provide users with accurate transaction information.

payOut(payload: PayOut):Observable<LoovResponse>

Alert Developers

the description must be at least 125 characters long and the name must conform to the example below

    "description": "test paiement de service en ligne",

    "customer": {
        "name": "John Doe",
        "email": "john@gmail.com",
        "phoneNumber": "23769*******"
    }

Supported Operators

countryoperatoroperator_code
BeninMtnmtn-benin
BeninMoovmoov-benin
CameroonOrangeorange-money-cm
CameroonMtnmtn-cm
Ivory CoastMtnmtn-ci
Ivory CoastMoovmoov-ci
MaliMoovmoov-ml
MaliOrangeorange-money-ml
SenegalOrangeorange-money-senegal
SenegalExpressoexpresso-senegal
SenegalFreefree-money-senegal
SenegalWave Senegalwave-senegal
TogoT-moneyt-money-togo

Demo

This tutorial shows you how to implement the payment api in your loovPay application.

    this.loovService.initPayment(
      {
        amount: 500,
        operator: 'orange-money-cm',
        phoneNumber: '237693xxxxxx',
        customer: {
          name: 'Steves franc',
          email: 'steves@gmail.com',
          phoneNumber: '237693xxxx'
        },
        callback_url: 'https://webhook.site/a6cf31ad-d570-45d1-9995-3b060b4149be',
        payment_mode: 'MOBILE_MONEY',
        description: 'Payment Method Name and Email Address from Customer Name and Email Address from Customer Name and Email Address',
      }
    ).pipe(switchMap((resp: LoovResponse) => {      

      return of(resp);
    }),

     catchError((error: LoovResponseError) => {
      return of(error.error)
     })
    
    ).subscribe();

    this.loovService.checkStatus('LOMvJ4wtFlRwbCrZ5I0').pipe(
      switchMap((resp: CheckRefResponse) => {
        return of(resp)
      }),
      catchError((error: LoovResponseError) => {
         
        return of(error.error)
      })
    ).subscribe();

    this.loovService.payOut(
      {
        amount: 500,
        operator: 'orange-money-cm',
        phoneNumber: '237693xxxxxx',
        currency: 'XAF'
       
       }
    ).pipe(switchMap((resp: LoovResponse) => {    
      return of(resp);
    }),

     catchError((error: LoovResponseError) => {      
      return of(error.error);
     })
    
    ).subscribe();

Security Vulnerabilities

If you discover a security vulnerability within the LoovPay Angular SDK, please report it to Loov Solutions via contact@loov-solutions.com. We take security seriously and appreciate your help in disclosing any vulnerabilities responsibly.

License

The LoovPay Angular SDK is open-source software licensed under the MIT license. You can find the license details in the LICENSE file.

Credits

We hope this SDK simplifies the integration of LoovPay Payment into your Angular applications and enables you to provide a seamless payment experience for your users. If you have any questions, issues, or suggestions, please feel free to open an issue on our GitHub repository. We appreciate your feedback and contributions to help make this SDK even better.

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

6 months ago