Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
If you listen to rap at all, you know you've gots to get paid. So before we do anything else, let's look at how Drupal Commerce handles payments. I'll first show you how its example payment system works; that lets you test your store without involving any real money. Then I'll show you how to hook up your store to a PayPal account. To get started, we click Configure store, and Payment methods. Then let's go down to Example payment, and edit it. This page will become extremely familiar to you as you use Drupal Commerce.
This is the interface for a Drupal module called Rules, which comes with the Commerce Kickstart. Basically, Rules comprises three parts. This part at the top, Events, is what sets the rule in motion. In this case, it happens whenever a customer selects a payment method from a pop-up menu. The Condition section tells you what has to be true for the action to take place. For example, you could decide to accept PayPal payments up to only a certain dollar amount. If the order is bigger than that, the action simply won't fire.
This payment has no conditions. Customers can use it for all orders. Finally, Actions tells you what is actually going to happen when that event occurs. In this case, it's simply to allow customers to use this payment type. We will talk more about rules in the video about understanding rules. If you want to, you can read a lot more about it at drupal.org/project/rules. But, for now, we have no changes to make. So we will just get out of here by closing this overlay.
Now, let's let customers pay using PayPal, which is one of the most popular methods of payment on the internet. To accept such payments, you have to get an account at paypal.com, and specifically it's at developer.paypal.com. I won't go into the details. For that, see the lynda.com series eBay for Sellers Essential Training. I already created an account: email@example.com. We are going to have to have that when we go to configure the module.
But Drupal Commerce Kickstart doesn't come with that module preloaded. We are going to have to get it from drupal.org. You can do so by going to drupal.org/project/commerce_paypal. From there, you scroll down to the version that you want to install. At the time that I'm recording this, it's still in Development version. I know that it works, because I've tried it, but of course, you're going to want to use whatever is the most stable version available at the time you see this. You will right-click, or Command+Click, in order to copy this link location, and then you will install this as you do any other Drupal module.
For more information on that, you can see my lynda.com course, Drupal Essential Training. But we will just go up here in Modules >Install new module, and paste the URL that we just copied. This is the way that you install all modules. Click Install, and then we will enable it by clicking Enable newly added modules. Once again, we close up these groups, so that we get down to our Commerce group, and then we look for our PayPal module. There is our payment method example, and payment, which are already enabled, because they come with Commerce Kickstart, and here's our PayPal modules.
We are going to use PayPal, and WPS. There is also a Payments Pro that we won't get into. Scroll down to the bottom, and save configuration. Once that's done, we can actually go and configure that payment method. Once again, we go back up to Configure store where we were before, and Payment methods. Now we see an extra choice down here: PayPal WPS. We enable it by going over to the Enable link, and clicking it. Then make sure we want to; yes, we do. It's now almost ready to use, but we still have to edit it to put in our PayPal information.
So we click Edit, and down to our Actions, which we have to edit, and there is the spot we put in our PayPal e-mail address. Scroll to the bottom, and click Save. Now, I do want to mention a few of those other options that we skimmed over there. I'll click Edit, and take another look. First is the choice between Sandbox and Live. By default, you're not actually going to start accepting payments.
Instead, it's going to be a way that you can test accepting payments without transacting any real money. When you're ready to switch over, you will change it to Live, of course. Then there are some other options at the bottom, which aren't as important for our purposes, so we'll just click Save. So we now have two payment methods, which we can see once again by going to Configure store, and Payment methods. We have the Example payment, and PayPal WPS. These show up when somebody buys a product from our site, and then tries to pay for them.
Since we don't have any products yet, we can't demonstrate payment methods. But you will see how that works after we start adding some products to our site. We are now ready to start accepting customer's money, at least through PayPal, but customers still don't have a reason to pay us. So the next step is to start listing some products in our store.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 99279 Viewers
80 Video lessons · 141839 Viewers
59 Video lessons · 60221 Viewers
52 Video lessons · 73333 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.