Recurring billing in activemerchant using Moneris Canada - ruby-on-rails

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.

Related

Braintree Sub-Merchant Display Income

Currently integrating Braintree's marketplace service with my Rails 4 app.
Wondering if there is any way to display current earnings to a sub-merchant (including what is in escrow and what has been deposited into their bank account).
I realize I can handle this just using the rails side of things, but making a call to their api to get this info seems more efficient and definitely better for congruency b/t braintree and my app.
Having trouble finding anything regarding this in the documentation. Thx.
I work for Braintree.
There is currently no way to use the Braintree API to return current earnings for a submerchant.
If you have any additional questions, feel free to reach out to Braintree support.

How can I use PayPal's credit card vault in RoR without having the CC information hit my server?

I have a client who is dead-set on using PayPal for Credit Card processing. The application must be able to charge cards without the user entering the information every time. Digging around, I've found the Credit Card Vault feature, which would at least let me store credit card information for future use. Unfortunately, as far as I can tell, there's no JS based tokenization procedure in the RoR Paypal SDK gem -- in order to store data in the vault, the information first has to hit my server. Which means I have to provide PCI compliance.
Is there any way to tokenize a credit card for later use in Paypal that will let the token be valid indefinitely?
In the REST API they call it the vault and they have documentation specific to it.
In the Classic API it's called a reference transaction, in which case you would use Payments Pro (DoDirectPayment or PayFlow) to process an original authorization or sale transaction, and then pass that transaction ID into future calls to process payments with the card data PayPal has saved on their server.
If using DoDirectPayment you would use DoReferenceTransaction. If using PayFlow you would just change some of the parameters in the typical request to make it a reference transaction. The doc links above cover all of that.
As long as you aren't saving any card data on your server then the only thing you'll need to be compliant is an SSL certificate on your site, but that's becoming a recommended practice regardless of whether or not you're processing payments.
If you want to completely avoid hitting your server then you'll have to go with Payments Advanced, which embeds a PayPal hosted iframe into your site. I don't think it supports reference transactions, though, and it's a lot more limited than REST or Payments Pro.

Integrating Paypal Rest SDK into Rails app --

I'm a fairly new developer and this is my first time integrating a rest API with an app. The goal is to implement a subscription process where a user can select from a choice of 4 subscriptions and then submit a payment through Paypal or stripe, but I'm struggling to understand how PayPal's rest API works. I've read their documentation and looked at some examples which gave me an idea of where to start. However, I had a few questions that I couldn't seem to find the answer to online:
Are subscription plans that are created through the rest API permanently associated with the account they have been created on?
If they are permanent, how can I avoid hardcoding the Plan ID? This seems like bad practice even though it is done in some of the examples.
When should I be generating new tokens? Every time they expire? Every time a user wants to subscribe to a plan?
How do I automatically execute agreements after they have been created? (I assume executing the agreement is what makes it active and begins the collection of payment).
Thanks, it would be nice to get some clarification on some of this stuff.

Use Paypal to accept payments in ASP.NET MVC

Hi I want to use Paypal to accept payments in my applications. I feel like I'm going around in circles. What I have gathered is that there is very little documentation and a lot of marketing guff that you need to wade through - no disrespect to anyone who has worked on it.
I've learned that the Restful APIs from Paypal are not full featured yet, and the classic APIs provide a richer set of features - and my merchant account is in Australia so I don't think I can use REST APIs yet.
I've got a number of questions :
What do I need to get started ? Is it essentially formatting a payload according to the documents and calling a web service or is there more to it ?
Are there any sample .net applications that use the classic API. I may have missed something but GIT repository only seems to have REST api samples - should I get this and use classic in its place or is there more to it ?
Should I be using the SDK at all ? I checked in Nuget and there are a number of SDKs - the asp.net -http://www.asp.net/web-forms/overview/getting-started/getting-started-with-aspnet-45-web-forms/checkout-and-payment-with-paypal and it doesn't talk about the SDKs ??
If I am to get the SDK which one should I start with for Classic, I'm assuming I only need the SDK for the respective functions I need. For example there is a Merchant SDK and Payments Pro SDK which has the same information on www.paypal.com/SDK
What I want to be able to do is the following:
Accept Credit Card and Paypal payments on my wedapp
Do Adaptive Payments
Establish Recurring Payments after a Credit Card and Paypal Payment
Do PreApproval
Provide Express Checkout as per Paypal requirement
Please help, there appears to be a lack of getting started guides for Paypal and MVC. If anyone has any samples that would be fantastic!
I can certainly help you with your Express Checkout requirement, and in shedding some light on the complexities of interfacing your application with PayPal.
This .NET SDK offers full support for Express Checkout functionality, as well as providing a concise readme that outlines how Express Checkout works at both high, and more precise levels of abstraction.
In terms of Express Checkout, there are 3 main terms that you should familiarise yourself with:
SetExpressCheckout
Establishes a PayPal session based on Merchant credentials, and returns an Access Token pertaining to that session.
GetExpresscheckoutDetails
Returns a definitive collection of metadata that describes the PayPal user (name, address, etc.).
DoExpressCheckoutPayment
Collects the payment by transferring the transaction amount from the User's account to the Merchant account.

Sending AND Receiving Payments with Paypal on Rails

I am building a marketplace app for a client and need to be able to both send payments and receive payments. I am currently using ActiveMerchant to handle incoming payments, but I don't see anywhere in the documentation if it is possible to SEND payments. I've read elsewhere that it may in fact be possible to send payments using one of Paypal's many API's but I'm not sure which one I should be looking to use.
If anyone has ever had to SEND payments within a rails system I would appreciate some insight, where to start looking, gems, etc.
Thanks!
I would look into Adaptive Payments it seems to offer something similar to what you are looking for. There is also a gem for it over here which seems to be actively developed.
If this wont work for you for any reason let me know and I can look for something else.
PayPal supports it with MassPay. Not sure about ActiveMerchant.
(To get MassPay enabled on the live PayPal site, contact CS. For Sandbox, log a ticket at https://www.paypal.com/mts/).

Resources