concretecms-community-store / community_store_stripe_checkout

Stripe Checkout payment add-on for Community Store for Concrete CMS
MIT License
1 stars 1 forks source link

You passed an empty string for 'line_items[0][images][0]'. We assume empty values are an attempt to unset a parameter; however 'line_items[0][images][0]' cannot be unset. You should remove 'line_items[0][images][0]' from your request or supply a non-empty value. etc #3

Open madesimplemedia opened 5 years ago

madesimplemedia commented 5 years ago

Hi

Getting this error with v1.2.1 of Community Store when trying to checkout after selecting shipping info.

The full message is:

{"error":{"type":"Stripe\\Error\\InvalidRequest","message":"You passed an empty string for 'line_items[0][images][0]'. We assume empty values are an attempt to unset a parameter; however 'line_items[0][images][0]' cannot be unset. You should remove 'line_items[0][images][0]' from your request or supply a non-empty value.","file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiRequestor.php","line":210,"trace":[{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiRequestor.php","line":210,"function":null,"class":"Stripe\\Error\\InvalidRequest","args":["You passed an empty string for 'line_items[0][images][0]'. We assume empty values are an attempt to unset a parameter; however 'line_items[0][images][0]' cannot be unset. You should remove 'line_items[0][images][0]' from your request or supply a non-empty value."]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiRequestor.php","line":173,"function":"_specificAPIError","class":"Stripe\\ApiRequestor","args":["{\n  \"error\": {\n    \"code\": \"parameter_invalid_empty\",\n    \"doc_url\": \"https:\/\/stripe.com\/docs\/error-codes\/parameter-invalid-empty\",\n    \"message\": \"You passed an empty string for 'line_items[0][images][0]'. We assume empty values are an attempt to unset a parameter; however 'line_items[0][images][0]' cannot be unset. You should remove 'line_items[0][images][0]' from your request or supply a non-empty value.\",\n    \"param\": \"line_items[0][images][0]\",\n    \"type\": \"invalid_request_error\"\n  }\n}\n",400,{},{"error":{"code":"parameter_invalid_empty","doc_url":"https:\/\/stripe.com\/docs\/error-codes\/parameter-invalid-empty","message":"You passed an empty string for 'line_items[0][images][0]'. We assume empty values are an attempt to unset a parameter; however 'line_items[0][images][0]' cannot be unset. You should remove 'line_items[0][images][0]' from your request or supply a non-empty value.","param":"line_items[0][images][0]","type":"invalid_request_error"}},{"code":"parameter_invalid_empty","doc_url":"https:\/\/stripe.com\/docs\/error-codes\/parameter-invalid-empty","message":"You passed an empty string for 'line_items[0][images][0]'. We assume empty values are an attempt to unset a parameter; however 'line_items[0][images][0]' cannot be unset. You should remove 'line_items[0][images][0]' from your request or supply a non-empty value.","param":"line_items[0][images][0]","type":"invalid_request_error"}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiRequestor.php","line":473,"function":"handleErrorResponse","class":"Stripe\\ApiRequestor","args":["{\n  \"error\": {\n    \"code\": \"parameter_invalid_empty\",\n    \"doc_url\": \"https:\/\/stripe.com\/docs\/error-codes\/parameter-invalid-empty\",\n    \"message\": \"You passed an empty string for 'line_items[0][images][0]'. We assume empty values are an attempt to unset a parameter; however 'line_items[0][images][0]' cannot be unset. You should remove 'line_items[0][images][0]' from your request or supply a non-empty value.\",\n    \"param\": \"line_items[0][images][0]\",\n    \"type\": \"invalid_request_error\"\n  }\n}\n",400,{},{"error":{"code":"parameter_invalid_empty","doc_url":"https:\/\/stripe.com\/docs\/error-codes\/parameter-invalid-empty","message":"You passed an empty string for 'line_items[0][images][0]'. We assume empty values are an attempt to unset a parameter; however 'line_items[0][images][0]' cannot be unset. You should remove 'line_items[0][images][0]' from your request or supply a non-empty value.","param":"line_items[0][images][0]","type":"invalid_request_error"}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiRequestor.php","line":126,"function":"_interpretResponse","class":"Stripe\\ApiRequestor","args":["{\n  \"error\": {\n    \"code\": \"parameter_invalid_empty\",\n    \"doc_url\": \"https:\/\/stripe.com\/docs\/error-codes\/parameter-invalid-empty\",\n    \"message\": \"You passed an empty string for 'line_items[0][images][0]'. We assume empty values are an attempt to unset a parameter; however 'line_items[0][images][0]' cannot be unset. You should remove 'line_items[0][images][0]' from your request or supply a non-empty value.\",\n    \"param\": \"line_items[0][images][0]\",\n    \"type\": \"invalid_request_error\"\n  }\n}\n",400,{}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiOperations\/Request.php","line":57,"function":"request","class":"Stripe\\ApiRequestor","args":["post","\/v1\/checkout\/sessions",{"client_reference_id":61,"payment_method_types":["card"],"customer_email":"info@madesimplemedia.co.uk","line_items":[{"name":"Artwork for Booklets & Brochures(ABB)","amount":16000,"images":[""],"quantity":1,"currency":"GBP","description":"Price: 8pp\nArtwork for: Booklets & Brochures (A6), Finished Size: A6 (105 x 148mm), Material: 130gsm Gloss, Printed Sides: Double Sided, Pages: 8pp, Quantity: 50, \nPrice: Booklets & Brochures (A6), Finished Size: A6 (105 x 148mm), Material: 130gsm Gloss, Printed Sides: Double Sided, Pages: 8pp, Quantity: 50, "},{"name":"Booklets & Brochures (A6)","amount":3427,"images":["https:\/\/dev.completeprintonline.co.uk\/application\/files\/6715\/0547\/7171\/EP06914_325x170_Booklets__Brochures_A6.png"],"quantity":1,"currency":"GBP","description":"Finished Size: A6 (105 x 148mm)\nMaterial: 130gsm Gloss \nPrinted Sides: Double Sided\nPages: 8pp\nQuantity: 50"},{"name":"FREE UK Mainland","amount":0,"currency":"GBP","quantity":1}],"success_url":{},"cancel_url":{}},[]]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiOperations\/Create.php","line":23,"function":"_staticRequest","class":"Stripe\\ApiResource","args":["post","\/v1\/checkout\/sessions",{"client_reference_id":61,"payment_method_types":["card"],"customer_email":"info@madesimplemedia.co.uk","line_items":[{"name":"Artwork for Booklets & Brochures(ABB)","amount":16000,"images":[""],"quantity":1,"currency":"GBP","description":"Price: 8pp\nArtwork for: Booklets & Brochures (A6), Finished Size: A6 (105 x 148mm), Material: 130gsm Gloss, Printed Sides: Double Sided, Pages: 8pp, Quantity: 50, \nPrice: Booklets & Brochures (A6), Finished Size: A6 (105 x 148mm), Material: 130gsm Gloss, Printed Sides: Double Sided, Pages: 8pp, Quantity: 50, "},{"name":"Booklets & Brochures (A6)","amount":3427,"images":["https:\/\/dev.completeprintonline.co.uk\/application\/files\/6715\/0547\/7171\/EP06914_325x170_Booklets__Brochures_A6.png"],"quantity":1,"currency":"GBP","description":"Finished Size: A6 (105 x 148mm)\nMaterial: 130gsm Gloss \nPrinted Sides: Double Sided\nPages: 8pp\nQuantity: 50"},{"name":"FREE UK Mainland","amount":0,"currency":"GBP","quantity":1}],"success_url":{},"cancel_url":{}},null]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/src\/CommunityStore\/Payment\/Methods\/CommunityStoreStripeCheckout\/CommunityStoreStripeCheckoutPaymentMethod.php","line":206,"function":"create","class":"Stripe\\Checkout\\Session","args":[{"client_reference_id":61,"payment_method_types":["card"],"customer_email":"info@madesimplemedia.co.uk","line_items":[{"name":"Artwork for Booklets & Brochures(ABB)","amount":16000,"images":[""],"quantity":1,"currency":"GBP","description":"Price: 8pp\nArtwork for: Booklets & Brochures (A6), Finished Size: A6 (105 x 148mm), Material: 130gsm Gloss, Printed Sides: Double Sided, Pages: 8pp, Quantity: 50, \nPrice: Booklets & Brochures (A6), Finished Size: A6 (105 x 148mm), Material: 130gsm Gloss, Printed Sides: Double Sided, Pages: 8pp, Quantity: 50, "},{"name":"Booklets & Brochures (A6)","amount":3427,"images":["https:\/\/dev.completeprintonline.co.uk\/application\/files\/6715\/0547\/7171\/EP06914_325x170_Booklets__Brochures_A6.png"],"quantity":1,"currency":"GBP","description":"Finished Size: A6 (105 x 148mm)\nMaterial: 130gsm Gloss \nPrinted Sides: Double Sided\nPages: 8pp\nQuantity: 50"},{"name":"FREE UK Mainland","amount":0,"currency":"GBP","quantity":1}],"success_url":{},"cancel_url":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Controller\/AbstractController.php","line":172,"function":"createSession","class":"Concrete\\Package\\CommunityStoreStripeCheckout\\Src\\CommunityStore\\Payment\\Methods\\CommunityStoreStripeCheckout\\CommunityStoreStripeCheckoutPaymentMethod","args":[]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Controller\/AbstractController.php","line":172,"function":"call_user_func_array","class":null,"args":[[{},"createSession"],[]]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Routing\/ControllerRouteCallback.php","line":27,"function":"runAction","class":"Concrete\\Core\\Controller\\AbstractController","args":["createSession",[]]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Routing\/Router.php","line":149,"function":"execute","class":"Concrete\\Core\\Routing\\ControllerRouteCallback","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{},{"_controller":"\\Concrete\\Package\\CommunityStoreStripeCheckout\\Src\\CommunityStore\\Payment\\Methods\\CommunityStoreStripeCheckout\\CommunityStoreStripeCheckoutPaymentMethod::createSession","callback":{},"path":"\/checkout\/stripecheckoutcreatesession\/","_route":"checkout_stripecheckoutcreatesession"}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/DefaultDispatcher.php","line":114,"function":"execute","class":"Concrete\\Core\\Routing\\Router","args":[{},{"_controller":"\\Concrete\\Package\\CommunityStoreStripeCheckout\\Src\\CommunityStore\\Payment\\Methods\\CommunityStoreStripeCheckout\\CommunityStoreStripeCheckoutPaymentMethod::createSession","callback":{},"path":"\/checkout\/stripecheckoutcreatesession\/","_route":"checkout_stripecheckoutcreatesession"}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/DefaultDispatcher.php","line":54,"function":"handleDispatch","class":"Concrete\\Core\\Http\\DefaultDispatcher","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/DispatcherDelegate.php","line":39,"function":"dispatch","class":"Concrete\\Core\\Http\\DefaultDispatcher","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/ThumbnailMiddleware.php","line":60,"function":"next","class":"Concrete\\Core\\Http\\Middleware\\DispatcherDelegate","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/MiddlewareDelegate.php","line":38,"function":"process","class":"Concrete\\Core\\Http\\Middleware\\ThumbnailMiddleware","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/FrameOptionsMiddleware.php","line":39,"function":"next","class":"Concrete\\Core\\Http\\Middleware\\MiddlewareDelegate","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/MiddlewareDelegate.php","line":38,"function":"process","class":"Concrete\\Core\\Http\\Middleware\\FrameOptionsMiddleware","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/CookieMiddleware.php","line":37,"function":"next","class":"Concrete\\Core\\Http\\Middleware\\MiddlewareDelegate","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/MiddlewareDelegate.php","line":38,"function":"process","class":"Concrete\\Core\\Http\\Middleware\\CookieMiddleware","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/ApplicationMiddleware.php","line":29,"function":"next","class":"Concrete\\Core\\Http\\Middleware\\MiddlewareDelegate","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/MiddlewareDelegate.php","line":38,"function":"process","class":"Concrete\\Core\\Http\\Middleware\\ApplicationMiddleware","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/MiddlewareStack.php","line":86,"function":"next","class":"Concrete\\Core\\Http\\Middleware\\MiddlewareDelegate","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/DefaultServer.php","line":85,"function":"process","class":"Concrete\\Core\\Http\\Middleware\\MiddlewareStack","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Foundation\/Runtime\/Run\/DefaultRunner.php","line":115,"function":"handleRequest","class":"Concrete\\Core\\Http\\DefaultServer","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Foundation\/Runtime\/DefaultRuntime.php","line":102,"function":"run","class":"Concrete\\Core\\Foundation\\Runtime\\Run\\DefaultRunner","args":[]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/dispatcher.php","line":39,"function":"run","class":"Concrete\\Core\\Foundation\\Runtime\\DefaultRuntime","args":[]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/index.php","line":3,"function":"require","class":null,"args":["\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/dispatcher.php"]}]},"errors":["You passed an empty string for 'line_items[0][images][0]'. We assume empty values are an attempt to unset a parameter; however 'line_items[0][images][0]' cannot be unset. You should remove 'line_items[0][images][0]' from your request or supply a non-empty value."]}
Mesuva commented 5 years ago

Try this fix: https://github.com/concrete5-community-store/community_store_stripe_checkout/commit/8ad73c18d4005cb17bbb0214ef206c23cc1ca6d2

madesimplemedia commented 5 years ago

Done, now got the error:

{"error":{"type":"Stripe\\Error\\InvalidRequest","message":"Invalid positive integer","file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiRequestor.php","line":210,"trace":[{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiRequestor.php","line":210,"function":null,"class":"Stripe\\Error\\InvalidRequest","args":["Invalid positive integer"]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiRequestor.php","line":173,"function":"_specificAPIError","class":"Stripe\\ApiRequestor","args":["{\n \"error\": {\n \"code\": \"parameter_invalid_integer\",\n \"doc_url\": \"https:\/\/stripe.com\/docs\/error-codes\/parameter-invalid-integer\",\n \"message\": \"Invalid positive integer\",\n \"param\": \"line_items[2][amount]\",\n \"type\": \"invalid_request_error\"\n }\n}\n",400,{},{"error":{"code":"parameter_invalid_integer","doc_url":"https:\/\/stripe.com\/docs\/error-codes\/parameter-invalid-integer","message":"Invalid positive integer","param":"line_items[2][amount]","type":"invalid_request_error"}},{"code":"parameter_invalid_integer","doc_url":"https:\/\/stripe.com\/docs\/error-codes\/parameter-invalid-integer","message":"Invalid positive integer","param":"line_items[2][amount]","type":"invalid_request_error"}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiRequestor.php","line":473,"function":"handleErrorResponse","class":"Stripe\\ApiRequestor","args":["{\n \"error\": {\n \"code\": \"parameter_invalid_integer\",\n \"doc_url\": \"https:\/\/stripe.com\/docs\/error-codes\/parameter-invalid-integer\",\n \"message\": \"Invalid positive integer\",\n \"param\": \"line_items[2][amount]\",\n \"type\": \"invalid_request_error\"\n }\n}\n",400,{},{"error":{"code":"parameter_invalid_integer","doc_url":"https:\/\/stripe.com\/docs\/error-codes\/parameter-invalid-integer","message":"Invalid positive integer","param":"line_items[2][amount]","type":"invalid_request_error"}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiRequestor.php","line":126,"function":"_interpretResponse","class":"Stripe\\ApiRequestor","args":["{\n \"error\": {\n \"code\": \"parameter_invalid_integer\",\n \"doc_url\": \"https:\/\/stripe.com\/docs\/error-codes\/parameter-invalid-integer\",\n \"message\": \"Invalid positive integer\",\n \"param\": \"line_items[2][amount]\",\n \"type\": \"invalid_request_error\"\n }\n}\n",400,{}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiOperations\/Request.php","line":57,"function":"request","class":"Stripe\\ApiRequestor","args":["post","\/v1\/checkout\/sessions",{"client_reference_id":63,"payment_method_types":["card"],"customer_email":"info@madesimplemedia.co.uk","line_items":[{"name":"Artwork for Booklets & Brochures(ABB)","amount":16000,"quantity":1,"currency":"GBP","description":"Price: 8pp\nArtwork for: Booklets & Brochures (A6), Finished Size: A6 (105 x 148mm), Material: 130gsm Gloss, Printed Sides: Double Sided, Pages: 8pp, Quantity: 50, \nPrice: Booklets & Brochures (A6), Finished Size: A6 (105 x 148mm), Material: 130gsm Gloss, Printed Sides: Double Sided, Pages: 8pp, Quantity: 50, "},{"name":"Booklets & Brochures (A6)","amount":3427,"quantity":1,"currency":"GBP","images":["https:\/\/dev.completeprintonline.co.uk\/application\/files\/6715\/0547\/7171\/EP06914_325x170_Booklets__Brochures_A6.png"],"description":"Finished Size: A6 (105 x 148mm)\nMaterial: 130gsm Gloss \nPrinted Sides: Double Sided\nPages: 8pp\nQuantity: 50"},{"name":"FREE UK Mainland","amount":0,"currency":"GBP","quantity":1}],"success_url":{},"cancel_url":{}},[]]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiOperations\/Create.php","line":23,"function":"_staticRequest","class":"Stripe\\ApiResource","args":["post","\/v1\/checkout\/sessions",{"client_reference_id":63,"payment_method_types":["card"],"customer_email":"info@madesimplemedia.co.uk","line_items":[{"name":"Artwork for Booklets & Brochures(ABB)","amount":16000,"quantity":1,"currency":"GBP","description":"Price: 8pp\nArtwork for: Booklets & Brochures (A6), Finished Size: A6 (105 x 148mm), Material: 130gsm Gloss, Printed Sides: Double Sided, Pages: 8pp, Quantity: 50, \nPrice: Booklets & Brochures (A6), Finished Size: A6 (105 x 148mm), Material: 130gsm Gloss, Printed Sides: Double Sided, Pages: 8pp, Quantity: 50, "},{"name":"Booklets & Brochures (A6)","amount":3427,"quantity":1,"currency":"GBP","images":["https:\/\/dev.completeprintonline.co.uk\/application\/files\/6715\/0547\/7171\/EP06914_325x170_Booklets__Brochures_A6.png"],"description":"Finished Size: A6 (105 x 148mm)\nMaterial: 130gsm Gloss \nPrinted Sides: Double Sided\nPages: 8pp\nQuantity: 50"},{"name":"FREE UK Mainland","amount":0,"currency":"GBP","quantity":1}],"success_url":{},"cancel_url":{}},null]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/src\/CommunityStore\/Payment\/Methods\/CommunityStoreStripeCheckout\/CommunityStoreStripeCheckoutPaymentMethod.php","line":208,"function":"create","class":"Stripe\\Checkout\\Session","args":[{"client_reference_id":63,"payment_method_types":["card"],"customer_email":"info@madesimplemedia.co.uk","line_items":[{"name":"Artwork for Booklets & Brochures(ABB)","amount":16000,"quantity":1,"currency":"GBP","description":"Price: 8pp\nArtwork for: Booklets & Brochures (A6), Finished Size: A6 (105 x 148mm), Material: 130gsm Gloss, Printed Sides: Double Sided, Pages: 8pp, Quantity: 50, \nPrice: Booklets & Brochures (A6), Finished Size: A6 (105 x 148mm), Material: 130gsm Gloss, Printed Sides: Double Sided, Pages: 8pp, Quantity: 50, "},{"name":"Booklets & Brochures (A6)","amount":3427,"quantity":1,"currency":"GBP","images":["https:\/\/dev.completeprintonline.co.uk\/application\/files\/6715\/0547\/7171\/EP06914_325x170_Booklets__Brochures_A6.png"],"description":"Finished Size: A6 (105 x 148mm)\nMaterial: 130gsm Gloss \nPrinted Sides: Double Sided\nPages: 8pp\nQuantity: 50"},{"name":"FREE UK Mainland","amount":0,"currency":"GBP","quantity":1}],"success_url":{},"cancel_url":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Controller\/AbstractController.php","line":172,"function":"createSession","class":"Concrete\\Package\\CommunityStoreStripeCheckout\\Src\\CommunityStore\\Payment\\Methods\\CommunityStoreStripeCheckout\\CommunityStoreStripeCheckoutPaymentMethod","args":[]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Controller\/AbstractController.php","line":172,"function":"call_user_func_array","class":null,"args":[[{},"createSession"],[]]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Routing\/ControllerRouteCallback.php","line":27,"function":"runAction","class":"Concrete\\Core\\Controller\\AbstractController","args":["createSession",[]]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Routing\/Router.php","line":149,"function":"execute","class":"Concrete\\Core\\Routing\\ControllerRouteCallback","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{},{"_controller":"\\Concrete\\Package\\CommunityStoreStripeCheckout\\Src\\CommunityStore\\Payment\\Methods\\CommunityStoreStripeCheckout\\CommunityStoreStripeCheckoutPaymentMethod::createSession","callback":{},"path":"\/checkout\/stripecheckoutcreatesession\/","_route":"checkout_stripecheckoutcreatesession"}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/DefaultDispatcher.php","line":114,"function":"execute","class":"Concrete\\Core\\Routing\\Router","args":[{},{"_controller":"\\Concrete\\Package\\CommunityStoreStripeCheckout\\Src\\CommunityStore\\Payment\\Methods\\CommunityStoreStripeCheckout\\CommunityStoreStripeCheckoutPaymentMethod::createSession","callback":{},"path":"\/checkout\/stripecheckoutcreatesession\/","_route":"checkout_stripecheckoutcreatesession"}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/DefaultDispatcher.php","line":54,"function":"handleDispatch","class":"Concrete\\Core\\Http\\DefaultDispatcher","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/DispatcherDelegate.php","line":39,"function":"dispatch","class":"Concrete\\Core\\Http\\DefaultDispatcher","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/ThumbnailMiddleware.php","line":60,"function":"next","class":"Concrete\\Core\\Http\\Middleware\\DispatcherDelegate","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/MiddlewareDelegate.php","line":38,"function":"process","class":"Concrete\\Core\\Http\\Middleware\\ThumbnailMiddleware","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/FrameOptionsMiddleware.php","line":39,"function":"next","class":"Concrete\\Core\\Http\\Middleware\\MiddlewareDelegate","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/MiddlewareDelegate.php","line":38,"function":"process","class":"Concrete\\Core\\Http\\Middleware\\FrameOptionsMiddleware","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/CookieMiddleware.php","line":37,"function":"next","class":"Concrete\\Core\\Http\\Middleware\\MiddlewareDelegate","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/MiddlewareDelegate.php","line":38,"function":"process","class":"Concrete\\Core\\Http\\Middleware\\CookieMiddleware","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/ApplicationMiddleware.php","line":29,"function":"next","class":"Concrete\\Core\\Http\\Middleware\\MiddlewareDelegate","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/MiddlewareDelegate.php","line":38,"function":"process","class":"Concrete\\Core\\Http\\Middleware\\ApplicationMiddleware","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/MiddlewareStack.php","line":86,"function":"next","class":"Concrete\\Core\\Http\\Middleware\\MiddlewareDelegate","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/DefaultServer.php","line":85,"function":"process","class":"Concrete\\Core\\Http\\Middleware\\MiddlewareStack","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Foundation\/Runtime\/Run\/DefaultRunner.php","line":115,"function":"handleRequest","class":"Concrete\\Core\\Http\\DefaultServer","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Foundation\/Runtime\/DefaultRuntime.php","line":102,"function":"run","class":"Concrete\\Core\\Foundation\\Runtime\\Run\\DefaultRunner","args":[]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/dispatcher.php","line":39,"function":"run","class":"Concrete\\Core\\Foundation\\Runtime\\DefaultRuntime","args":[]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/index.php","line":3,"function":"require","class":null,"args":["\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/dispatcher.php"]}]},"errors":["Invalid positive integer"]}

When I go to the ApiRequestor file at line 210, it seems a 404 error was thrown

Mesuva commented 5 years ago

I think the reason for this error is that some of the products have a zero cost individually, which I don't think is allowed with the gateway.

It might need to be a case of not including them as line items in the transaction (but they'll still show in the order itself).

Try this tweak: https://github.com/concrete5-community-store/community_store_stripe_checkout/commit/259fb78380ad0df36d87b9019b7e0c920f21e6f3

madesimplemedia commented 5 years ago

Thanks, tried the tweak but I think the same error

{"error":{"type":"Stripe\\Error\\InvalidRequest","message":"Invalid positive integer","file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiRequestor.php","line":210,"trace":[{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiRequestor.php","line":210,"function":null,"class":"Stripe\\Error\\InvalidRequest","args":["Invalid positive integer"]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiRequestor.php","line":173,"function":"_specificAPIError","class":"Stripe\\ApiRequestor","args":["{\n \"error\": {\n \"code\": \"parameter_invalid_integer\",\n \"doc_url\": \"https:\/\/stripe.com\/docs\/error-codes\/parameter-invalid-integer\",\n \"message\": \"Invalid positive integer\",\n \"param\": \"line_items[2][amount]\",\n \"type\": \"invalid_request_error\"\n }\n}\n",400,{},{"error":{"code":"parameter_invalid_integer","doc_url":"https:\/\/stripe.com\/docs\/error-codes\/parameter-invalid-integer","message":"Invalid positive integer","param":"line_items[2][amount]","type":"invalid_request_error"}},{"code":"parameter_invalid_integer","doc_url":"https:\/\/stripe.com\/docs\/error-codes\/parameter-invalid-integer","message":"Invalid positive integer","param":"line_items[2][amount]","type":"invalid_request_error"}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiRequestor.php","line":473,"function":"handleErrorResponse","class":"Stripe\\ApiRequestor","args":["{\n \"error\": {\n \"code\": \"parameter_invalid_integer\",\n \"doc_url\": \"https:\/\/stripe.com\/docs\/error-codes\/parameter-invalid-integer\",\n \"message\": \"Invalid positive integer\",\n \"param\": \"line_items[2][amount]\",\n \"type\": \"invalid_request_error\"\n }\n}\n",400,{},{"error":{"code":"parameter_invalid_integer","doc_url":"https:\/\/stripe.com\/docs\/error-codes\/parameter-invalid-integer","message":"Invalid positive integer","param":"line_items[2][amount]","type":"invalid_request_error"}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiRequestor.php","line":126,"function":"_interpretResponse","class":"Stripe\\ApiRequestor","args":["{\n \"error\": {\n \"code\": \"parameter_invalid_integer\",\n \"doc_url\": \"https:\/\/stripe.com\/docs\/error-codes\/parameter-invalid-integer\",\n \"message\": \"Invalid positive integer\",\n \"param\": \"line_items[2][amount]\",\n \"type\": \"invalid_request_error\"\n }\n}\n",400,{}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiOperations\/Request.php","line":57,"function":"request","class":"Stripe\\ApiRequestor","args":["post","\/v1\/checkout\/sessions",{"client_reference_id":65,"payment_method_types":["card"],"customer_email":"info@madesimplemedia.co.uk","line_items":[{"name":"Artwork for Booklets & Brochures(ABB)","amount":16000,"quantity":1,"currency":"GBP","description":"Price: 8pp\nArtwork for: Booklets & Brochures (A6), Finished Size: A6 (105 x 148mm), Material: 130gsm Gloss, Printed Sides: Double Sided, Pages: 8pp, Quantity: 50, \nPrice: Booklets & Brochures (A6), Finished Size: A6 (105 x 148mm), Material: 130gsm Gloss, Printed Sides: Double Sided, Pages: 8pp, Quantity: 50, "},{"name":"Booklets & Brochures (A6)","amount":3427,"quantity":1,"currency":"GBP","images":["https:\/\/dev.completeprintonline.co.uk\/application\/files\/6715\/0547\/7171\/EP06914_325x170_Booklets__Brochures_A6.png"],"description":"Finished Size: A6 (105 x 148mm)\nMaterial: 130gsm Gloss \nPrinted Sides: Double Sided\nPages: 8pp\nQuantity: 50"},{"name":"FREE UK Mainland","amount":0,"currency":"GBP","quantity":1}],"success_url":{},"cancel_url":{}},[]]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/vendor\/stripe\/stripe-php\/lib\/ApiOperations\/Create.php","line":23,"function":"_staticRequest","class":"Stripe\\ApiResource","args":["post","\/v1\/checkout\/sessions",{"client_reference_id":65,"payment_method_types":["card"],"customer_email":"info@madesimplemedia.co.uk","line_items":[{"name":"Artwork for Booklets & Brochures(ABB)","amount":16000,"quantity":1,"currency":"GBP","description":"Price: 8pp\nArtwork for: Booklets & Brochures (A6), Finished Size: A6 (105 x 148mm), Material: 130gsm Gloss, Printed Sides: Double Sided, Pages: 8pp, Quantity: 50, \nPrice: Booklets & Brochures (A6), Finished Size: A6 (105 x 148mm), Material: 130gsm Gloss, Printed Sides: Double Sided, Pages: 8pp, Quantity: 50, "},{"name":"Booklets & Brochures (A6)","amount":3427,"quantity":1,"currency":"GBP","images":["https:\/\/dev.completeprintonline.co.uk\/application\/files\/6715\/0547\/7171\/EP06914_325x170_Booklets__Brochures_A6.png"],"description":"Finished Size: A6 (105 x 148mm)\nMaterial: 130gsm Gloss \nPrinted Sides: Double Sided\nPages: 8pp\nQuantity: 50"},{"name":"FREE UK Mainland","amount":0,"currency":"GBP","quantity":1}],"success_url":{},"cancel_url":{}},null]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/packages\/community_store_stripe_checkout\/src\/CommunityStore\/Payment\/Methods\/CommunityStoreStripeCheckout\/CommunityStoreStripeCheckoutPaymentMethod.php","line":208,"function":"create","class":"Stripe\\Checkout\\Session","args":[{"client_reference_id":65,"payment_method_types":["card"],"customer_email":"info@madesimplemedia.co.uk","line_items":[{"name":"Artwork for Booklets & Brochures(ABB)","amount":16000,"quantity":1,"currency":"GBP","description":"Price: 8pp\nArtwork for: Booklets & Brochures (A6), Finished Size: A6 (105 x 148mm), Material: 130gsm Gloss, Printed Sides: Double Sided, Pages: 8pp, Quantity: 50, \nPrice: Booklets & Brochures (A6), Finished Size: A6 (105 x 148mm), Material: 130gsm Gloss, Printed Sides: Double Sided, Pages: 8pp, Quantity: 50, "},{"name":"Booklets & Brochures (A6)","amount":3427,"quantity":1,"currency":"GBP","images":["https:\/\/dev.completeprintonline.co.uk\/application\/files\/6715\/0547\/7171\/EP06914_325x170_Booklets__Brochures_A6.png"],"description":"Finished Size: A6 (105 x 148mm)\nMaterial: 130gsm Gloss \nPrinted Sides: Double Sided\nPages: 8pp\nQuantity: 50"},{"name":"FREE UK Mainland","amount":0,"currency":"GBP","quantity":1}],"success_url":{},"cancel_url":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Controller\/AbstractController.php","line":172,"function":"createSession","class":"Concrete\\Package\\CommunityStoreStripeCheckout\\Src\\CommunityStore\\Payment\\Methods\\CommunityStoreStripeCheckout\\CommunityStoreStripeCheckoutPaymentMethod","args":[]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Controller\/AbstractController.php","line":172,"function":"call_user_func_array","class":null,"args":[[{},"createSession"],[]]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Routing\/ControllerRouteCallback.php","line":27,"function":"runAction","class":"Concrete\\Core\\Controller\\AbstractController","args":["createSession",[]]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Routing\/Router.php","line":149,"function":"execute","class":"Concrete\\Core\\Routing\\ControllerRouteCallback","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{},{"_controller":"\\Concrete\\Package\\CommunityStoreStripeCheckout\\Src\\CommunityStore\\Payment\\Methods\\CommunityStoreStripeCheckout\\CommunityStoreStripeCheckoutPaymentMethod::createSession","callback":{},"path":"\/checkout\/stripecheckoutcreatesession\/","_route":"checkout_stripecheckoutcreatesession"}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/DefaultDispatcher.php","line":114,"function":"execute","class":"Concrete\\Core\\Routing\\Router","args":[{},{"_controller":"\\Concrete\\Package\\CommunityStoreStripeCheckout\\Src\\CommunityStore\\Payment\\Methods\\CommunityStoreStripeCheckout\\CommunityStoreStripeCheckoutPaymentMethod::createSession","callback":{},"path":"\/checkout\/stripecheckoutcreatesession\/","_route":"checkout_stripecheckoutcreatesession"}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/DefaultDispatcher.php","line":54,"function":"handleDispatch","class":"Concrete\\Core\\Http\\DefaultDispatcher","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/DispatcherDelegate.php","line":39,"function":"dispatch","class":"Concrete\\Core\\Http\\DefaultDispatcher","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/ThumbnailMiddleware.php","line":60,"function":"next","class":"Concrete\\Core\\Http\\Middleware\\DispatcherDelegate","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/MiddlewareDelegate.php","line":38,"function":"process","class":"Concrete\\Core\\Http\\Middleware\\ThumbnailMiddleware","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/FrameOptionsMiddleware.php","line":39,"function":"next","class":"Concrete\\Core\\Http\\Middleware\\MiddlewareDelegate","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/MiddlewareDelegate.php","line":38,"function":"process","class":"Concrete\\Core\\Http\\Middleware\\FrameOptionsMiddleware","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/CookieMiddleware.php","line":37,"function":"next","class":"Concrete\\Core\\Http\\Middleware\\MiddlewareDelegate","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/MiddlewareDelegate.php","line":38,"function":"process","class":"Concrete\\Core\\Http\\Middleware\\CookieMiddleware","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/ApplicationMiddleware.php","line":29,"function":"next","class":"Concrete\\Core\\Http\\Middleware\\MiddlewareDelegate","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/MiddlewareDelegate.php","line":38,"function":"process","class":"Concrete\\Core\\Http\\Middleware\\ApplicationMiddleware","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}},{}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/Middleware\/MiddlewareStack.php","line":86,"function":"next","class":"Concrete\\Core\\Http\\Middleware\\MiddlewareDelegate","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Http\/DefaultServer.php","line":85,"function":"process","class":"Concrete\\Core\\Http\\Middleware\\MiddlewareStack","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Foundation\/Runtime\/Run\/DefaultRunner.php","line":115,"function":"handleRequest","class":"Concrete\\Core\\Http\\DefaultServer","args":[{"attributes":{},"request":{},"query":{},"server":{},"files":{},"cookies":{},"headers":{}}]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/src\/Foundation\/Runtime\/DefaultRuntime.php","line":102,"function":"run","class":"Concrete\\Core\\Foundation\\Runtime\\Run\\DefaultRunner","args":[]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/dispatcher.php","line":39,"function":"run","class":"Concrete\\Core\\Foundation\\Runtime\\DefaultRuntime","args":[]},{"file":"\/home\/completeprinton\/dev.completeprintonline.co.uk\/index.php","line":3,"function":"require","class":null,"args":["\/home\/completeprinton\/dev.completeprintonline.co.uk\/concrete\/dispatcher.php"]}]},"errors":["Invalid positive integer"]}

Mesuva commented 5 years ago

Ahh, there's free shipping to consider as well!

https://github.com/concrete5-community-store/community_store_stripe_checkout/commit/da3cda7164b53ee8d66be2b64006f92a9d1b65bc

madesimplemedia commented 5 years ago

That's it, working now thanks so much!

Mesuva commented 5 years ago

Brilliant, great things to resolve - I would never have thought about excluding free shipping or products when building it, it's not even covered in the doco that the prices have to be non-zero

madesimplemedia commented 5 years ago

Impossible to think of everything, happy to help test! I think there is a min price of 20p or something.

Mesuva commented 5 years ago

I think I've set it set to 0.5, which is 50 cents, pence, whatever unit. That'll prevent the gateway from being offered for zero or very low cart totals. For others, it'll now just include the items you are actually paying for, which in many ways makes sense - Stripe is about transactions, not tracking full orders and their details, so why should they know about all the non-chargeable line items

cahueya commented 5 years ago

I've put the file of the latest merge in place (which is not in the release) but I still get this error from the ApiRequestor Class...any ideas? Item in Cart is 10EUR without shipping.

Mesuva commented 5 years ago

Which error is still occurring for you, the one in the original subject line of this issue, or the second one about 'Invalid positive integer'?

cahueya commented 5 years ago

line_items[0][description] is empty

cahueya commented 5 years ago

You passed an empty string for ‘line_items[0][description]’. We assume empty values are an attempt to unset a parameter; however ‘line_items[0][description]’ cannot be unset. You should remove ‘line_items[0][description]’ from your request or supply a non-empty value. (0)

Mesuva commented 5 years ago

I think that's a new one, but similar in nature. I'll take a quick look

Mesuva commented 5 years ago

I've pushed up a potential fix for this, should be easy to implement. Let me know how you go, and if all is ok I'll push up another release that has everything up to date

Mesuva commented 5 years ago

https://github.com/concrete5-community-store/community_store_stripe_checkout/commit/9e55110ed4773724232cf5b7dfb6f1cac4220072

cahueya commented 5 years ago

That did the trick, it works now! Thank you!