카테고리 없음

Drupal Commerce Stripe

morusreni1984 2021. 6. 15. 06:00


2014 24 Feb
  1. Drupal Commerce Api
  2. Drupal Commerce Stripes

Drupal Commerce itself is not, especially if we're talking about multiple payment methods for the same product with any hope of simple unified accounting and integration into the rest of the site. I can't think of a single thing you'd have to configure 'off' to have a simple checkout - I build them all the time. Explore hundreds of partners to help your business get started or do more with Stripe. Explore hundreds of partners to help your business get started or do more with Stripe. Drupal Commerce Commerce with confidence on Drupal. Diobox Modern event software with a beautiful and functional.

When you sell on the internet, you customers either buy the product and pay it’s cost one time, or they buy a service or a subscription and signup to pay a recurring fee.

In this blog lets compare various ways of how you can use Drupal to build a site with recurring billing.

Example use cases of such a site could be -

  1. Selling software or support as a service. Such as services from Acquia.
  2. Providing access to premium content. Such as video tutorials from druaplize.me.
  3. Promoting selected content on the site. Such as featured listings on craiglist.
  4. Many more..

While some of the intricacies that separate recurring-billing from one-time billing are -

  1. Multiple plans which the customers can upgrade and downgrade between.
  2. Billing cycles and intervals.
  3. Failed payments, grace periods and retrials.
  4. Subscription management.
  5. Compliance considerations.

Now, Drupal is a great platform to build e-commerce sites of all sizes and variety because it brings together the best of many worlds - quick to start distributions + modules to extend functionality +custom development + integration with 3rd party services.

When building a Drupal site with recurring payments, you can typically think of the entire setup as made of the following components -

Drupal commerce demo
  • What you are selling.
  • Business logic behind the online store.
  • The payment gateway.

Available drupal modules, building custom drupal solutions and ready to use 3rd party tools have a overlap in all the above 3 areas and it is worthwhile to compare them.

Drupal + Recurly + Recurly Roles

