Giter VIP home page Giter VIP logo

Comments (24)

ianfleeton avatar ianfleeton commented on September 13, 2024 8

I've started using my own fork as I need the changes I've pulled in so far, which include changes from more than one other fork.

I am working on a project that depends on this library for the next year. I'm happy to become a maintainer for the next year or so if it helps others, focusing on bug fixes / minor improvements rather than new features. I've not maintained a project before but first time for everything. Unless there are any other takers? @nov?

from paypal-express.

pastullo avatar pastullo commented on September 13, 2024 6

Quick solution: using the fork from Ian Fleeton

gem 'paypal-express', github: 'ianfleeton/paypal-express'

from paypal-express.

ktopping avatar ktopping commented on September 13, 2024 4

I encountered this same problem and it turns out that the issue was that, although the paypal-express gem hadn't changed, I had upgraded the rest-client gem from 1.8.2 to 2.0.0. The slight change between the versions is that they serialize querystring parameters slightly differently. Where 1.8.2 would emit:
&SUBJECT=&VERSION=0.88
2.0.0 emits:
&SUBJECT&VERSION=0.88
Although many servers understand this, seemingly Paypal's doesn't. (I'm guessing it sees one parameter named "SUBJECT&VERSION" with value "0.88" - and then complains that there's no VERSION in the request).
I have implemented a horrible workaround for now (evilly monkey-patching RestClient::Utils#encode_query_string). Although fixing to 1.8.2 of the rest-client gem works, too.

from paypal-express.

krzysztofbialek avatar krzysztofbialek commented on September 13, 2024 2

There already are pending PR with this change...Looks like this got abandoned

from paypal-express.

pastullo avatar pastullo commented on September 13, 2024 2

@ianfleeton @dgilperez shall we? 👍

from paypal-express.

luismiv85 avatar luismiv85 commented on September 13, 2024 2

Hi! If you want not change of repository you can use monkey patching. This is the code:

File: config/initializers/paypal.rb

....

Paypal::NVP::Request.class_eval do
  def common_params
    {
      USER: self.username,
      PWD: self.password,
      SIGNATURE: self.signature,
      SUBJECT: self.subject,
      VERSION: self.version,
      version: self.version # This is necessary
    }
  end
end

A little bit late, but I hoppe help some one.

This solution was taking from ianfleeton/paypal-express repository, so thanks a lot ianfleeton

from paypal-express.

comp615 avatar comp615 commented on September 13, 2024 1

I think @meal or @ianfleeton seemed to fix it here:
ianfleeton@cebd62f

Maybe we can merge that back into the canonical version? @nov are you still maintaining this or is there a new canonical fork?

from paypal-express.

meal avatar meal commented on September 13, 2024 1

I can create PR for this but I'm not sure if @nov still maintains this repository.

from paypal-express.

pastullo avatar pastullo commented on September 13, 2024 1

awesome @ianfleeton do that! we need somebody to take over. A quick paypal integration gem is quite useful and we can't let it die.

I tried to contact @nov multiple times on email, twitter and github, but no answer. Let's move on!

from paypal-express.

ianfleeton avatar ianfleeton commented on September 13, 2024 1

Excellent, I'll wait to see if anything happens by Sunday and if no news I'll start reviewing the current open issues and pull requests with a view to moving things forward. Any and all help welcome :)

from paypal-express.

ianfleeton avatar ianfleeton commented on September 13, 2024 1

I've made a few commits and pulled in some others' changes into https://github.com/ianfleeton/paypal-express by making pull requests from their forks and merging them.

Fixed:

  1. PayPal API version, including with refunds (thanks @meal @netjungle)
  2. Travis build with ActiveSupport 5.x (thanks @ursm)
  3. Phone number included (thanks @fny)

The next two items to look at:

  1. Gem releases
  2. Organization

Is it time to move the discussion over to ianfleeton/paypal-express?

Cheers!

from paypal-express.

fabioglopes avatar fabioglopes commented on September 13, 2024

Same problem here.

from paypal-express.

ianfleeton avatar ianfleeton commented on September 13, 2024

This was @meal's work - my fork contains two improvements, neither by me. A merge from @meal's would be better.

from paypal-express.

pastullo avatar pastullo commented on September 13, 2024

That's a pity because this gem is very useful and i used it in three projects already!

from paypal-express.

dgilperez avatar dgilperez commented on September 13, 2024

Which fork are you currently using guys?

from paypal-express.

dgilperez avatar dgilperez commented on September 13, 2024

@nov what about creating an organization for the gem? Time for this useful child to fly away?

If @nov doesn't reply, we may well create the org and move on. @ianfleeton if you need some help, I may find some time here and there.

from paypal-express.

tansaku avatar tansaku commented on September 13, 2024

if you guys want help and support from an organisation - AgileVentures is a charity that could help - we were just thinking about integrating paypal

Happy to provide a home for the project at https://github.com/AgileVentures/ if that's any help

from paypal-express.

tansaku avatar tansaku commented on September 13, 2024

I see that Paypal also has their own ruby gem https://github.com/paypal/PayPal-Ruby-SDK - is that any relation?

from paypal-express.

ianfleeton avatar ianfleeton commented on September 13, 2024

PayPal Express uses the NVP / SOAP APIs instead of the REST APIs provided by that library. I don't think they overlap, but I'm not 100%.

from paypal-express.

ianfleeton avatar ianfleeton commented on September 13, 2024

@ktopping have you tried using a later API version -- e.g., 204.0 to see if that helps? The fork over at https://github.com/ianfleeton/paypal-express uses that. If you find the same problem with that fork I'd be interested to know. Also, this fork includes the required version parameter in many more places.

I have that running with rest-client 2.0.0 no problems, though I haven't dug in to see whether the SUBJECT param is or isn't set in my usage.

(I find it interesting that your monkey patching did make a difference.. hmm)

from paypal-express.

ianfleeton avatar ianfleeton commented on September 13, 2024

I've pulled into the above PR #98 from @ursm (thanks!) which hopefully addresses this problem by explicitly setting a blank string for the subject parameter if it's nil.

from paypal-express.

ktopping avatar ktopping commented on September 13, 2024

Thanks for the replies. I have it working at the moment but will try upgrading to ianfleeton's fork next time I rebundle.

from paypal-express.

leandro avatar leandro commented on September 13, 2024

Following @pastullo's suggestion worked for me. Thank you. Too bad that this repo doesn't seem to be receiving any attention from the creator anymore.

from paypal-express.

henrik avatar henrik commented on September 13, 2024

We just upgraded rest-client from 1.8.0 to 2.0.2 and started getting this "Version error". Changing to ianfleeton's fork as mentioned by @pastullo above fixed it. Thank you!

from paypal-express.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.