Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

atlas-pay-sdk

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atlas-pay-sdk

Raven Atlas NodeJS Payment SDK

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
51
increased by142.86%
Maintainers
1
Weekly downloads
 
Created
Source

Atlas Pay by Raven

NPM version Build npm-typescriptLicensegithub-license-url

Atlas Pay by Raven bank allows you recieve payments and build powerful checkout experience on your website and apps, to use this you will need to create an account on raven atlas, visit, "Raven bank" for more.

Live Demo

✨ Features

  • Card Payments. (Visa, MasterCard)
  • USSD Payment.
  • Bank Transfers.
  • NQR Payments.
  • Pay with Raven.

Installation:

npm install atlas-pay-sdk

or

```bash
yarn add atlas-pay-sdk

Usage :

Atlas-Pay provides you with few Javascript API's to interact with below is an example implementation of the atlas-pay library:



import './App.css'
import  AtlasPay  from 'atlas-pay-sdk';

function App() {
  AtlasPay.onSuccess = function(data) {
    /**
     * handle successful payment
     * (optional) : you can decide to retrieve the onClose message we send via data
    **/
    console.log('Payment successful:', data);
  }

  AtlasPay.onClose = function(data) {
       /**
     * handle close event, this happens when user closes the payment modal
     * (optional) : you can decide to retrieve the onClose message we send via data
    **/
    console.log('Payment modal Closed:', data);
  }

  AtlasPay.onResponse = function(data) {
       /**
     * handle generate respons, this triggers when you try generating a new ref via AtlasPay.generate(), you catch ther response here
     * (optional) : you can decide to retrieve the onClose message we send via data
    **/
      console.log('We got a response:', data); // or do your stuff here
  }

  // set up your new payment parameters, along side your secret key

  let config = {
    "customer_email": "john@example.com",
    "description" : "test payment",
    "merchant_ref": "your_merchant_reference",
    "amount": 100,
    "redirect_url": "",
    "payment_methods" : "card,bank_transfer,ussd,raven",
    "secret_key" : "your_atlas_secret_key"
}


  return (
    <>
    <button onClick={()=> AtlasPay.generate(config)}>Generate New Ref</button>

     <button onClick={()=> AtlasPay.init('202304211026JBCAADE')}>Initialize Payment Window</button>
    </>
  )
}

export default App


"postbuild": "node scripts/copy && npm run size",

Keywords

FAQs

Package last updated on 22 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc