Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development (v1.9) #20

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Development (v1.9) #20

wants to merge 14 commits into from

Conversation

Artucuno
Copy link
Owner

@Artucuno Artucuno commented Jul 20, 2022

Development v1.9

Some big things to note:

  • Added Logins for more Platforms
  • Added Email Sending
  • Added 2FA
  • Rewrote all modules involving Payments
  • Made Accounts Module have custom modules
  • Added Automation

Version 2.0 should hopefully be the first production environment release

@Artucuno Artucuno added the enhancement New feature or request label Jul 20, 2022
@Artucuno Artucuno added core Updates a core part of LoonaBilling New Module Adds an additional module to LoonaBilling labels Jul 21, 2022
@Artucuno
Copy link
Owner Author

Hit a roadblock with this update. Will need to change how Payments are processed and stored.
Needs to be completed:

  • Shopping cart
  • Buy now
    I'll probably post updates as I go.

@Artucuno Artucuno added the In Progress Currently a work in progress label Jul 25, 2022
@Artucuno
Copy link
Owner Author

Decided to rewrite Stripe and PayPal module, to make it easier to implement the shopping cart.

@Artucuno
Copy link
Owner Author

Artucuno commented Aug 1, 2022

Should hopefully finish the Stripe module rewrite within the next couple of days.

@Artucuno
Copy link
Owner Author

Artucuno commented Aug 7, 2022

Still working on this, adding automation for purchases and testing for issues and bugs.

@Artucuno
Copy link
Owner Author

Artucuno commented Aug 9, 2022

Pull request is still in development and needs working on

core/modules/payments/stripepay.py Fixed Show fixed Hide fixed
core/modules/payments/stripepay.py Fixed Show fixed Hide fixed
core/modules/payments/stripepay.py Fixed Show fixed Hide fixed
@Artucuno Artucuno changed the title Development Development (v1.9) Aug 12, 2022
@Artucuno
Copy link
Owner Author

#20 (comment)

Updated Pull Description

@Artucuno Artucuno self-assigned this Aug 17, 2022
try:
if files.readJSONVar('configs/accounts/{}.json'.format(f[1].basicName), 'enabled'):
a += [(f[1].basicName, f[1].fontawesome)]
except:

Check notice

Code scanning / Bandit

Try, Except, Pass detected.

Try, Except, Pass detected.
@Artucuno
Copy link
Owner Author

I will be making 2FA methods modular too

@Artucuno
Copy link
Owner Author

Sorry about the lack of updates, I have assignments due in the next couple of weeks so I will release an update after they are all over.

@Artucuno
Copy link
Owner Author

Automation Handling Notification

I will be removing the automation modules and replacing them with product modules. The new modules will make it easier to manage products and will implement events such as on_create, on_delete, on_renew and on_notrenewed.

If you have created any automation scripts, please update them before downloading the latest LoonaBilling version.
(Update will be released soon)

@Artucuno Artucuno added the documentation Improvements or additions to documentation label Sep 14, 2022
@Artucuno
Copy link
Owner Author

Basic Product Module

Currently the only data passed is the User ID but I will probably add more info that will be passed

# imports

module = Blueprint('DiscordProduct', __name__)
module.hasAdminPage = False
module.moduleDescription = 'Discord Product'
module.version = '1.0'
module.config = {}

# Product Settings
module.ProductSettingsPage = False
module.basicName = 'discord'
module.fontawesome = 'fa-brands fa-discord'

# Extra
module.sendURL = 'http://localhost/dc/callback'

def on_create(*data): # On Product Payment
    print('On Create')
    data = data[0]
    print('UID', data)
    try:
        x = requests.post(module.sendURL, data='Success!')
        print(x.text)
        return True
    except Exception as e:
        print('ERR', e)

def on_delete(*data): # On Product Deletion
    print('On Delete')
    x = requests.post(module.sendURL, data='Deleted!')
    print(x.text)
    return True

def on_notrenewed(*data): # On Product not renewed
    print('On Not Renewed')
    x = requests.post(module.sendURL, data='Not renewed!')
    print(x.text)
    return True

def on_renew(*data): # On product renewed
    print('On Renew')
    x = requests.post(module.sendURL, data='Renewed!')
    print(x.text)
    return True

def on_paymentfailed(*data): # On Payment Failed
    print('On Payment Failed')
    x = requests.post(module.sendURL, data='Payment Failed!')
    print(x.text)
    return True

@module.route('/dc/callback', methods=['GET', 'POST'])
def cb():
    return 'RETURN: yay!'

@Moosyu
Copy link

Moosyu commented Sep 17, 2022

very cool
caption-24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Updates a core part of LoonaBilling documentation Improvements or additions to documentation enhancement New feature or request In Progress Currently a work in progress New Module Adds an additional module to LoonaBilling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants