#t90009239

1 messages · Page 1 of 1 (latest)

wraith vaporBOT
lime zinc
#

What specifically are you trying to test?

raw arrow
#

I would like to test checkout and payments using stripe - but the developer left some readme file explaining how to do it

#
  1. Use follwoing exe files for setting up stripe development mode:

    • ngrok.exe
    • stripe.exe
  2. Start the project using EMAUA.REST configuration wich is configured to be running on localhost:5000.
    *Important note, ngrok only works with HTTP!

  3. When project is running start ngrok.exe file and run the following command
    ngrok http localhost:5000
    *TIP - change the angular client enviorment to point to localhost:5000

  4. Stripe is loaded when cmd is opened on the folder where exe is being located (inside the solution root), and run
    the following command in cmd:
    stripe listen --forward-to ADD_NGROK_HTTP_LINK_HERE/api/StripePaymentGateway/paymentResult

    example : stripe listen --forward-to https://aa3a-77-29-123-121.eu.ngrok.io/api/StripePaymentGateway/paymentResult

    *Important notes:
    ** You can not open stripe EXE, it is loaded automaticly when cmd is opened on the location where the stripe.exe exists
    ** Link wich needs to be copied is located in cmd output msg when ngrok is started (FORWARDING)
    ** You can monitor incoming request and repeat them with WEB INTERFACE
    ** Look at the NGROK_STRIPE.img file for working examples

  5. Try payment with any card number from developer test cards https://stripe.com/docs/testing?numbers-or-method-or-token=card-numbers#cards

    • TIP - use 4242 4242 4242 4242 for successful payment
    • TIP - use 1234 5679 0123 4567 for failed payment

Use test cards to validate your Stripe integration without moving real money. Test a variety of international scenarios, including successful and declined payments, card errors, disputes, and bank authentication. You can also test non-card payment methods and redirects.

#

And those were the steps

#

I think it was too complicated, is there an easier way?

#

and even following those commands I get into the error:

stripe listen --forward-to https://93c0-37-30-10-103.ngrok.io/api/StripePaymentGateway/paymentResult
A newer version of the Stripe CLI is available, please update to: v1.18.0
[Mon, 18 Dec 2023 13:12:02 CET] FATAL Error while authenticating with Stripe: Authorization failed, status=401, body={
"error": {
"code": "api_key_expired",
"doc_url": "https://stripe.com/docs/error-codes/api-key-expired",
"message": "Expired API Key provided: rk_test_*********************************************************************************************4rIyWE",
"type": "invalid_request_error"
}
}

Learn more about error codes and how to resolve them.

lime zinc
#

Sorry, no idea what you've just shared with me. Not sure why ngrok is necessary if you're using the CLI

raw arrow
#

ok, let me try

#

ok, it says access granted and what about now?

#

and gave me an account id

#

ah, this is to fix the error I was having, right?

#

ok, there is no error anymore

lime zinc
#

Yes your credential had expired so you couldn't use stripe listen

#

Try that command again if you've authenticated

raw arrow
#

ok, thanks

#

how do you use the test data? By using the test keys and authenticating on the CLI is enough?

lime zinc
#

Depends what you mean by 'use the test data'. What exactly are you testing?