1.1.41 • Published 4 years ago
@eucalyptusvc/fatzebra v1.1.41
@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
- Install dependencies using
yarn install
ornpm install
- Start development server using
yarn watch
1.1.41
4 years ago
1.1.40
5 years ago
1.1.38
5 years ago
1.1.37
5 years ago
1.1.36
5 years ago
1.1.35
5 years ago
1.1.33
5 years ago
1.1.32
5 years ago
1.1.30
5 years ago
1.1.29
5 years ago
1.1.28
5 years ago
1.1.27
5 years ago
1.1.26
5 years ago
1.1.25
5 years ago
1.1.24
5 years ago
1.1.23
5 years ago
1.1.22
5 years ago
1.1.20
5 years ago
1.1.19
5 years ago
1.1.18
5 years ago
1.1.17
5 years ago
1.1.16
5 years ago
1.1.15
5 years ago
1.1.14
5 years ago
1.1.13
5 years ago
1.1.12
6 years ago
1.1.11
6 years ago
1.1.10
6 years ago
1.1.9
6 years ago
1.1.8
6 years ago
1.1.7
6 years ago
1.1.6
6 years ago
1.1.5
6 years ago
1.1.4
6 years ago
1.1.3
6 years ago
1.1.2
6 years ago
1.1.1
6 years ago