#james_35976

1 messages · Page 1 of 1 (latest)

polar waspBOT
#

Hello james_35976, we'll be with you shortly! Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
james_35976, 0 days ago, 5 messages
james_35976, 1 days ago, 7 messages
james-checkout-php, 1 days ago, 103 messages
james_35976, 4 days ago, 18 messages

tender dove
clear lodge
#

let me check

#

looks like it has not submitted successed

#

it was failed on local

tender dove
#

So what's the exact error message that you received?

clear lodge
#

Uncaught Error sending request to Stripe: (Status 400) (Request req_3PSDz6Osroxv4J) Received unknown parameter: shipping_address_collection[shipping_options]
Stripe\Exception\InvalidRequestException: Received unknown parameter: shipping_address_collection[shipping_options] in /var/www/html/MiniS/stripe/lib/Exception/ApiErrorException.php:38

#

array(10) {
["line_items"]=>
array(1) {
[0]=>
array(3) {
["currency"]=>
string(3) "USD"
["product_data"]=>
array(2) {
["name"]=>
string(45) "specific item(order note is required) Color:-"
["images"]=>
array(1) {
[0]=>
string(70) "https://www.thumbwholesale.com/MiniS/image/group/1274_1-1690485336.jpg"
}
}
["price_data"]=>
array(2) {
["unit_amount_decimal"]=>
int(100)
["quantity"]=>
int(1)
}
}
}
["mode"]=>
string(7) "payment"
["cancel_url"]=>
string(52) "https://www.iomu.com/stripeCancellation?oId=10007061"
["client_reference_id"]=>
string(8) "10007061"
["success_url"]=>
string(19) "success payment URL"
["automatic_tax"]=>
array(1) {
["enabled"]=>
bool(true)
}
["billing_address_collection"]=>
string(8) "required"
["custom_text"]=>
array(1) {
["shipping_address"]=>
string(8) "required"
}
["shipping_address_collection"]=>
array(2) {
["allowed_countries"]=>
array(1) {
[0]=>
string(2) "US"
}
["shipping_options"]=>
array(1) {
["shipping_rate_data"]=>
array(3) {
["display_name"]=>
string(12) "Shipping Fee"
["type"]=>
string(12) "fixed_amount"
["fixed_amount"]=>
array(2) {
["amount"]=>
int(0)
["currency"]=>
string(3) "USD"
}
}
}
}
["submit_type"]=>
string(3) "pay"
}

tender dove
#

Ok, you got this error because you nested shipping_options in shipping_address_collection.

#

You should move shipping_options out and try again.

clear lodge
#

shipping_options ?

#

i did not submitted that para

#

parameter

polar waspBOT
clear lodge
#

let me check the doc again

tender dove
clear lodge
#

i am so sorry I checked again. I did not notice the error

#

$payment['shipping_address_collection']['allowed_countries'][0] = 'US';
$payment['shipping_address_collection']['shipping_options']['shipping_rate_data']['display_name'] = 'Shipping Fee';
$payment['shipping_address_collection']['shipping_options']['shipping_rate_data']['type'] = 'fixed_amount';
$payment['shipping_address_collection']['shipping_options']['shipping_rate_data']['fixed_amount']['amount'] = (int)$shippingfee * 100;
$payment['shipping_address_collection']['shipping_options']['shipping_rate_data']['fixed_amount']['currency'] = 'USD';

sage heart
#

There is not such parameter $payment['shipping_address_collection']['shipping_options']

clear lodge
#

i got it

#

thank you

sage heart
clear lodge
#

I got it.

#

Is there any way I can submit the sku withe item line?

#

so if customer change the quantity , i know which item was chaged ?

#

use line_items.price_data.product_data.metadata
?

sage heart
#

Yup, you can set SKU under line_items.price_data.product_data.metadata

clear lodge
#

{
"shipping_options": {
"shipping_rate_data": {
"display_name": "Shipping Fee",
"type": "fixed_amount",
"fixed_amount": {
"amount": "100",
"currency": "USD"
}
}
}

#

Invalid array

#

I did checked 2 times , did not find any error😢

#

😭

sage heart
#

shipping_options is an array of objects, but you're passing an object

clear lodge
#

😆

#

can charge customer serveral shipping fee?

#

several type of shipping fee?

sage heart
#

That's what an array of shipping_options is for. Customer can choose one of the shipping options from the list you set!

clear lodge
#

ok. i see

#

what is custom_text used for?>

tender dove
clear lodge
#

is there any way to make the payment link shorter?

#

we need to send the ulr to customer through the text message.