ruby on rails - How to use paypal-report gem in my views? -


I want to work with PayPal's report

When users enter their PayPal email and password If you sign up then I need storage, to use it later, yes?

I found this gem - & gt; . How do I use it?

I need

  'paypal / report' in my business manager   

.

And the documentation says:

  'paypal / report' api = paypal :: report.new (user, password, vendor, partner) is required api .daily.inspect   

I want to add to my merchants. Show.erb, Something like this:

  & lt;% = api (@ user papoe__mail, @ user.paypal_password) .daily.inspect% & gt;   

So I can not call from the scene? If the user has messed up the account (this gem is used) is it easy or should I only collect PayPal login data?

I think the better solution is to complete all the actions within the controller and assign the result frequencies Which you can use in your view. Caching & amp; Examination will be very easy Example:

  requires 'PayPal / Report' Class MerchantsController def show api = Paypal :: Report.new (user, password, vendor, partner) @ daily_stats = api .daily End End   

More views (Very hard idea only, please adapt to the correct data structure):

  & lt; Ul & gt; & Lt;% @ daily_stats.each do stats | & Gt%; & Lt; Li & gt; & Lt;% = Statistics% & gt; & Lt; / Li & gt; & Lt;% end% & gt; & Lt; / Ul & gt;   

I hope this is helpful ..

BTW: Meanwhile we are receiving our PayPal report from the FTP server, which is completely complete , Can be fast and easy.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -