2.0.0 • Published 5 years ago

@satispay/web-button-factory v2.0.0

Weekly downloads
4
License
MIT
Repository
-
Last release
5 years ago

WARNING

This module is deprecated and it is no longer maintained.
For migrating to a supported integration please check the Satispay Business API documentation.


This library is made for React, Angular and other frameworks.

Example

Create an iframe on document.body

import { IFrame } from '@satispay/web-button-factory'

const iframe = new IFrame({
  datakey: 'dk_...',
  userCallback: 'https://yourwebsite.ext/userCallback',
  amount: 100,
  description: 'Testing Charge',
})

Now with show() you can display the iframe

iframe.show()

IFrame

Methods

NameDescriptionArguments
on(event, function)Subscribe a function to an eventEvent name, Function
off(event)Unsubscribe eventEvent name
showShow the IFrame
hideHide the IFrame

Events

NameEmit onArguments
closeClose modal
loadIFrame is loaded
completed(chargeId)Charge success or failCharge ID

Properties

The IFrame constructor accept the following properties

NameTypeDescriptionMandatoryDefaultValues
onlineServicestringOnline service urlNohttps://online.satispay.com
datakeystringShop datakeyYes
userCallbackstringUser callback urlYes
amountnumberAmount in centsYes
descriptionstringDescription of chargeYes
orderIdstringID of order, passed to user callbackNo
phonenumberstringPhone number of userNo
currencystringCurrency, currently only EUR is availableNoeureur
localestringLanguageNoautoit, en
drawonstringWhere to draw the iframeNodocument.body

These properties are editable before show()

  • userCallback
  • amount
  • description
  • orderId
  • phonenumber
  • currency
  • locale

Button

The button function return an image url

NameTypeDescriptionMandatoryDefaultValues
onlineServicestringOnline service urlNohttps://online.satispay.com
localestringLanguageYesit, en
typestringType of buttonNopaypay, donate
colorstringColor of buttonNoredred, white
2.0.0

5 years ago

1.4.3

6 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago