Back

Sharing State Between Function Calls

  • 0
  • Databases
  • Functions
ZachHandley
11 Jan, 2024, 22:32

I've tried to get him to include it in the body like 4 times but

TL;DR
The developer is trying to compare customer profile IDs from Appwrite with profile IDs from AuthNet to find profiles without a customerProfileId. They are looking for a way to efficiently map the IDs and suggest using a shared-state map for faster retrieval. Another developer suggests using Redis for caching. There is a provided code snippet for getting existing profile IDs from Appwrite. No solution to the problem is specified in the thread.
ZachHandley
11 Jan, 2024, 22:33

he either doesn't get it or something -- regardless, my problem is the same

ZachHandley
11 Jan, 2024, 22:34

technically it only really needs to scale for a few months while I rewrite the wordpress site

Drake
11 Jan, 2024, 22:34

can you link by email?

anyways, it looks like quillforms offloads the payment to a provider (https://www.authorize.net/ in your case?)

ZachHandley
11 Jan, 2024, 22:34

I cannot sadly

ZachHandley
11 Jan, 2024, 22:34

yes correct, basically Quillforms doesn't fully utilize the customer profiles

ZachHandley
11 Jan, 2024, 22:34

so it only adds the first and last name

ZachHandley
11 Jan, 2024, 22:35

so even when I get a webhook from them I have to match by name and a sort of timestamp filter (created within the last 10 minutes) which is not ideal but -- I'm trying to bypass the webhook

ZachHandley
11 Jan, 2024, 22:35

to check myself for it

ZachHandley
11 Jan, 2024, 22:35

AuthNet only has one to get all customer ID's lmao

ZachHandley
11 Jan, 2024, 22:36

I don't know if they're sorted or what, because it's AuthNet and it could be anything

ZachHandley
11 Jan, 2024, 22:36

SO, I've devised a way here because every appwrite member will have a 1:1 customerProfileId regardless of if they're active or not

ZachHandley
11 Jan, 2024, 22:37

only issue is my payment profiles map would be much faster if it was stored in memory and updated

ZachHandley
11 Jan, 2024, 22:37

rather then fetching X amount every time, which won't increase the time by much, but

Drake
11 Jan, 2024, 22:39

this is the webhook from authorize.net?

ZachHandley
11 Jan, 2024, 22:39

from Quillforms

ZachHandley
11 Jan, 2024, 22:40

Authorize.net webhook has failed me a few times so far

ZachHandley
11 Jan, 2024, 22:40

so I am trying not to rely on it

Drake
11 Jan, 2024, 22:41

if you're able to tell the authorize.net account based on the current appwrite user, you can have a fallback system that checks entitlements

Drake
11 Jan, 2024, 22:42

ie, on app start, check with authorize.net to see if user has paid and then change any access as needed

ZachHandley
11 Jan, 2024, 22:46

basically I'm trying to single out the profiles without a customerProfileId

ZachHandley
11 Jan, 2024, 22:46

then find the profile ID's on AuthNet that don't exist in Appwrite

ZachHandley
11 Jan, 2024, 22:53

okay so the profile ID's that are pulled are at least in order from oldest to newest

Drake
11 Jan, 2024, 22:58

that requires iterating over data on the authnet side, not appwrite?

ZachHandley
11 Jan, 2024, 22:59

I'm running an AuthNet Python SDK function to get a list of customer ID's

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more