Requests | Blesta

Requests

Major proposal for enhancment of use of BTCPay API in a new module

John Heenan shared this idea 7 months ago
Under Consideration

For context and images please see https://www.blesta.com/forums/index.php?/topic/25775-btcpay-payment-module-forces-btc-payment-method-instead-of-allowing-store-to-use-its-default/&do=findComment&comment=82868

The proposal is big but the text of the proposal is small. Pease add in an additonal module to allow creation of BTCPay stores that works in the same manner as the Virtualmin module. It would be great if the module could also be used to provide an addititonal service to order in other order forms, but this may be asking too much. The reference for users for what to do after user level store creaton is at https://docs.btcpayserver.org/CreateStore/. Please include a field for the store name. Suppose a user filled ''My New Store Created By Blesta". What an account holder will get when they loigin is in image below. They can go into Settings to alter the default currency. More information about what to do can be provided in links in the welcome email, asconfigurd by the Blesta admin. The API reference to create a new store is at https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore

Comments (1)

photo
1

Was able to create a store for a user with three API calls. Not as a developer Blesta plugin but with a bash script using curl.

First I created a new API key, on the store, for admin user with sufficient create permissions. No need to use admin username and password now.

First API call: create a new user with email address and a password for them.

Second API call, with new email/password basic auth, create an API key for new user with permission 'canmodifystore'

Third API call, with new API key, create the store with just store name

To create further stores for the userm the new API key can be retained instead of the user password, which the user can choose to change.

I have looked at the new Webhooks Plugin for Bleast 5.10. If Webhhoks passes through created configurable options of an order then we can implement automatic BTCPay store creation without a Blesta module.