Invalid transaction id in paypal recurring

Hi all

I am working with the paypal recurring gem and rails 3.

I am subscribing different plans for a demo site. with “Basic” and
“Premium” plans.

I am doing a refund process for test.

def refund_payment
ppr = PayPal::Recurring.new({
:profile_id => self.paypal_recurring_profile_token,
:transaction_id => “#7RX73297E7023873T”,
:reference => “1234”,
:refund_type => :full,
:currency => “USD”
})
response = ppr.refund
raise response.errors.inspect if response.errors.present?
response
end

For profie id it gets the profile id from the table for each
transaction.
But incase of transaction id there are no transaction id in response
while
getting a payment to paypal.
I just hardcoded the transaction id from the last transaction from the
website. But it showing error.

[{:code=>“10004”, :messages=>[“Transaction refused because of an invalid
argument. See additional error messages for details.”, “The transaction
id is not valid”]}]

Thanks in advance
Debadatta

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs