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

@eucalyptusvc/fatzebra

Package Overview
Dependencies
Maintainers
2
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eucalyptusvc/fatzebra

This is a dedicated module for interaction with the mail endpoint of the Sendgrid v3 API.

  • 1.1.36
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

@eucalyptusvc/fatzebra

API wrapper around fatzebra api

Install

With yarn:

yarn add @eucalyptusvc/fatzebra

With npm:

npm install @eucalyptusvc/fatzebra

Api documentation https://docs.cloudpayments.io/docs

Usage

Tokenize a new card

const response = await api.tokenizeCard({
  card_number: '5555555555554444',
  card_holder: 'Pilot Test',
  card_expiry: '05/2030',
  cvv: '222',
});
console.log(tokenResponse);
// {token: "..."}

Create a customer

const customerResponse = await api.createCustomer({
  card_token: 'TOKEN',
  email: 'Test Emails',
  first_name: 'First Name',
  last_name: 'Last Name',
  reference: cuid(),
});
console.log(tokenResponse);
// {id: "..."}

Create a purchase

const customerResponse = await api.createPurchase({
  card_token: token,
  reference: 'UUID',
  amount: 2000,
  customer_ip: '',
});
console.log(tokenResponse);
// {id: "..."}

Update a customer

const updateCustomer = await api.updateCustomer(
  {
    card_token: token,
    email: 'Test Emails',
    first_name: 'first',
    reference: 'UUID',
    last_name: 'Last Name',
  },
  { customerId: customerResponse.id }
);
console.log(tokenResponse);
// {id: "..."}

Create a paymentplan

const createPaymentPlan = await api.createPaymentPlan({
  amount: 2000,
  anniversary: 8,
  currency: 'AUD',
  customer: customerResponse.id,
  frequency: 'Monthly',
  payment_method: 'Credit Card',
  reference: cuid(),
  setup_fee: 0,
  start_date: '2019-07-08',
});
console.log(tokenResponse);
// {id: "..."}

Development

  1. Install dependencies using yarn install or npm install
  2. Start development server using yarn watch

FAQs

Package last updated on 02 Oct 2019

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