#nathan9745354-cli

1 messages · Page 1 of 1 (latest)

drowsy urchin
#

@rough portal hello, what do you need help with?

rough portal
#

I am using Share payment link and CLI login with my vps

#
  1. The VPS does not have any browser.
  2. When I close the putty the listening is closed
#

I want to the command could listening the event when putty was closed

drowsy urchin
#

@rough portal Hmmm I'm not sure I grasp what you are doing. Why do you use the CLI on a remote server? It's uncommon and is usually just to test events locally

rough portal
#

Thank Koopajah

#

Firstly Let me describe my situation.

#

I want using shared payment link for customers.

drowsy urchin
#

what is "shared payment link"?

rough portal
#

I need collect the event to my vps and then API to extract the event to create the account

drowsy urchin
#

Okay so you absolutely shouldn't be using the CLI

#

the CLI is just for Test mode/debugging

rough portal
#

OK

#

what should ido?

drowsy urchin
#

you need to write code that responds to events, your server is "public" and Stripe would send events to it directly

rough portal
#

yes

#

webhook.php?

drowsy urchin
#

there's a lot more to it than just a webhook.php file unfortunately

#

you might want to hire a freelancer to help you build this

rough portal
#

I am a developer but not familiarly with stripe

drowsy urchin
#

gotcha, so you would write code in PHP based on the docs above

rough portal
#

Hi Koopajah

#

code 200 to received the event

drowsy urchin
#

yes that means you code gets the event and responds a 200

rough portal
#

But VPS does not have browser

#

How can I view the event with 4242 port?

drowsy urchin
#

I don't understand what that question means

#

what event do you want to view?

rough portal
#

the payment success event

drowsy urchin
#

I'm worried you might not understand how webhooks work, are you familiar with those? There's no browser involved anywhere

rough portal
#

oh I can forward to my webhook.site

drowsy urchin
#

but that VPS should be your website and code

rough portal
#

yes you are correct

#

I think I need to modify the webhook.php to handle the event

drowsy urchin
#

You configure a webhook endpoint in your account to point to the code on your app that handles webhook

#

it doesn't have to be webhook.php yes, it's just whatever your own code expects

rough portal
#

sure

#

let me do it

#

yes it work all fine

#

thanks

#

But I have one more question

drowsy urchin
#

of course, ask away!

rough portal
#

um..

#

The website have a database for account

#

When user opened the payment link

#

the payment link even don't know which user account is login.

#

I need the payment.intent.success event have some character to match the user account

#

how to do that?

drowsy urchin
#

that's not really possible, the whole point of PaymentLink is no code, you just go to the payment and pay and the link works for everyone