1.0.5 • Published 5 years ago

txact-subscribe-button v1.0.5

Weekly downloads
7
License
ISC
Repository
gitlab
Last release
5 years ago

web-components

Component

txact-checkout-button

Usage example

With React

<txact-subscribe-button 
                      provider='SF'
                      ep='https://development-uswest2.ccdp.volvo.care'
                      m='eyJ2IjoiWVY0QTIyUEs2SjEyMDYwMTQiLCJwIjp7Im1ycCI6IjgwMC4wMCJ9LCJkaSI6IjM0MDgwIiwiZGFpIjoiS1NJTkdINkB2b2x2b2NhcnMuY29tIn0='
                      c='b698609de732ed0fa6599261a63e2dd51c8468df5ebe33616a0455dd2b450999'
                      market='US'
              >
    Subscribe now // Button content
</txact-subscribe-button>

Attributes

  • provider : Provider name which provides the secret
  • ep : End point URLs needs to be provided by the running host
  • m : Message Base 64 encoded JSON Message ( Explained below )
  • c : HMACSHA256 result for m (the encoded message) with the secret key
  • market : Market ie. US, DE, NL
  • checkouturl : Checkout URL
  • (If checkouturl is provided then other parameters are not used)

m : Message

Original

    {
     "v": "YV4A22PK6J1206014",  
     "p": {
       "mrp": "800.00"
     },
     "di": "34080",
     "dai": "KSINGH6@volvocars.com"
   }

base64 encoded

eyJ2IjoiWVY0QTIyUEs2SjEyMDYwMTQiLCJwIjp7Im1ycCI6IjgwMC4wMCJ9LCJkaSI6IjM0MDgwIiwiZGFpIjoiS1NJTkdINkB2b2x2b2NhcnMuY29tIn0=

  • v : VIN number
  • mrp : Monthly retail price
  • di : Dealer id
  • dai : Dealer Associte Id

Development

  • yarn or npm i
  • npm run build to get the build
  • npm run test to test
  • npm run serve to run a development environment

using as a dependency in packages.json

"txact-subscribe-button": "^1.0.0",

Example

  • A running example is provided with the repo @ test/index.html
  • npm run build
  • open dist/index.html on your browser

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago