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

extpay

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extpay - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

.ExtPay.dev.js.swo

4

dev-extension-mv2/background.js

@@ -1,2 +0,4 @@

const extpay = ExtPay('derp-extension');
const extpay = ExtPay('ureview')
extpay.startBackground();

@@ -3,0 +5,0 @@

@@ -1,4 +0,5 @@

const extpay = ExtPay('derp-extension')
const extpay = ExtPay('ureview')
console.log('extpay content script mv2')

@@ -5,0 +6,0 @@ extpay.getUser().then(console.log)

@@ -1,2 +0,2 @@

const extpay = ExtPay('subtest')
const extpay = ExtPay('ureview')

@@ -10,3 +10,3 @@

document.querySelector('p').innerHTML = 'User has paid! 🎉'
document.querySelector('button').remove()
// document.querySelector('button').remove()
}

@@ -13,0 +13,0 @@ }).catch(err => {

importScripts('ExtPay.js')
const extpay = ExtPay('derp-extension')
const extpay = ExtPay('ureview')
extpay.startBackground();
extpay.getUser().then(user => {

@@ -7,0 +6,0 @@ console.log(user)

@@ -1,2 +0,2 @@

const extpay = ExtPay('derp-extension')
const extpay = ExtPay('ureview')

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

const extpay = ExtPay('derp-extension')
const extpay = ExtPay('ureview')

@@ -3,0 +3,0 @@

{
"name": "extpay",
"version": "3.0.0",
"version": "3.0.1",
"description": "The JavaScript library for https://extensionpay.com - payments for browser extensions, no server needed.",

@@ -10,2 +10,3 @@ "main": "./dist/ExtPay.common.js",

"jsdelivr": "./dist/ExtPay.js",
"types": "./types.d.ts",
"scripts": {

@@ -12,0 +13,0 @@ "replace_localhost": "sed -i '' \"s|http://localhost:3000|https://extensionpay\\.com|g\" sample-extension-mv2/manifest.json sample-extension-mv3/manifest.json",

# ExtPay.js — Payments in browser extensions
The JavaScript library for [ExtensionPay.com](https://extensionpay.com), a service to easily add payments to browser extensions without running your own server backend.
Below are directions for using this library in your browser extension. If you learn better by example, you can also view the code for a **[sample extension](sample-extension/)**. This library uses [Mozilla's webextension-polyfill library](https://github.com/mozilla/webextension-polyfill) internally for compatability across browsers which means it should work on almost all modern browsers.
Below are directions for using this library in your browser extension. If you learn better by example, you can also view the code for a **[sample extension](sample-extension-mv3/)**. This library uses [Mozilla's webextension-polyfill library](https://github.com/mozilla/webextension-polyfill) internally for compatability across browsers which means it should work on almost all modern browsers.

@@ -54,3 +54,3 @@ 1. [Install](#1-install)

"background": {
"service_worker": ["background.js"]
"service_worker": "background.js"
}

@@ -198,3 +198,5 @@ }

Note: please read the [detailed docs on subscriptions here](/docs/how_subscriptions_work.md).
## 8. Use `extpay.openTrialPage()` to let the user sign up for a free trial

@@ -201,0 +203,0 @@

@@ -1,4 +0,7 @@

// this line is required in background.js to use ExtPay!
// To test payments, replace 'sample-extension' with the ID of
// the extension you registered on ExtensionPay.com. You may
// need to uninstall and reinstall the extension.
// And don't forget to change the ID in popup.js too!
var extpay = ExtPay('sample-extension');
extpay.startBackground();
extpay.startBackground(); // this line is required to use ExtPay in the rest of your extension

@@ -5,0 +8,0 @@ extpay.getUser().then(user => {

@@ -0,1 +1,5 @@

// To test payments, replace 'sample-extension' with the ID of
// the extension you registered on ExtensionPay.com. You may
// need to uninstall and reinstall the extension.
// And don't forget to change the ID in background.js too!
const extpay = ExtPay('sample-extension')

@@ -2,0 +6,0 @@

importScripts('ExtPay.js')
// this line is required in background.js to use ExtPay!
var extpay = ExtPay('sample-extension');
extpay.startBackground();
// To test payments, replace 'sample-extension' with the ID of
// the extension you registered on ExtensionPay.com. You may
// need to uninstall and reinstall the extension.
// And don't forget to change the ID in popup.js too!
var extpay = ExtPay('sample-extension');
extpay.startBackground(); // this line is required to use ExtPay in the rest of your extension
extpay.getUser().then(user => {
console.log(user)
})

@@ -0,1 +1,5 @@

// Replace 'sample-extension' with the id of the extension you
// registered on ExtensionPay.com to test payments. You may need to
// uninstall and reinstall the extension to make it work.
// Don't forget to change the ID in background.js too!
const extpay = ExtPay('sample-extension')

@@ -2,0 +6,0 @@

# [ExtensionPay.com](https://extensionpay.com) Sample Extension
This is the [ExtensionPay](https://extensionpay.com) sample extension. Use this as a template or minimal example of how to use the [ExtPay JavaScript library](../) in your extension.
This is the [ExtensionPay](https://extensionpay.com) Manifest v3 sample extension. Use this as a template or minimal example of how to use the [ExtPay JavaScript library](../) in your extension.
### To install on Chrome
Open [chrome://extensions/](chrome://extensions/) and make sure `Developer Mode` is enabled in the top right corner. Then click the `Load unpacked` button and navigate to the sample extension folder. Once installed, click the extension's icon ("E") in the browser's top right toolbar to see popup.html. (It may be in the "puzzle piece" menu.)
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