ActiveMerchant PaypalExpress Missing Item Description

I work with ActiveMerchant, and the verification process is completed, as a result of which the end user receives the correct amount, but in the receipt sent to the end user via PayPal, and in the Paypal backend there is no title and description of the item, But they are displayed on the order preview screen, where the user subscribes to his PayPal account.

Here is the code I use to set up a PayPal transaction:

setup_response = PAYPAL_GATEWAY.setup_purchase(@product.price.cents,
   :ip => request.remote_ip,
   :return_url => url_for(:action => 'paypal_confirm', :only_path => false),
   :cancel_return_url => root_url,
   :items => [{
      :name => @product.title,
      :quantity => 1,
      :amount => @product.price.cents
}]

After the user enters and completes the payment process, and paypal returns to the URL of my domain, I get the following response:

details_response = PAYPAL_GATEWAY.details_for(params[:token])

response: #<ActiveMerchant::Billing::PaypalExpressResponse:0x007fe06e73a6d0 @params={"timestamp"=>"2014-02-07T00:53:40Z", "ack"=>"Success", "correlation_id"=>"1e941b048cb0c", "version"=>"72", "build"=>"9605603", "token"=>"<TOKEN>", "payer"=>"info2@info.com", "payer_id"=>"<PAYER ID>", "payer_status"=>"verified", "salutation"=>nil, "first_name"=>"Info", "middle_name"=>nil, "last_name"=>"", "suffix"=>nil, "payer_country"=>"US", "payer_business"=>nil, "name"=>"ITEMDESCRIPTION", "street1"=>"1 Main St", "street2"=>nil, "city_name"=>"San Jose", "state_or_province"=>"CA", "country"=>"US", "country_name"=>"United States", "postal_code"=>"95131", "address_owner"=>"PayPal", "address_status"=>"Confirmed", "order_total"=>"14.99", "order_total_currency_id"=>"USD", "item_total"=>"14.99", "item_total_currency_id"=>"USD", "shipping_total"=>"0.00", "shipping_total_currency_id"=>"USD", "handling_total"=>"0.00", "handling_total_currency_id"=>"USD", "tax_total"=>"0.00", "tax_total_currency_id"=>"USD", "phone"=>nil, "address_id"=>nil, "external_address_id"=>nil, "quantity"=>"1", "tax"=>"0.00", "tax_currency_id"=>"USD", "amount"=>"14.99", "amount_currency_id"=>"USD", "ebay_item_payment_details_item"=>nil, "insurance_total"=>"0.00", "insurance_total_currency_id"=>"USD", "shipping_discount"=>"0.00", "shipping_discount_currency_id"=>"USD", "insurance_option_offered"=>"false", "seller_details"=>nil, "payment_request_id"=>nil, "order_url"=>nil, "soft_descriptor"=>nil, "checkout_status"=>"PaymentActionNotInitiated", "payment_request_info"=>nil, "Token"=>"EC-2TA24464XG397043V", "PayerInfo"=>{"Payer"=>"info2@info.com", "PayerID"=>"<PAYER ID>", "PayerStatus"=>"verified", "PayerName"=>{"Salutation"=>nil, "FirstName"=>"Info", "MiddleName"=>nil, "LastName"=>"Info", "Suffix"=>nil}, "PayerCountry"=>"US", "PayerBusiness"=>nil, "Address"=>{"Name"=>"Info", "Street1"=>"1 Main St", "Street2"=>nil, "CityName"=>"San Jose", "StateOrProvince"=>"CA", "Country"=>"US", "CountryName"=>"United States", "PostalCode"=>"95131", "AddressOwner"=>"PayPal", "AddressStatus"=>"Confirmed"}}, "PaymentDetails"=>{"OrderTotal"=>"14.99", "ItemTotal"=>"14.99", "ShippingTotal"=>"0.00", "HandlingTotal"=>"0.00", "TaxTotal"=>"0.00", "ShipToAddress"=>{"Name"=>"Info", "Street1"=>"1 Main St", "Street2"=>nil, "CityName"=>"San Jose", "StateOrProvince"=>"CA", "Country"=>"US", "CountryName"=>"United States", "Phone"=>nil, "PostalCode"=>"95131", "AddressID"=>nil, "AddressOwner"=>"PayPal", "ExternalAddressID"=>nil, "AddressStatus"=>"Confirmed"}, "PaymentDetailsItem"=>{"Name"=>"ITEMDESCRIPTION", "Quantity"=>"1", "Tax"=>"0.00", "Amount"=>"14.99", "EbayItemPaymentDetailsItem"=>nil}, "InsuranceTotal"=>"0.00", "ShippingDiscount"=>"0.00", "InsuranceOptionOffered"=>"false", "SellerDetails"=>nil, "PaymentRequestID"=>nil, "OrderURL"=>nil, "SoftDescriptor"=>nil}, "CheckoutStatus"=>"PaymentActionNotInitiated", "PaymentRequestInfo"=>nil}, @message="Success", @success=true, @test=true, @authorization=nil, @fraud_review=false, @avs_result={"code"=>nil, "message"=>nil, "street_match"=>nil, "postal_match"=>nil}, @cvv_result={"code"=>nil, "message"=>nil}>

, API Paypal, , . , ?

ActiveMerchant, , , .

+3
2

, Paypal. .

PAYPAL_GATEWAY.purchase , , - PayPal.

0

, . , , . , 1. .

setup_response = PAYPAL_GATEWAY.setup_purchase(@product.price.cents,
   :ip => request.remote_ip,
   :return_url => url_for(:action => 'paypal_confirm', :only_path => false),
   :cancel_return_url => root_url,
   :items => [{
      :name => @product.title,
      :quantity => 1,
      :amount => @product.price.cents,
      :description => @product.description
}]
0

All Articles