WordPress does not allow uploading files with non standard extensions. To be able to upload files without getting warning from WordPress, you need to apply upload_mimes filter and add it to your functions.php file of your theme. In the example below, we add files with .wpas extension to the allowed file list:

[gist id="c38317ca9568586ebd26862dfb8b26a7"]
If you want to find the orders of a WooCommerce customer , since orders are a custom post type in WooCommerce you could use get_posts.
When using WordPress HTTP API, if the connection fails you could use the below code to display the error message.