Payment Issue in sales order - sales invoice cycle through portal

I am using Braintree integration with erpnext every payment is working fine also through mails but there is an issue that when I create a sales order and the admin creates an invoice for it, payment fails if I try to pay it from that invoice using portal, but its submits from payment request through mail.
If just an invoice is created I can pay it from portal, what could be the issue? Is that from braintree or a bug in erpnext?
The error is code: 3000 | text: Processor Network Unavailable - Try Again
please help

Maybe there was some error in braintree as suddenly it is working fine now