Automatically charge PayPal account?

房东的猫 提交于 2019-12-18 04:23:14

问题


I'd like to automatically charge my members a variable amount of money based on the services they use on my website. They would accumulate a balance owing, and then every week they would be charged for that amount. Is there a way I can do this without having to store their credit card information in my database?

(Similar to my last question, but I just realized I don't really want to go through the headaches and liability issues of having to safely store CC info)


回答1:


To accomplish this you'll need to create your own subscription system that manages the "when" of the subscription as well as the "how much". You then can use the API of your chosen payment processor to process the transaction.

An example of this would be to use the Authorize.Net Customer Information Manager (CIM) API to store customer billing information, including their credit card information, and then have a cron job that periodically polls the database and, when a user meets the criteria for a payment, calculate the proper amount and then use the CIM API to process their credit card. The integration is seamless so it will look as professional as you can make it.




回答2:


I do a similar process on my website and there are ways to avoid going through an API to process your customer's credit cards. We use Chargify to create the subscription system that manages "when" your customer will be charged and "how much."

Our payment gateway is connected to Chargify, which stores all of the credit card information so we do not have to be PCI compliant. (you can use PayPal as your payment gateway if you want). This way we do not have to go through an API to tell our payment gateway to charge our customer's credit cards.

If you went in the same direction and used a service like Chargify you will still have to create an API that tells Chargify how many services that your customer's used on your website so that Chargify knows how much to charge your customers. Or you can manually input the amount of services that your customers used that month but if you have a lot of customers then that would be time consuming.



来源:https://stackoverflow.com/questions/2398641/automatically-charge-paypal-account

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!