Invoice File-Attachment

IBSHofmeister
Contributor
Contributor

Hello,

we want to attach a pdf file to a invoice i created with the rest api but somehow the pdf just disappear while creating the invoice without throwing any exception.

var uri = new Uri("http://www.pdf995.com/samples/pdf.pdf");
var converted = uri.AbsoluteUri;

 

var uri = new Uri("http://www.pdf995.com/samples/pdf.pdf");
var converted = uri.AbsoluteUri;

var invoice = new Invoice()
{
    ....
    attachments = new List<FileAttachment>()
    {
        new FileAttachment
        {
            name = "pdf.pdf",
            url = converted
        },
    }
}

 

The invoice is created but without any attachments.
Without any errors from paypal response we are not able to figure out whats the issue.

Login to Me Too
2 REPLIES 2

MTS_Ciaran
Moderator
Moderator

Can you please post the PayPal API response, even though there are no errors the debug ID or correlation ID should be able to help us figure out the issue. 

Login to Me Too

IBSHofmeister
Contributor
Contributor

{

  • """id\":\"INV2-N6QK-SQBX-3ZXS-D7YV\",
  • \"number\":\"test007\",
  • \"template_id\":\"TEMP-14977300Y46570017\",
  • \"status\":\"DRAFT\",
  • \"merchant_info\":{
    • \"email\":\"Merchantemail(which is not permitted in this community)\",
    • \"first_name\":\"Frist\",
    • \"last_name\":\"Last\",
    • \"address\":{
      • \"line1\":\"Lange 9c\",
      • \"city\":\"Berlin\",
      • \"country_code\":\"DE\",
      • \"postal_code\":\"31234\",
      • \"state\":\"Berlin\"
      },
    • \"business_name\":\"Example Business\",
    • \"phone\":{
      • \"country_code\":\"+49\",
      • \"national_number\":\"231231451\"
      }
    },
  • \"billing_info\":[
    1. {
      • \"email\":\"buyeremail(which is not permitted in this community)"
      }
    ],
  • \"shipping_info\":{
    • \"first_name\":\"IBS\",
    • \"last_name\":\"Hofmeister\",
    • \"business_name\":\"Examble Merchant\",
    • \"address\":{
      • \"line1\":\"Lonng 7\",
      • \"city\":\"Hannover\",
      • \"country_code\":\"DE\",
      • \"postal_code\":\"12314\",
      • \"state\":\"Niedersachsen\"
      }
    },
  • \"items\":[
    1. {
      • \"name\":\"Schneider Kugelschreiber\",
      • \"quantity\":1.0,
      • \"unit_price\":{
        • \"currency\":\"EUR\",
        • \"value\":\"1.00\"
        }
      }
    ],
  • \"invoice_date\":\"2017-05-22 PDT\",
  • \"payment_term\":{
    • \"term_type\":\"NET_30\",
    • \"due_date\":\"2017-06-21 PDT\"
    },
  • \"tax_calculated_after_discount\":false,
  • \"tax_inclusive\":false,
  • \"total_amount\":{
    • \"currency\":\"EUR\",
    • \"value\":\"1.00\"
    },
  • \"metadata\":{
    • \"created_date\":\"2017-05-22 23:35:18 PDT\"
    }

}

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.