Individual Items for Paypal Express with Active Merchant

As far as documentation goes , only a single “order name” is possible. But i want to show each order item to the customer, so he can double-check them.

Item listing

Item listing

payment_service_for ...see documentation... do |service|
  #enable item_name_1 attributes
  service.add_field 'cmd','_cart'
  service.add_field 'upload',1

  #add individual items
  @order.items.each do |item|
    num+=1
    [["item_name_#{num}",item.name],["amount_#{num}",item.price]].each do |name,value|
      service.add_field name,value
    end
  end
  ...add additional information...
end
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s