Search code examples
activemerchantpaypal

ActiveMerchant PaypalExpress gateway - set who is paying fees


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.


Solution

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