Recurly adds a SaaS based middle layer to recurring payments and subscriptions. Key features include ability to support multiple payment gateways (http://recurly.com/gateways/), option to host customized checkout pages with recurrly or embed payment form in your website using javascript, customer care support among others. A full list of features can be found here (http://recurly.com/features/)

The two drupal modules (https://drupal.org/project/recurly) and (https://drupal.org/project/recurly_roles) together allow for quick integration of the service with Drupal sites. If you require to give certain users of your site privileged access or role, and do not need a full e-commerce store running on top of commerce module, this setup should get you there.

Example usage scenario

  • Currency support = Multi currency support is provided only in the enterprise plan that comes at $299 / month.
  • Charge for 10 members paying 20 Euros per month = $99 + (10 x $0.1) + (1.25% of $275) ~ $104 + Merchant account charges
  • Charge for 500 members paying 20 Euros per month = $99 + (500 x $0.1) + (1.25% of $13744) ~ $322 + Merchant account charges

    Useful links to check out

  • https://blog.recurly.com/2010/08/top-ten-reasons-to-use-recurly-vs-gatew...

    Drupal + Chargify

    Chargify is another SaaS based recurring payments service that boasts of the standard features -https://chargify.com/features/recurring-charges/ but do not spell them out as clearly as Recurly does.

    To use this with your drupal site you would need to develop custom business logic, which can use the chargify API module as foundation - https://drupal.org/project/chargify_api

    Example usage scenario

  • Charge for 10 members paying 20 Euros per month = $65 + Merchant account charges
  • Charge for 500 members paying 20 Euros per month = $129 + Merchant account charges
  • Useful links to check out

  • https://chargify.com/features/recurring-charges/

    Drupal + Saasy (and others)

    Like recurly and chargify, there are numerous other SaaS based recurring payment services. Here is a good list and comparisions of them = http://www.practicalecommerce.com/articles/3280-9-SaaS-Subscription-Bill...

    From this list Saasy deserves a special mention because it has the most straight forward pricing, in which the merchant account costs are included in the pricing v, and there are no monthly charges. Their features are compared to other services here - http://saasy.com/matrix.php

    Customer sign ups happen on a secure, hosted SaaSy order page which can be branded to your site's look and feel, but cannot be embedded inside your site.

    Business logic in Drupal needs to be entirely custom coded to work with the Saasy APIs.

    Example usage scenario

  • Charge for 10 members paying 20 Euros per month = (8.9% of $275) = ~$25
  • Charge for 500 members paying 20 Euros per month = (8.9% of $13744) = ~$1224

    Drupal + Commerce Subscription Product

    Though this is now reported as an unsupported module, many have used it to create successful subscription systems in Drupal, including yours truly. The list of modules needed to configure a Drupal solution are -

  • Building a solution this way is recommended when you need to apply subscriptions to content on your site, to say promote certain content, though you can build priviledged roles/access based solutions too. Detailed process of building the business logic using commerce subcription product is well explained here -
    http://shushuinbar.blogspot.in/2013/01/using-drupal-commerce-for-node_85...

    Though refunds, cancellation and customer support can be provided, they would be a challenge unless you build robust solutions for them.

    Example usage scenario

  • Currency support = All international currencies supported via paypal. Standard currency conversion rates are applicable though.
  • Charge for 10 members paying 20 Euros per month = (10 x $0.30) + (4.5% of $275) = ~$16 + currency conversion charges
  • Charge for 500 members paying 20 Euros per month = (500 x $0.30) + (4.5% of $13744) = ~$770 + currency convertion

    Drupal + Commerce License

    The project commerce license https://drupal.org/project/commerce_license has been developed from ground up to be a drupal module that allows sites running on top of drupal commerce to sell access to things. A submodule is included that allows to sell access to premium roles on the sites.

    To include recurring payment for licenses, you would have to use the modulehttps://drupal.org/project/commerce_license_billing and some amount of custom glue code for your business logic.

    Both these modules are in alpha stage, so it would be recommended to build a proof of concept before you bet on them for production use.

    Charges when using this solution would be the same as you would pay to your payment gateway for transactions and maintaining the merchant account.

    Drupal + Stripe

    Initiative has also been taken to build subscription suite for Drupal around the Stripe payment gateway, but it is not complete and does not seem to be under active development.

    Links you should check out -

  • At the moment of writing this post, this solution is not recommended.

    Conclusion

    Based on the nature of your business, transaction volume, budgets, and developer resources, you have various options to choose from when it comes to building recurring online subscription systems in Drupal.

    There is no one single solution that can be used for everybody’s needs.

    Parting Note

    Recurring payments in drupal is an area where new and better solutions and itegrations are bound to take place at a rapid pace, so do share your experiences.

View the discussion thread.

comments

Share with Others

The Commerce Stripe module integrates Stripe with the Drupal Commerce checkout and payment system. This is one of the easiest services to use when setting up payments for your ecommerce site built using Drupal Commerce.

Keep in mind you will need to download the Libraries module and the Stripe library in order to get this to work (I do not mention this in the video).

In this episode you will learn:

  • How to set up the Commerce Stripe module
  • How to integrate the Drupal Commerce Stripe payment method into the checkout form
  • How to verify payments on the Stripe Dashboard
  • How to use Test and Live mode of Stripe with Drupal Commerce

Hello everyone and welcome to another Daily Dose of Drupal. I am Shane Thomas, you can follow me on Twitter at smthomas3, you can also make sure to follow Adam Learing on Twitter as well at adamlearing.

Today we’re going to going over the Commerce Stripe Module. Anytime you’re building an Ecommerce website you’re going to need some way to manage the payments or take credit card orders through the website and in this case we’re going to use Stripe.

Signing up for a Stripe account is pretty easy so you can go ahead and do that if you decide to use Stripe. We already have an account here and you can see it’s set in Test Mode and you can see there’s been a few test transactions and we’re also going to need the Commerce Stripe Module and it’s just on drupal.org/projects/commerce_stripe. We’re using the 1.0-rc6 branch today.

So the first step is to go ahead and turn that on, you’ll of course need a working Drupal Commerce site before you can even get this bar but assuming you have a working Drupal Commerce site, adding Commerce Stripe is pretty straight forward so we’re going to go ahead and turn this module on and we’ll click save and the first thing that we’re going to want to do is over in our Stripe Dashboard we’re going to want to go to our Account Settings and grab our API Keys because I don’t want you to be posting money to our account or maybe I should show you so you can post money to our account but you want to keep your API Key secrets so I’m not going to show you that but you’ll click here and you’ll be able to grab those and paste those in.

So let’s go ahead and go into our Store Configuration payment methods and you’ll see there’s Stripe and make sure that if it’s disabled you have to enable it first and then you want to click this Edit link and that will allow you to change your API Keys to match whatever is set here in your Stripe Dashboard.

So if you click the Edit here you’re going to see that there’s a rule here that runs so when you’re selecting available payments for an order it’s going to enable the payment method credit card and if you click here we can set the API Keys so I’m going to click there and once you’re on this page you’ll be able to select your Commerce Order for what the order is, select your Currency, here you’ll paste in your secret key and your publishable key from your Stripe Dashboard and you can also select what you want the payment method display title to be the default to let’s say Credit Card.

So you want to enter that in and click Save, we’re going to go ahead and close out of it because I already have it entered from previous link and now we’re going to go ahead and take a look at our Cart which I believe I have a product in here and the product I have is an e-book that we’re actually going to be coming out with your pretty soon called The Five Secrets To Becoming A Drupal 7 Ninja, so keep an eye out of that and make sure to subscribe for the Newsletter if you haven’t already but we’ll go ahead and go through the Checkout Process to see if Stripe has in fact working now.

Drupal Commerce Api

So go ahead and click Checkout and we’ll need to enter in our Billing Information so I’ll enter in that information and we don’t have a coupon code this time so we’ll go ahead and continue and now you’ll see there’s a payment method called Credit Card that shows up on a checkout page. So I can go ahead and use a test credit card number and this is just 42 … repeated 8 times so it’s 16 digits, select an expiration date that’s in the future, I don’t believe the security code matters, we go ahead and hot continue to go to the next step and this will actually charge our test card and this should make the payment to show up on the Stripe Dashboard.

As you can see we’ve got to the Checkout complete page and now if everything work okay we should see a payment here on our Stripe Dashboard and there you go, you can see that the payment came in and now flipping this thing from Test Mode to Live Mode is as simple as changing this from Test to Live and grabbing the correct Live API Keys rather than the Test API Keys and placing them inside your payment configuration section for the Commerce Stripe Module. And that’s really all there is to it.

Drupal Commerce Stripes

So really simple module to collect payments, there’s a lot of different payment modules out here, Stripe is not the only one of course. It just happens to be the one that we’re using or we’ll be using for Code Karate. So go ahead and try that out and let me know if you have any questions and we’ll see you next time, thanks for watching the Daily Dose of Drupal. Bye.