HPD13A unable to send data to TTN

What sketch did you originally use as starting point?
The following part in your code looks suspicious because this is not where region/frequency is usually configured and could be the culprit of your problem:

#ifndef CFG_eu868
#define CFG_eu868
#endif

CFG_us915 is probably still defined (default) in the library’s project configuration file.
See LMIC documentation for where to properly configure the region/frequency band.

FYI: Code attached as a .txt file is not practical to have a look at because the file has to be downloaded first and the txt extension disables syntax highlighting in editors/viewers.
Preferred is to include a link to the file in an online repository, or add the code in the post properly formatted using the following guidelines: How do I format my forum post? [HowTo]