Is it possible to use koudoku for one-time payments? - ruby-on-rails

This post references: https://github.com/andrewculver/koudoku
I'd like to use Koudoku for one time payments as opposed to recurring billing. I do not see any way to do this.

Koudoku is specifically designed for recurring subscriptions.
If you're just looking to do one-off payments, I recommend just following the standard Stripe tutorial for a payments page.
To support returning customers or additional purchases, I recommend simply using Devise for authentication and then saving whatever the resulting Stripe customer ID is from the first purchase in the user model, so you can run additional charges against the same card in the future.

Related

Recurring billing in activemerchant using Moneris Canada

I am working on an e-commerce site which allows user to purchase a product in 3 monthly instalments. Previously I was using Stripe payment gateway for instalments. I was using Stripe webhooks to update my system after instalments gets paid.
Now I have to achieve the same thing using Moneris(Canada) payment gateway. There are official libraries for Java, PHP & .NET but I am using Ruby. I looked into ActiveMerchant. It allows single charge but I couldn't find anything about recurring payment support.
As far as I know there is no any webhook support but I am looking for API's which I can schedule to run to fetch data from Moneris & update my system accordingly.
I would prefer using ActiveMerchant & a bit of custom code to update my system. I am looking for a good starting point which can lead to a better solution given this scenario.
AFAIK Moneris at this time doesn't support access to reporting via API so there's no programmatic way of checking that a recurring payment was successful or not, neither through webooks or through reportings.
This answer suggests another solution...
Looking for some one who has implemented Moneris recurring payments for a website subcription
...which is basically just storing the credit cards on Moneris in exchange for a token, presumably, (what the poster refers to as "the vault") and then setting up your own scheduler to request payments as needed and getting real-time feedback on success or failure of payments.

Rails 4: PayPal IPN, Payments for various Sellers

I am working on a Rails Application where Users can buy Items other Users shared previously.The payments should be flexible to allow the User who shared an Item to get the money a buyer pais.
1) Is it possible to create Flexible Paypal Payments (Different Seller, different Price for each Item)?
2) Can you use the PayPal IPN with Donations to check whether a buyer paid or not?
3) If not, what is the most efficient way to achive that goal?
Thanks in advance for each answer! Please tell me if you need additional information.
Here's the way I'd approach this:
Is it possible to create Flexible Paypal Payments?
Different sellers: Do you want them to be able to receive the payment directly in their Paypal? If that's the case, you'd need to provide them the details to create a Paypal merchant account and securely store those details, but I don't think that's the approach you want to take;
Most payment solutions provider gives a way to send payment to multiple vendors/merchants, which you may instead want to set up or even in your application, you can set up a kind of payment stuff to ensure that integrates with Paypal's API to pay your vendor soon as you receive payments for items.
So, yes it's possible, the different sellers could be tricky, but all other things are possible!
Can you use the PayPal IPN with Donations to check whether a buyer paid or not?
Absolutely, that's one of the biggest benefit of the IPN is that your application gets to know on time if someone has made a payment. You only have to validate this record with Paypal and, not like it's often necessary compare the payment amount

Paypal - Recurring billing with Rails (for non US merchant)

I need to integrate a subscription solution to my rails application. Paypal seems to be the best option (for non US Merchants).
I need to have
Ability to accommodate monthly and annual billing
Ability to suspend, cancel accounts etc
Deal with out-of-date card details or failed payment
just as mentioned here:
Recurring billing with Rails - what are my options?
I've come across various Paypal solutions like:
** Express Checkout
** Website Payments Standard
and various implementation options like ActiveMerchant, paypal_recurring gem
Just wanted to know
[A] - which Paypal option is the best one for subscription based billing with conditions 1-3 above and below additional condition:
for non US merchants
[B] - what are the best implementation options as in ActiveMerchant, or the paypal_recurring gem?
I would recommend going with Express Checkout and Recurring Payments. Specifically, you'll be using SetExpressCheckout, GetExpressCheckoutDetails (optional), DoExpressCheckoutPayment (optional), and CreateRecurringPaymentsProfile depending on exactly what you're doing with your application.
SEC will return a token that you'll use to redirect the user to PayPal as well as in following API calls.
GECD is used to obtain buyer details (ie. shipping address, address status, payer status, etc.) from PayPal now that the user has signed in and agreed to continue.
DECP would allow you to finalize a one-time payment that includes shipping and tax info, item details etc.
CRPP allows you to setup the recurring profile including one-time initial payment, trial amounts, regular amounts and periods, etc.
Then behind that you can use the UpdateRecurringPaymentsProfile API to manage the profiles programatically.

Schema for setting up a monthly subscription

I have an app which lists venues. Each venue can be either free or premium and so have different privileges. I would like to be able to link the premium upgrade to a payment but am struggling with how to do it.
Im pretty sure I'll end up using chargify or spreedly for the payments but what should the schema look like?
I'm thinking a monthly subscription would be best so should I set up another table of subscriptions and have a record generated each time a subscription is created or amended? So a venue would have many subscriptions and would it be sensible for each subscription record to have a boolean expired field with switches 28 days after it is generated?.
Thanks for any help.
Use Stripe. It integrates very well with Rails and has incredible (and sensible) documentation. Ryan Bates also did an excellent RailsCast on integrating Stripe with Rails, and his example is for a monthly subscription so you should be able to just follow along.
http://railscasts.com/episodes/288-billing-with-stripe
In the SaaS Rails Kit here's what I have:
Account (loaded by subdomain) has_one Subscription
Subscription has a datetime field, next_renewal_at, which gets set a month ahead every time billing happens successfully.
SubscriptionPayment (belongs_to Subscription) gets created every time a successful billing happens.
I don't know why your Venue would have many Subscriptions, but basically in my approach each Subscription has a billing token (provided by Stripe) that is used for charging a credit card.

Paypal recurring payment status

I’m trying to set up a recurring billing situation with Paypal using Rails with ActiveMerchant and the ruby-paypal gem. Wondering how the status of subscriptions is commonly managed - IPN? Or a cron job to check the status of all subscriptions?
In the SaaS Rails Kit I set up a recurring billing profile in PayPal then use a cron job to check on the status of that profile when it is time for it to be billed.
Another approach is to use reference transactions (aka billing agreements) and then using a cron job to bill that paypal user when and what you want. This was my initial implementation in the SaaS Kit, but a lot of people didn't like the hassle of getting reference transactions turned on for their PayPal accounts.

Resources