Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

How to to encrypt parameters sent to Paypal ? #16

Open
hopewise opened this issue Oct 24, 2012 · 2 comments
Open

How to to encrypt parameters sent to Paypal ? #16

hopewise opened this issue Oct 24, 2012 · 2 comments

Comments

@hopewise
Copy link

Here is my usage to the paypal-recurring gem in the checkout code:

ppr = PayPal::Recurring.new(
      return_url: new_subscription_url(:plan_id=>plan_id, :accounts_number => accounts_number),
      cancel_url: root_url,
      description: description,
      amount: price,
      currency: "USD"
    )

But, how to send parameters above encrypted to Paypal ?
I tried to encrypt them like this:

ppr = PayPal::Recurring.new(
      cmd: '_s-xclick',
      encrypted: paypal_encrypted(new_subscription_url(:plan_id=>plan_id, :accounts_number => accounts_number), root_url)
    )

But, I got this error:

undefined method `cmd=' for #<PayPal::Recurring::Base:0xbf9e4fc>

Any idea ?

@claudiosw
Copy link

@hopewise, have you made this work? I would like to do this and I would appreciate any help on this.

@CarlosRoque
Copy link

Isn't this redundant since all paypal API endpoints are through SSL?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants