WpRentals is ready for the SCA regulations that apply to start from September 2019 in Europe. The new Stripe API is available from theme WpRentals v2.7.
Who can use Stripe
This list covers all currencies supported by Stripe – https://support.stripe.com/questions/which-currencies-does-stripe-support. Check here to confirm if you can create a stripe account in your country – https://stripe.com/global
Publish 1 Stripe Merchant Processor Page
Create ONLY 1 page with this custom template (if you import a demo, it already exists)
Make sure that you have only 1 page created, you should remove duplicates even from Trash.
This page needs to exist and the link of the page must be copied to the API setup.
Choose SANDBOX (for a test) or LIVE credentials (for production)
API details will be different based on your selection.
Create Stripe Keys
In order to create Stripe Key’s follow the below steps:
Step1: Create and activate your STRIPE account at – https://stripe.com/
FOR LIVE API – you must follow these instructions first (to activate your account): https://dashboard.stripe.com/account/onboarding/business-structure
SANDBOX API Key is given automatically and screenshots are made for the SANDBOX version.
Step2: Define webhook.
Go to Developers > Webhooks and follow the below steps to define the webhook:
- Click the + Add endpoint button
- Add the STRIPE URL page URL (with the stripe processor template) from your site to be able to check all transactions made.
- Click receive all events to get all events selected
- Click the Add endpoint button
Go to Stripe Dashboard -> Webhooks -> Add Endpoint -> Paste the Link Address for Stripe Page from your site -> Select “Receive All Events” and Add Endpoint
NOTE: The Endpoint URL is your domain URL. Please copy from your domain WordPress Admin -> Pages
Step3: Copy the API credentials
Go to Developers > API keys and copy Publishable key and Secret key:
Go to Developers > Webhooks > Select your domain webhook and copy Signing Secret id
Step4: Navigate to Theme Options > Membership > Stripe Settings and paste the keys.
STRIPE and Membership-based submission enabled.
Go to Product catalog to create your product (membership package) in Stripe
Add product
Add product information
Start with Product Name / Membership name
Add price information. Set the Currency, Price per package and billing interval to match the package settings from theme.
The Stripe product ID is generated automatically after creating the Stripe Product. Copy the ID and add it to your membership package as shown on the below screenshots:
Copy Stripe Product ID in WpRentals -> Edit Membership
The Stripe product ID is generated automatically after creating the Stripe Product. Save the ID to your Membership Package as in below screenshots:
How to cancel a Stripe Subscription
The button “Cancel Stripe Subscription” shows automatically to all users who purchased a membership package through Stripe.
Stripe Fatal error
Fatal error: Uncaught exception ‘Exception’ with message ‘Stripe needs the Multibyte String PHP extension.’ in /home/site/public_html/wp-content/themes/wpestate/libs/stripe/lib/Stripe.php:13 Stack trace: #0 /home/site/public_html/wp-content/themes/wpestate/libs/templates/user_profile.php(164): require_once() #1 /home/site/public_html/wp-includes/template.php(503): require(‘/home/site…’) #2
/home/site/public_html/wp-includes/template.php(477): load_template(‘/home/site…’, false) #3
/home/site/public_html/wp-includes/general-template.php(171): locate_template(Array, true, false) #4 /home/site/public_html/wp-content/themes/wpestate/user-dashboard-profile.php(251): get_template_part(‘libs/templates/…’) #5
/home/site/public_html/wp-includes/template-loader.php(74): include(‘/home/site…’) #6
/home/site/public_html/wp-blog-header.php(16): require_once(‘/home/site…’) #7
/home/site/public_html/i in /home/site/public_html/wp-content/themes/wpestate/libs/stripe/lib/Stripe.php on line 13
Solution
The above error message appears because Stripe needs the Multibyte String PHP extension.
This is a server PHP module.
Go to hosting and ask them to enable this PHP module on server please – http://php.net/manual/en/book.mbstring.php
Without it, Stripe will not work.