0.0.0 • Published 3 years ago
kuikpay v0.0.0
Kuikpay
Install
npm install --save kuikpay
Usage
Props
Prop name | Type | Description | Default value |
---|---|---|---|
addToCart | function | Function that adds a product to your cart | undefined |
itemToAdd | Item | Product to be added to your cart | undefined |
updateItems | function | Function that removes products from your cart | undefined |
orderForm | OrderForm | Information to make the order | undefined |
updateOrderFormProfile | function | Function to update the user in your cart | undefined |
cartSimulation | function | Function to make the cart simulations in your store | undefined |
clearData | function | Function to reset your store information after making the order | undefined |
language | string | Language in which the messages will be displayed | undefined |
isVisible | boolean | Option to hide the button according to your needs, for example if a product has no inventory | true |
OrderForm
Type
Property | Type | Description |
---|---|---|
clientProfileData | ClientProfileData | Client information |
items | Item[] | Items added to cart |
totalizers | Totalizer[] | Totals |
value | number | Amount to be paid |
ClientProfileData
Type
Property | Type | Description |
---|---|---|
email | string | Client email |
Item
Type
Property | Type | Description |
---|---|---|
id | number | SKU ID |
quantity | number | Quantity to add |
seller | string | Seller ID |
Totalizer
Type
Property | Type | Description |
---|---|---|
id | string | Totalizer ID. Options Items , Shipping , Tax |
name | string | Totalizer name |
value | number | Value |
import React, { Component } from 'react'
import { Kuikpay } from 'kuikpay'
import 'kuikpay/dist/index.css'
class Example extends Component {
render() {
return <Kuikpay {...props} />
}
}
Development
Execute
npm install
npm run start
Execute in another terminal
cd example
npm i
npm run start
Then in the browse, replace localhost for http://vtexlatam.vtexlocal.com.br/
License
0.0.0
3 years ago