commerce-on-lightning
commerce-on-lightning copied to clipboard
Stripe Integration Issue
Steps followed :
- Named credentials named Stripe with API stripe URL. Named principal, Password authentication, and User name as publish key and password as secret key.
- b2c Stripe: all 3 classes are created as it is.
- create a payment gateway provider record by adding an adaptor class ID.
- create a payment gateway record by adding the above payment gateway provider ID and Named credentials ID in the merchant Id.
- app launcher > commerce > select our store > administration > link payment gateway record.
- in the exp site proceed with the checkout page.
- ERROR occurred.
- in the Payment Gateway log, 2 records were created. 1 - token (success), 2 - authorization (failed) RESPONSE: { "error": { "code": "secret_key_required", "doc_url": "https://stripe.com/docs/error-codes/secret-key-required", "message": "This API call cannot be made with a publishable API key. Please use a secret API key. You can find a list of your API keys at https://dashboard.stripe.com/account/apikeys.", "request_log_url": "https://dashboard.stripe.com/test/logs/req_bYVNL3w9kmdjru?t=1706093611", "type": "invalid_request_error" } }
- request : amount=146199¤cy=USD&payment_method=XXXXXXXXXXXXXXXXXXXXXXXXXXX&confirm=true&confirmation_method=manual&capture_method=manual