Welcome to CoreMart!

By registering with us, you'll be able to discuss, share, download resources and private message with other members of our community.

Sign-Up Now!
PayPal Notifications

BrayanBot Source PayPal Notifications 1.1.0

No permission to download
PaypalNotifications-01.png


View your PayPal Notifications on discord or Create a custom addon that hooks with this addon!

This addon also servers purpose of a Template Addon for users to learn BrayanBot Development.


How to setup PayPal Notifications
1) Head over to PayPal IPN Settings
2) Edit Settings
3) Enter your Hosting's IP(with port if available) and in end add /paypal-notification to the url
-> Example: https://127.0.0.1/paypal-notification
3) Save the Settings


How to hook PayPal Notification into other addons
1) Create your File with Addon Template
2) Import EventHandler into your file
3) Set an Event to listen on as shown on below code

JavaScript:
const Eventhandler = require("../Modules/Handlers/EventHandler")
Eventhandler.set("paypalNotification", (bot, data) => {
    // Your code here
})

Whenever an PayPal Payment is received Event will be triggered & your code will run
-> This addon is also an example of this event.

ScreenShots-01.png

1646654942284.png

Configuration-01.png


YAML:
# Discord Webhook URL Only
Notification:
  - https://discord.com/api/webhooks/xxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxx
Embed:
  Embeds:
    - AuthorIcon: https://cdn.zorino.in/paypal.png
      Author: New PayPal Notification Received
      Description: "> Payment Status: **{status}**"
      Footer: "{txn-id}"
      Fields:
        - Name: • General Info
          Value: |-
            > **Received**: {unix}
            > **Sent-To**: {sent-to}
        - Name: • Item Info
          Value: |-
            > **Item**: {item-name}
            > **Item-ID**: {item-id}
            > **Invoice**: {invoice}
            > **Quantity**: {quantity}
            > **Gross**: {gross} {paid-in}
            > **Fee**: {fee} {paid-in}
            > **Tax**: {tax} {paid-in}
        - Name: • Customer Info
          Value: |-
            > **Name**: {first-name} {last-name}
            > **Email**: || {email} ||
            > **Residence**: {residence}

Discord-01.png
  • Like
Reactions: JOD
Author
Zorino
Downloads
35
Views
1,020
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Zorino

Back
Top