view · edit · sidebar · attach · print · history

Index>

20140922-fix-paypal-poweruser

Summary

  • Fix paypal poweruser

Commits

Index

Keep in Mind
  • Fix dojo error http://www.sitepen.com/blog/2012/10/31/debugging-dojo-common-error-messages/#forgot-dom-ready
  • I removed on May-27 tests for ix_registrationss, fix_sequences, fix_compositions, fix_packages from test/test_plugin/swissmedic.rb,as he could not find any references for them in the src code. Did I erroneously remove stuff when cleaning up the swissmedic import earlier?
  • The whole test for older/newer Packages must be adapted to xlsx. One must compare the rows (e.g. by creating csv files) and do the same stuff in xlsx!

---

Fix paypal poweruser

Adding some more debugging info to see why http://oddb-ci2.dyndns.org/de/gcc/download/email/20140923-175245%40ywesee.com/invoice/32264162/filename/unlimited+access fail. Then trying to fix the problem using bin/admin and also trying to display a correct error message (not appdown).

I can log in into the new user 20140923-175245@ywesee.com with password 44443333 which ws generated by running my paypal_spec.rb.

Added more debug info to trace all calls to yus_allowed? which tells me YusUser::allowed? org.oddb.PowerUser false. Now trying what happens if I grant poweruser for one year to the new user by calling in bin/admin yus_grant '20140923-175245@ywesee.com', 'login', 'org.oddb.PowerUser', Time.now+365*24*60*60 But after 5 items I still get the prompt. Now calling yus_grant '20140923-175245@ywesee.com', 'view', 'org.oddb', Time.now+365*24*60*60

Trying to call this yus grants src/state/paypal/return.rb leads to some problem. Fixed this problem. Now after a new login the newly create user is able to display the info. Must add reconsider_permissions, too. Now it seems to work, but I still have to handle the problem when reloading a link like http://oddb-ci2.dyndns.org/de/gcc/download/email/20140923-175245%40ywesee.com/invoice/32264162/filename/unlimited+access

Okay. Now payment and redirection work. But when looking at the whole test I see that I granted poweruser. Tested it with one day. Must make test for download a single csv file, too.

Fixing the download is not easy neither, as the workaroung via bin/admin as documented under http://dev.ywesee.com/Oddb/Oddbcsv did not work on oddb-ci2. Looking why link is generated when I login as admin user and try to download the marcoumar.

When trying the same on ch.oddb.org. I got downloaded an csv file with only one line Typ;

Therefore I will not try to solve the problems paying and creating download CSV file for now. Will clean up commit for checking out poweruser via paypal to work. Saving my commit (with many puts as Attach:paypal_1.txt).

Cleanup done. Found also some small fixed for unit tests laying around. Running now all the watir tests before pushing the commits. As expected I have the following errors

  1. ch.oddb.org should return a correct link to a CSV file if the payment is okay ./spec/paypal_spec.rb:200:in `block (2 levels) in <top (required)>'
  2. ch.oddb.org should not download a CSV file if the payment was not accepted ./spec/paypal_spec.rb:221:in `block (2 levels) in <top (required)>'
  3. ch.oddb.org should be possible to find 125Dihydroxycholecalciferol via analysen ./spec/searchbar_spec.rb:95:in `block (2 levels) in <top (required)>'
  4. ch.oddb.org should download the results of a search ./spec/smoketest_spec.rb:179:in `block (2 levels)

Pushed the following commits

Should probably also add to watir test whether the links under http://oddb-ci2.dyndns.org/de/gcc/download_export/ work.

Have now an initial version of this test. Also displays Ihre Bezahlung ist von PayPal noch nicht bestätigt worden.. Readding some puts in paypal/return.rb. After adding also a payment_received! I continued further but could not use the download link http://oddb-ci2.dyndns.org/de/gcc/download/email/20140924-170754%40ywesee.com/invoice/32264416/filename/oddb.csv.zip which didn't display anything interesting and no download took place.

My watir tests used a single download. Must check whether downloading for a whole year has the same problem or not.

Will fix this problem next week.

view · edit · sidebar · attach · print · history
Page last modified on September 24, 2014, at 05:14 PM