Stripe payment - app_encryption_key?

Hello guys

I’m trying to figure out how to enable stripe. It seems I need to configure the app_encryption_key as well but I am not able to find this key. Any idea how to get it?
What is the actual name of this key?

Thank you

1 Like

https://stackoverflow.com/questions/17407984/how-to-generate-encryption-key-for-use-with-attr-encrypted[ ][1] this may help

Basically any dummy string will work. From your config.defaults.yml file, copy ‘app_encryption_key’ in developement section and use the same for production.
[1]: https://stackoverflow.com/questions/17407984/how-to-generate-encryption-key-for-use-with-attr-encrypted

1 Like

Ha, okay.
Thanks.

Now I need to work on the database then :wink:

1 Like

Hi Karibu,
I don’t know where you are with the database modifications, but I could display the “payment settings” on the left menu and get the possibility to access to the ~/admin/payment_preferences page
I just add a row in the payment_settings table of the database with :
id : autoincrement
active : 1
community_id : your community_id of the communities table (for me it is 1)
payment_gateway : stripe
payment_process : preauthorize

I don’t think this was necessary but I also filled (by myself or automatically) :

commission_from seller : NULL
minimum_price_cents : NULL
minimum_price_currency : 0.5
minimum_transaction_fee_cents : NULL
minimum_transaction_fee_currency : NULL
confirmation_after_days : 1
created_at : i chose today in the calendar
updated_at : i chose today in the calendar as well
api_client_id : NULL
api_private_key : my private key from stripe
api_publishable_key : my public key from stripe
api_verified : NULL
api_visible_private_key : NULL
api_country : NULL

I didn’t check every functionnalities yet, but still, you can now setup stripe payment through your page as it is shown on https://help.sharetribe.com/payments-and-transactions/online-payments-with-stripe/how-to-configure-your-stripe-account-and-get-api-keys-for-your-marketplace

cheers

Yes same here, but not fully functional.

I’ve asked the support of a pro and it is working well now. I’m learning how to do it and I’ll complete my articles

Indeed, the initial instructions were not really clear. They’ve been updated in the Readme file.

The encryption key is used to encrypt safely the Stripe API keys when storing them. So you should fill that variable with some long random key, unique to your project, and keep it secret!

api_private_key is shown in rails console as an encrypted string. How do I update the api_private_key?
There’s no option to update stripe api keys in admin interface.

Any help is greatly appreciated.
Nghia

The easy way would be to update payment_settings.api_verified = false flag using rails console or database sql query, and then just enter new key from admin interface.

After updating the api_private_key and api_publishable_key, the existing stripe_seller_ids are now invalid and must also be updated.
Rails console -
StripeAccount -
stripe_seller_id should set to nil. then go to admin interface to update the seller payment account info.

Zenik, thank you very much,
-Nghia

If you’re getting Invalid Token error when updating the seller’s payment setting. Logout then login again.

The user will able to find out the valuable way to stripe the payment app where the e encryption key were not able to proceed it so that Epson error code 0x69 will bale to find out the work around it and try to mange the interface