your first error seems to caused by pagseguro/php library i didn't tried pagseguro or stripe both of them is forbidden in my country I used and integrated iyzico library and I didn't get any error, if u can update php library of pagseguro you may get rid of this https://github.com/pagseguro
for the second one I didn't tried to use it again but anyways I'll try. If I face same problem I'll solve and post here
first issue already solved, only got issue number 2. thanks for ur help