I'm creating stripe schedules from my app. The schedules are supposed to create a subscription in the future (like tomorrow). Then I have some logic that should be triggered when the subscription is created.
What's the easiest, quickest way to test that?
I can't find any explanation in stripe docs on how to backdate schedules or manipulate time. And obviously, I don't want to wait a day every time I want to do some live testing.
Related
I need to create a solution for altering the checkout process.
Better said, I need to add some functionality to it with a remote app (I am not sure if this is the right way to do it).
Mainly, what is needed represents a process that calls an external API, using a private API key from a delivery company, that registers a pick-up from the buyers house and sends the product to our headquarters.The process should be started when the user completes the entire checkout system from shopify, after payment.
After that, some AWB should be returned to the users checkout page, or some response regarding the creation of the pick up.
My question is, let's say, using some language like javascript with node and Koa or express, how one can achieve that? I can't find any tutorials or something that would help me do this.
This is site for trading which is will be blur before the market open.
Now My aim to make a exact timing using algorithm or any other way.
For example, If my market open at 11:00:00. Then how can I make a order at the same exact time.
One approach to this aspect is through api-s provided. Any decent trade platform should provide.
You could do an implementation with php and curl to place orders (and if api do not have a start date and is based on system time then schedule with cron).
Without any api you could try with some testing tools (Selenium with java) and maybe use a scheduler.Since you have to pass trough all clicks till reach place order, maybe it's better to schedule sooner all the action and wait till start time and then simulate place order by click
I've been looking for a way to get payments out of Paypal with the API.
Currently I'm doing this with 'v1/reporting/transactions'.
The thing here is that there is a 'last_refreshed_datetime', which means it can take a few hours before new transactions load in.
Does someone have an idea to force a transactions update or another way to get them?
Quartz
Best solution is to use a server-side integration to capture all orders, then you have an immediate notification of every single new transaction.
See 'Create Order' and 'Capture Order', documented here.
You can use those to create two server routes that only return JSON, and pair them with this approval flow: https://developer.paypal.com/demo/checkout/#/pattern/server
If for some reason you're not able to use that best of integration methods, you could subscribe to webhooks or use IPN for an asynchronous notification of new transactions.
I am working on a react-native based mobile app using expo.
in the app the user can set schedules for medication reminders, for that I am using expo-notifications to show those reminders.
expo-notifications provides some functions to schedule notifications, but as I found in the docs it does not provide scheduling options that I need, like every Sunday at 09:00am, or every 2 days at 05:00pm, daily at 08:30pm, and so on...
How can I achieve such scheduling?
expo-notifications author here! 👋
It depends on your use case, but I would suggest either:
use push notifications sent from your backend, where you can design any schedule you like (disadvantage would be that an offline device wouldn't receive the notification and that you'd have to write and maintain that backend)
try to work around the limitations
every Sunday at X soon will be achievable with WeeklyTrigger
every 2 days is tricky, maybe an interval trigger with some offset (not possible right now, but I'll happily review a pull request if you submit one)
daily at X is already supported with DailyTrigger
submit a pull request adding missing trigger types or adding features to existing ones.
I'm trying to make a simple app using Flutter, cryptocurrency price tracker. Using this API to retrieve a data. That how it looks:
The problem is, it only retrieves the latest data and do not updates as the price changes every time. It will change only after restarting an app. I was thinking to add a floating refresh button but i seems an old school. SO my aim is to let it update the price by itself,in real time(LIVE) without USER doing something, every time there is a change in price. My question is, what technology is behind this ? How could I implement this ? What should I Google in order to find the required knowledge ? Who could give me the right direction to think and learn. I don't really know the special terminology for this concepts, tried my best to explain the question. Thnx!
How could I implement this ?
Following are the steps that you need to follow.
Create a stateful widget with a Periodic Timer object. setup the timer value, say 10 seconds.
Now you will get a callback for every 10 seconds. So, from that callback method, simply call the API end point to fetch the latest data.
Use setState method to show the latest data on the UI.
Thats all, now your app will refresh the data by its own for every 10 seconds without any user interaction.
You can use web sockets.
https://flutter.dev/docs/cookbook/networking/web-sockets
This will let you push updates to the client without polling in real time.