Salve , questo il json risultante dal webhook di paypal :

codice:
"id":"WH-3NN52472DG3208309-8GJ75542DS135384K",
"event_version":"1.0",
"create_time":"2022-03-17T20:38:52.564Z",
"resource_type":"checkout-order",
"resource_version":"2.0",
"event_type":"CHECKOUT.ORDER.APPROVED",
"summary":"An order has been approved by buyer",
"resource":
			{"update_time":"2022-03-17T20:38:44Z",
			 "create_time":"2022-03-17T20:38:01Z",
			 "purchase_units":
								[{"reference_id":"default",
								  "amount":{
											"currency_code":"EUR",
											"value":"100.00",
											"breakdown":{
														 "item_total":{
																		"currency_code":"EUR",
																		"value":"100.00"
																	  }
														}
										   },
								  "payee":{
										   "email_address":"topwebsite_ncc@info.it",
										   "merchant_id":"RCHWZPDVRSCT8"
										  },
								  "custom_id":"A|b|C",
								  "items":[{
												"name":"PROVA CREAZIONE ",
												"unit_amount":{
															   "currency_code":"EUR",
															   "value":"100.00"
															  },
												"quantity":"1",
												"description":"A|b|C"
											   }],
								 "shipping":{
											 "name":{
													 "full_name":"Stefano Banchelli"
													 },
											 "address":{
														"address_line_1":"Via Unit? d'Italia",
														"admin_area_2":"Napoli",
														"admin_area_1":"Napoli",
														"postal_code":"80127",
														"country_code":"IT"
													  }
											},
								"payments":{
											"captures":[{
														 "id":"2TV54078UJ365101X",
														 "status":"COMPLETED",
														 "amount":{
																	"currency_code":"EUR",
																	"value":"100.00"
																  },
														 "final_capture":true,
														 "seller_protection":{
																			  "status":"ELIGIBLE",
																			  "dispute_categories":["ITEM_NOT_RECEIVED","UNAUTHORIZED_TRANSACTION"]},
																			  "seller_receivable_breakdown":{"
																											  gross_amount":{
																																"currency_code":"EUR",
																																"value":"100.00"
																														    },
																										      "paypal_fee":{
																															 "currency_code":"EUR",
																															 "value":"3.75"
																														   },
																											  "net_amount":{
																															 "currency_code":"EUR",
																															 "value":"96.25"
																														   }
																											},
																			 "links":[{
																						"href":"https://api.sandbox.paypal.com/v2/payments/captures/2TV54078UJ365101X",
																						"rel":"self",
																						"method":"GET"
																					  },
																					  {
																					    "href":"https://api.sandbox.paypal.com/v2/payments/captures/2TV54078UJ365101X/refund",
																					    "rel":"refund","method":"POST"
																					  },
																					  {
																						"href":"https://api.sandbox.paypal.com/v2/checkout/orders/44Y91057W0834900V",
																						"rel":"up",
																						"method":"GET"
																					  }],
																			"create_time":"2022-03-17T20:38:44Z",
																			"update_time":"2022-03-17T20:38:44Z"
															}]
										}
										}],
								"links":[{
											"href":"https://api.sandbox.paypal.com/v2/checkout/orders/44Y91057W0834900V",
											"rel":"self",
											"method":"GET"
										 }],
								"id":"44Y91057W0834900V",
								"intent":"CAPTURE",
								"payer":{
										 "name":{
													"given_name":"pippo",
													"surname":"poppo"
												},
										 "email_address":"utente@pippo.it",
										 "payer_id":"E9ZP8U9DLDL8U",
										 "address":{"country_code":"IT"}},"status":"COMPLETED"},
										 "links":[{
													"href":"https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-3NN52472DG3208309-8GJ75542DS135384K",
													"rel":"self",
													"method":"GET"
												  },
												  {
													"href":"https://api.sandbox.paypal.com/v1/notifications/webhooks-events/WH-3NN52472DG3208309-8GJ75542DS135384K/resend",
													"rel":"resend",
													"method":"POST"
												  }
						]}
Come catturo il custom id ?

avendo :

codice:
$request=json_decode($request)
avevo scritto :

codice:
$request->resource->purchase_units['custom_id']
Inoltre qualcuno sa come si blocca l'invio continuo ?

per ipn con :

codice:
header("HTTP/1.1 200 OK");
In webhook come si fa ?