#rdsdaw2022-url-encoding
1 messages ยท Page 1 of 1 (latest)
@cosmic fog all parameters need to be url encoded, we don't accept JSON as input
really you should use one of our official client libraries to solve that issue for you
where can I find that? I have been able to successfully send payments and payment element gets rendered correctly and paid as well. But we want to add the metadata information. I am having trouble doing this.
I followed custom payment steps. it was simple, but I do not know about the client libraries.
'really you should use one of our official client libraries to solve that issue', custom client libraries
"client libraries" is just how we call our server-side libraries for your language, like stripe-php, stripe-python, etc.
hmm...we do not use php or python. I make request to stripe using plsql
let me digest that for a minute
how are you hitting our API in PLSQL exactly? Like waht code do you use?
apex_web_service.make_rest_request(
p_url => 'https://api.stripe.com/v1/payment_intents',
p_http_method => 'POST',
p_wallet_path => '################################',
p_wallet_pwd => '#######',
p_parm_name => l_parm_names,
p_parm_value => l_parm_values
);
like this
I have amount, currency etc as param names and the values in l_param_values
hum
apex_web_service.make_rest_request is oracle apex
what is p_wallet_path and such what does that even mean?
oh it is oracle permission/path to send request
gotcha, can you show me a concrete example of how you pass currency and amount?
basically the idea of how you send metadata is an array. So you want to pass metadata[customer_id]=12345
I see. so if I want 2 information to pass in metadata, then it has to be metadata[custid] = 12345 and metadata[custname] = 'abc'?
l_parm_names apex_application_global.vc_arr2;
l_parm_values apex_application_global.vc_arr2;
I pass like this
l_parm_names(1) := 'amount';
l_parm_values(1) := '50';
l_parm_names(2) := 'currency';
l_parm_values(2) := 'usd';
yeah so the name would be metadata[customer_id]
l_parm_values(3) := 'aaa';
l_parm_names(4) := 'metadata[order_id]';
l_parm_values(5) := 'bbb';``` or something like this (never used that tool)
yay
But when I use the same concept for
l_parm_names(7) := 'transfer_data[destination]';
l_parm_values(7) := 'TestAccountID';
I get "message": "Received unknown parameter: transfer_data[destination]",
"param": "transfer_data[destination]",
can you give me an example request id for me to look at? req_123
you can find it in your logs in your Dashboard https://dashboard.stripe.com/test/logs
unfortunately I do not have access to the dashboard ๐ฆ
ah, I would recommend always doing this with Dashboard access
it's near impossible to debug things blindly without any access to logs and errors
you're the dev, you can create your own Stripe account, use your own Test API key and debug all of this
but I would need bank account tied to it, right? My manager has his back account tied, and so only he has the access
you don't need a bank account to create a Test Stripe account no
it takes a few minutes to register for an account, get your Test API key and the rest is history!
let me see
but otherwise just pass koopajah as the value for that param
I can then find the request log and understand what's going on
looking
you are updating a PaymentIntent. You can't set transfer_data on PI update
or rather not transfer_data[destination]
I did login to my personal account in stripe, but to activate it, looks like I need to fill in back details
you have to decide this on PI creation
and you don't need to activate the account to use Test mode
yes really!
you have an account already, you have Test mode access, you can use the API key from the account no?