Not receive any webhook events from Paypal sandbox account - paypal-sandbox

Like the title says,
I followed the same set up with this article, created both personal test account and business test account, subscribed all* events for webhook URL.
Webhook URL working fine with simulator but not work on the real transaction in sandbox environment.
After deeper investigation, We found out that there were no transaction records inside Sandbox Transactions section, but all passed transaction have been tracked down inside Notification section, which mean that we did make an successful transaction to PayPal.
I assume that webhook event tie with the transaction record, if there is no transaction been found in paypal we will never get out webhook event.
So, someone please teach me how to do a proper setup for sandbox account to get our webhooks.
No transactions and webhook events
All successful payments

Related

Telegram Bot Webhook doesn't track channel post deletion

I need to synchronize telegram channel posts with my site. So, I created a bot, a channel, added my bot to this channel(with admin rights, it has access to messages) and binded my bot's webhook to the specified server url. Everything goes well, post creation updates are correctly sent to the server url. The only problem is that the update of channel post deletion from telegram is not tracked, so admin has manually delete posts from the server database. Any idea, how to set up bot or webhook in order to track post deletion?
This is not possible using Bot API since Telegram doesn't send most of the events to Bot accounts.
You should instead use MTRPOTO to connect to a number on Telegram as a normal user (not a bot) that is the admin or subscriber of that channel and receive all of the events from Telegram.
I'd suggest you use Telethon (A Python MTPROTO library).
Upon a message deletion, you will receive MessageDeleted event.
There's an example on Telethon's document website:
from telethon import events
#client.on(events.MessageDeleted)
async def handler(event):
# Log all deleted message IDs
for msg_id in event.deleted_ids:
print('Message', msg_id, 'was deleted in', event.chat_id)
But if you insist on doing this with bot API, there's a spaghetti solution. You can forward channel posts to another chat with their Ids, if you get a message doesn't exist error, that means the message was deleted.

Firebase Stripe Extension - adding custom claims to user

I'm integrating Stripe with firebase and firestore using the Run Subscription Payments with Stripe extension. When a user subscribes to the service I need to be able to decode the JWT and see if they are subscribed or not through a custom claim.
The logs on the function show that it is invalidating the custom claim. I'm unsure why this is happening.
From the logs you've provided, it looks like you have multiple subscriptions (sub_KBpVfFzNclrhaG and sub_KBpV10rxE6jkkH) that are both tied to the same user/customer. Subscription sub_KBpVfFzNclrhaG has a status of active or trialing, and so the custom claim was correctly added. However, subscription sub_KBpV10rxE6jkkH was created shortly afterwards (I assume with a status that wasn't active or trialing) which updated the user's custom claim again to null. You can confirm that this is happening by checking the statuses of both Subscriptions in your dashboard.
You need to make sure you have only one active/trialing Subscription per-customer, which would be something you check in your app logic. There's an example of how to check for active/trialing subscriptions for a customer here (https://github.com/stripe-samples/firebase-subscription-payments/blob/4cf116c163ba69f0f46bcc782e4162e0edf452a4/public/javascript/app.js#L121)

Instant trigger without a connection in custom Integromat app

I am implementing an app that only contains webhooks and doesn't mention authentication in the API documentation. Is it possible to have just an instant trigger and a webhook without a connection?
A connection's main purpose is to store the credentials (sensitive data) in one place, so if the API provides no endpoints for webhook registration or it does, but they don't require authentication, then you can just assign the webhook to the Instant Trigger and leave the webhook's connection empty.

Not Seeing "Opened" Firebase Notification Stats

I'm manually handling firebase notifications by overriding the onHandle intent of the FirebaseMessagingService.
And using the intent I generate a notification.
Is there a way to manually report the notification opened to the Firebase at all because I'm not getting opened statistics reported back to the firebase console.
As above, even when letting firebase notifications get handled per normal, these open notifications are not being reported either.
Thanks!
The stats shown in the notifications panel of the Firebase console are only for messages sent from that notification panel. There is currently no way to trigger the stats for messages sent through the Firebase Cloud Messaging API directly.
Update: since late 2018 the Firebase now also reports messages sent through called to the Firebase Cloud Messaging API.
According to https://firebase.google.com/docs/cloud-messaging/understand-delivery only "Sends" work for data-only messages:
Sends — The data message or notification message has been enqueued for delivery or has been successfully passed to a third-party service like APNs for delivery. See lifetime of a message for more information.
Impressions (available only for notification messages on Android devices) — The display notification has been displayed on the device.
Opens — The user opened the notification message.
For those curious to know my workaround at this time.
We run push campaigns.
For each campaign we created a distinct, reusable event.
We register the event "campaign_received" and "campaign_opened"
When a message is received, we trigger the event.
When the notification is opened, we trigger the event.
Then, under each event, we just select the event, and file their stats per day, week, month, etc.
One needs to select the event to get to the event dashboard area, since the event list view shows the total amount of events sent and or received.
For bespoke notifications the 500 event limit might be reached quite quickly, so be sure to bundle your notifications into reusable event categories if possible.

Can I specify a different email for the StackDriver Error Reporting Notification

We tried to use the StackDriver Error Reporting notification features, but it seems that for any Project, when we turn on the notification, it always sent to the email associated with the developer account that we logged in. How can we change it to a different email account. (we use PageDuty, and we want this notification to send to a pagerduty sink email account)
Today, email notifications on new errors for a given project are enabled per user and can only be delivered to the email associated with his user's account.
As a workaround, and if possible, you could setup an email filter that would forward these emails.
I am the Stackdriver Error Reporting product manager.
It is not the first time we hear this feedback and we are working on improving the situation.

Resources