4

I'm trying to create a Paypal express transaction using ActiveMerchant. Is there any way to set the payee as the entity responsible of paying any Paypal fees accrued?

payment_hash = {
    ip: ip_address,
    return_url: ...,
    cancel_return_url: ...,
    currency: 'USD',
    locale: "en",
    brand_name: 'Store', 
    allow_guest_checkout: 'false',   #payment with credit card for non PayPal users
  }


  response = EXPRESS_GATEWAY.setup_purchase(@ad.subtotal, payment_hash)

In the PayPal documentation there's a note about a feePayer parameter that can be passed with the value of SENDER but it seems that it is not working when I add it to the payment_hash options.

Angelfirenze
  • 99
  • 1
  • 14
Elad Meidar
  • 774
  • 6
  • 11

1 Answers1

1

My guess would be that feePayerisn't the right parameter name. According to this documentation, its correct name is feesPayer.

dajood
  • 3,758
  • 9
  • 46
  • 68
  • surprisingly, this is the right answer. i feel a little bit shamed. :) thanks! – Elad Meidar Nov 25 '14 at 15:46
  • 1
    I'm glad I could help you. Don't worry, we all know this "What?! THAT was the problem all the time?!?!"-feeling. In this case I guess that the Paypal interface checks only for the parameters it knows - it just doesn't care if there is one that it doesn't know. So you'll get no error message even if you put `noodlesoup:'yummy'`there. – dajood Nov 25 '14 at 15:56