#eudemon123

1 messages ยท Page 1 of 1 (latest)

timid lodgeBOT
rotund hinge
steady shore
#

Ok probably I found needed information but...

#

local.ERROR: The provided key 'sk_test_*********************************************************************************************xxxxx' does not have the required permissions for this endpoint on account 'acct_xxxxxxxDtxsO'. Having more permissions would allow this request to continue. {"exception":"[object] (Stripe\Exception\PermissionException(code: 0): The provided key 'sk_test

#

person = $this->stripeClient->accounts->allPersons(
$stripeAccountId,
['limit' => 1]
);

#

this is what I got when i'm calling this endpoint

#

I need full access (read write) to attach a file with ID to person

#

the only data what I need is personID

rotund hinge
#

Can you share the account ID thatyou're trying to retrieve so I can take a closer look?

steady shore
#

assume that every account have only one object

#

acct_1NInpMRibOALOj9C

rotund hinge
#

Can you log $stripeAccountId and make sure it's the value you expect? From what I can see on the reqeusts on our end it doesn't look like you're passing in acct_1NInpMRibOALOj9C for that

steady shore
#

o_O

#

one sec

#

pls wait im testing it from our custom mobile app

rotund hinge
#

take your time

steady shore
#

i tested it

#

acct_1NInpMRibOALOj9C

#

dd($stripeAccountId);
$report = $this->stripeClient->identity->verificationReports->retrieve($verificationReportId);
$person = $this->stripeClient->accounts->allPersons(
$stripeAccountId,
['limit' => 1]
);
dd($person);

#

now I'm disabling first dd

#

got it o_O how it's possible ?

#

could you share me the last account id before current request ?

#

need to test is it some caching issue

rotund hinge
#

With the last failing request I was looking at you were either passing in acct_1LPoecDL2LaDtxsO or an empty string (which will default to running the request on the account that owns the keys used for the request)

steady shore
#

ok thx

steady shore
#

another question

#

almost it works but is it possible to change a file purpose parameter ?

#

or create new one based on existing file ?

#

just I want to avoid downloading and uploading agian

#

That file was not uploaded with the correct purpose parameter. Try uploading a new file with a valid purpose: identity_document, document_provider_identity_document. {"exception":"[object] (Stripe\Exception\InvalidRequestException(code: 0): That file was not uploaded with the correct purpose parameter. Try uploading a new file with a valid purpose: identity_document, document_provider_identity_document. at /var/www/html/vendor/stripe/stripe-php/lib/Exception/ApiErrorException.php:38)

#

we already have this file on verification report

subtle hazel
#

Hi there ๐Ÿ‘‹ jumping in as my teammate needed to step away. I don't believe so, I'm not seeing an endpoint for updating a File, nor am I seeing a field for creating a File that allows you to reference another File object.

timid lodgeBOT
steady shore
#

ok so I see I need to download this file first :/

#

identity_document_downloadable

#

sorry not here

#

but please confirm that I can download files with this purpose - sorry just I'm so tired but I need to finish that integration ๐Ÿ˜‰

#

and want to avoid stupid problems ;P

subtle hazel
#

If the question is what file purpose should be used when uploading these files, then I would recommend using one of the purpose values provided in the error message you encountered.

steady shore
#

ok once again

#

let's assume that we have verified and closed verification session.

#

From there we can get an verification_report what's contain a document file with purpose parameter = 'identity_document_downloadable'

#

now there is a case - can I easily access to this file content, to download it to our backend and upload it again with other purpose parameter and assign to person object? we need to make a verification process automatically.

subtle hazel
steady shore
#

let me check

#

links": {
"object": "list",
"data": [],
"has_more": false,
"url": "/v1/file_links?file=file_1NIonsDL2LaDtxsO1YkuWYN4"
},

subtle hazel
#

Did you check the url field instead of the links hash? What did you see in url (not links.url)?

steady shore
subtle hazel
#

All good, so that value shown there for url is where the contents of the file should be accessible if you make a get request to that url (the field would be null if the file wasn't accessible). You will need to include your secret API key in the authentication header in order to access that URL though.

timid lodgeBOT
steady shore
#

jesus another new problem

#

I already created this key

#

$this->stripeClient = new StripeClient(env('STRIPE_RESTRICTED'));

spice gulch
#

Hello! I'm taking over and catching up...

steady shore
#

one sec

#

I refreshed my local environment

#

ok didn't work

#

checking request

#

ok works...

#

let you know when I'll get another error

#

looks like im almost on finish line ;P

steady shore
#

another problem

#

local.ERROR: Invalid file: must be uploaded in a multipart/form-data request. {"exception":"[object] (Stripe\Exception\InvalidRequestException(code: 0): Invalid file: must be uploaded in a multipart/form-data request. at /var/www/html/vendor/stripe/stripe-php/lib/Exception/ApiErrorException.php:38)

#

the problem is that it should work... file is accessible

#

$fileData = [
'purpose' => 'identity_document',
'file' => [
Storage::disk('local')->get('app.jpg')
]
];

#

$newFileObject = $this->stripeClient->files->create(
[
'purpose' => 'identity_document',
'file' =>$fileData
]
);

#

ahh damn

#

my fault..sorry

spice gulch
#

You got it?

steady shore
#

yep...just 16h passed at work ๐Ÿ˜

#

sorry guys

spice gulch
#

No worries!

#

Glad you're making progress. ๐Ÿ™‚

steady shore
#

yea and thinking about changing job for uber driver <facepalm> ๐Ÿ˜„