forcedotcom / commerce-on-lightning

An SFDX Plugin to setup a B2C or B2B Store
BSD 3-Clause "New" or "Revised" License
65 stars 71 forks source link

Stripe Integration Issue #300

Open DigvijayAt07 opened 5 months ago

DigvijayAt07 commented 5 months ago

Steps followed :

  1. Named credentials named Stripe with API stripe URL. Named principal, Password authentication, and User name as publish key and password as secret key.
  2. b2c Stripe: all 3 classes are created as it is.
  3. create a payment gateway provider record by adding an adaptor class ID.
  4. create a payment gateway record by adding the above payment gateway provider ID and Named credentials ID in the merchant Id.
  5. app launcher > commerce > select our store > administration > link payment gateway record.
  6. in the exp site proceed with the checkout page.
  7. ERROR occurred.
  8. 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" } }
  9. request : amount=146199&currency=USD&payment_method=XXXXXXXXXXXXXXXXXXXXXXXXXXX&confirm=true&confirmation_method=manual&capture_method=manual