Open wolfgangr opened 2 months ago
lloks like I can't add attachments - neither pseudo pdf nor zip
this is the link that is produced for invoice download (retrieved from browser history) When I paste this in the address window, the invoice pdf correctly gets downloaded and opened
https://trade.aliexpress.com/ajax/invoice/invoiceExportAjax.htm?invoiceId=81422554729&orderId=3034800943659161
When I remove the invoiceID part, I get an error message
https://trade.aliexpress.com/ajax/invoice/invoiceExportAjax.htm?orderId=3034800943659161
The same error message I get, when I try your URL
const url = `https://trade.aliexpress.com/ajax/invoice/invoiceExportAjax.htm?orderId=${orderId}&name=${sanitizedFileName}`;
So do we have to add this invoice ID? Where to steal from?
This is the source code of aliexpress order download button (manually reformatted):
<div class="order-status order-block"
data-spm="order_detail_status"
data-spm-anchor-id="a2g0o.order_detail.0.order_detail_status.2268f19c02NJBB">
<div class="order-status-box">
<div class="order-status-content">
<div class="order-block-title" data-pl="order_block_title">
Awaiting delivery
</div>
<div class="order-status-info"
data-pl="order_block_info"
data-spm-anchor-id="a2g0o.order_detail.order_detail_status.i1.2268f19c02NJBB">
The system will automatically confirm receipt after <span>22 days</span>.
If there are any problems, you can apply for a refund/return within 90 days after order was placed.
</div>
</div>
</div>
<button data-pl="order_block_btn" type="button" class="comet-btn comet-btn-primary">
<span>Confirm received</span>
</button>
<button data-pl="order_block_btn" type="button" class="comet-btn">
<span data-spm-anchor-id="a2g0o.order_detail.order_detail_status.i0.2268f19c02NJBB">
Download invoice
</span>
</button>
</div>
sorry been busy with uni lately
https://acs.aliexpress.com/h5/mtop.aliexpress.trade.buyer.order.detail/1.0/?jsv=$JSV&appKey=$KEY&t=$TIME&sign=$SIGN&api=mtop.aliexpress.trade.buyer.order.detail&method=GET&v=1.0&timeout=15000&dataType=originaljsonp&type=originaljsonp&callback=mtopjsonp1&data={"tradeOrderId":$ID,"clientPlatform":"pc","shipToCountry":$COUNTRY,"timeZone":"GMT+$OFFSET"}
I've looked at trying to make it work but havent been successful, but its a lot more diffcult and i dont have much time recently.
if anyone has a PR to correctly include the invoiceid in the download url i'll accept it
Hi Peter, thanks for your great idea! (Just manually downloaded ~130 invoices manually....) however, when I try it, it produces HTML instead:
(I'll try to add full size samples)
in my Downlaod dir, a funny looking directory tree is created:
liegts an mir? hat ali das Interface geändert?
firefox 102.8.0esr auf debian10, noscript etc