-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for recurring payments #20
Comments
Is there any updates on this feature? I'm trying to determine if I should try to implement it myself or wait for the official version. |
I haven't really done any work on it other than a simple POC commit: Someone else from Tangent is definitely working on this at the moment though as we have a client who needs subscription products that require recurring payments. However, I'm not sure how long it would take for that work to make it into this extension. @a-musing-moose - can you offer any further advice? So my advice would probably be to fork the extension and implement the recurring logic yourself (so you're not waiting for us). I'd happily review your work and merge it if you submit a PR afterwards. |
@eukreign As @codeinthehole says I have been working on a little on this over the past few days. I have a very basic working branch now: a-musing-moose@ad54d26 There are no real test or documentation for it yet I'm afraid and some pretty limiting restrictions. What is does allow:
Restrictions:
The way paypal recurring payments work (at least in express checkout) is that a separate recurring payment needs to be set up for each product purchased. This is somewhat different to how normal payments are constructed. You also need to call CreateRecurringPaymentProfile for each of these payments. You also need to perform a DoExpressCheckoutPayment if there are any normal payments in the basket as well. i.e. you end up with multiple transactions at the end of the process. So full support is a fairly complex proposal. For the project I am currently working on, and the time frame I have, this is not possible. Hence compromising on a limited implementation. Within the project that is using the recurring payments I am extending the basket app to include additional logic. Namely, that whenever a product with a recurring profile is added to the basket. That basket is first cleared so that the recurring product is the only one in it. I am also added logic to only allow a quantity of 1. If you are still interested in using the modification I have made thus far then I should also explain the PAYPAL_RECURRING_PREDICATE = 'myapp.mymodule.get_recurring_profile' This function is passed a product and returns either
Since you do not pass the actual amount to paypal until the CreateRecurringPaymentProfile call right at the end. It is recommended that the billing description contains not only the product description but all the cost, and recurring profile. billing_period can be 'Day', 'Week', 'Month', 'SemiMonth', 'Year' and billing_frequency is an integer value. So the above example is every 1 month. There is one additional part I have yet to implement. Which is IPN support. Instant Payment Notifications are sent out for recurring payments. One for the initial set and then one for every successful payment after that, or if the customer cancels the payment. That I'm afraid is still an exercise for the user. Hit me up if you have any further question. Either here or on the mailing list. |
You guys are awesome, thank you for the explanation. I am using PayPal Payments Advanced which requires tokens and CC input being hosted by them. I'll make pull requests if I'm able to generalize my implementation. One problem I've found with the hosted pages and tokens is that they do not support creating Recurring transactions. I found a stackoverflow post which explains the problem and provides a possible solution: http://stackoverflow.com/questions/13629023/secure-tokens-for-paypal-recurring-payments I will try to see if that solution could be generalized. |
What happen with this? |
Can I also ask if there are there any plans to implement this? |
Any updates on this Issue? |
I guess it died.
|
Please someone add subscription modul for oscar. |
Meanwhile, 11y, waiting. |
In PayPal Express, you can create recurring billing profiles, which is something we should support.
Tasks:
SetExpressCheckout
call to allow recurring billing paramsCreateRecurringPaymentsProfile
SetCustomerBillingAgreement
.ManageRecurringPaymentsProfileStatus
The text was updated successfully, but these errors were encountered: