# Active Mehcant + Transaction is invalid?

**URL:** <https://www.ruby-forum.com/t/active-mehcant-transaction-is-invalid/145029>\
**Category:** Rails\
**Created:** [August 5, 2008, 12:05pm UTC](https://www.ruby-forum.com/t/active-mehcant-transaction-is-invalid/145029 "2008-08-05T12:05:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![prionko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5f9b8f/32.png) [@prionko](https://www.ruby-forum.com/u/prionko)\
**Post date:** [August 5, 2008, 12:05pm UTC](https://www.ruby-forum.com/t/active-mehcant-transaction-is-invalid/145029/1 "2008-08-05T12:05:45Z")

</div>

Hi,

I have followed Cody F.'s tutorial ‘PayPal Express Payments with  
ActiveMerchant’  
[[http://www.codyfauser.com/2008/1/17/paypal-express-payments-with-activemerchant](http://www.codyfauser.com/2008/1/17/paypal-express-payments-with-activemerchant)]  
and its working fine for me in my local system. But when I try to move  
the code in my server, the code is not working.I get the following  
error:  
"This transaction is invalid. Please return to the recipient’s website  
to complete your transaction using their regular checkout flow. "

NB: I was logged into the [developer.paypal.com](http://developer.paypal.com) when trying to do the  
checkout. Can anyone throw some light into this ?

-Saurav

---

<div class="post-metadata">

**Author:** ![prionko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5f9b8f/32.png) [@prionko](https://www.ruby-forum.com/u/prionko)\
**Post date:** [August 5, 2008, 2:32pm UTC](https://www.ruby-forum.com/t/active-mehcant-transaction-is-invalid/145029/2 "2008-08-05T14:32:42Z")

</div>

I also want to add that without even login to the [paypal.developer.com](http://paypal.developer.com),  
I get the same error.

Saurav C. wrote:

> Hi,
> 
> I have followed Cody F.'s tutorial ‘PayPal Express Payments with  
> ActiveMerchant’  
> [[http://www.codyfauser.com/2008/1/17/paypal-express-payments-with-activemerchant](http://www.codyfauser.com/2008/1/17/paypal-express-payments-with-activemerchant)]  
> and its working fine for me in my local system. But when I try to move  
> the code in my server, the code is not working.I get the following  
> error:  
> "This transaction is invalid. Please return to the recipient’s website  
> to complete your transaction using their regular checkout flow. "
> 
> NB: I was logged into the [developer.paypal.com](http://developer.paypal.com) when trying to do the  
> checkout. Can anyone throw some light into this ?
> 
> -Saurav

---

<div class="post-metadata">

**Author:** ![prionko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5f9b8f/32.png) [@prionko](https://www.ruby-forum.com/u/prionko)\
**Post date:** [August 29, 2008, 10:05am UTC](https://www.ruby-forum.com/t/active-mehcant-transaction-is-invalid/145029/3 "2008-08-29T10:05:26Z")

</div>

I think something is wrong with paypals test environment… I  
commented out

#config.after\_initialize do

# ActiveMerchant::Billing::Base.mode = :test

#end

in config/environments/development.rb and it seems to work fine now.  
Well, its asking me to log into paypal at least, I try to login but my  
login matches my merchant login, so it complains about that. But  
still, I think its working fine.

On Aug 5, 5:32 am, Saurav C. \<rails-mailing-l…@andreas-

---

<div class="post-metadata">

**Author:** ![prionko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5f9b8f/32.png) [@prionko](https://www.ruby-forum.com/u/prionko)\
**Post date:** [September 1, 2008, 9:29am UTC](https://www.ruby-forum.com/t/active-mehcant-transaction-is-invalid/145029/4 "2008-09-01T09:29:08Z")

</div>

Could you solve the problem ?

I have implemented it with Ruby PayPal SDK. Its working fine for me now.

jerome187 wrote:

> I’m having the same issue, its happening on my laptop tho, I have not  
> tried to put it on a server yet.
> 
> On Aug 5, 5:32ï¿½am, Saurav C. \<rails-mailing-l…@andreas-

---

<div class="post-metadata">

**Author:** ![prionko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5f9b8f/32.png) [@prionko](https://www.ruby-forum.com/u/prionko)\
**Post date:** [August 29, 2008, 10:06am UTC](https://www.ruby-forum.com/t/active-mehcant-transaction-is-invalid/145029/5 "2008-08-29T10:06:02Z")

</div>

I’m having the same issue, its happening on my laptop tho, I have not  
tried to put it on a server yet.

On Aug 5, 5:32 am, Saurav C. \<rails-mailing-l…@andreas-
