I am trying to create an app in shopify which is using a chekcout webhook , everything works fine for me expect I am not able to get the email id in reponse of the webhook .
$checkout_information = json_decode(file_get_contents('php://input'));
and the json respone is like
{
"buyer_accepts_marketing":false,
"cart_token":"0b1b8b379b7ce41617162522804d8198",
"closed_at":null,
"completed_at":null,
"created_at":"2015-01-19T23:43:33-05:00",
"currency":"PHP",
**"email":"",**
"gateway":null,
"id":426722529,
"landing_site":"/",
"note":null,
"referring_site":"",
"shipping_lines":[
],
"source_identifier":null,
"source_name":"checkout_next",
"source_url":null,
"subtotal_price":"40000.00",
"taxes_included":false,
"token":"7f337c74911a7cfc636a40472820b31a",
"total_discounts":"0.00",
"total_line_items_price":"40000.00",
"total_price":"40000.00",
"total_tax":"0.00",
"total_weight":0,
"updated_at":"2015-01-19T23:43:33-05:00",
"line_items":[
{
"applied_discounts":[
],
"compare_at_price":null,
"fulfillment_service":"manual",
"gift_card":false,
"grams":0,
"line_price":"40000.00",
"price":"40000.00",
"product_id":384871021,
"properties":null,
"quantity":1,
"requires_shipping":true,
"sku":"",
"tax_lines":[
],
"taxable":true,
"title":"bike",
"variant_id":1002599593,
"variant_title":"",
"vendor":"yamaha"
}
],
"name":"#426722529",
"note_attributes":[
],
"source":"checkout_next",
"discount_codes":[
],
"abandoned_checkout_url":"https://checkout.shopify.com/7171333/checkouts/7f337c74911a7cfc636a40472820b31a/recover",
"tax_lines":[
]
}
How to get a valid email id in this response
This seems to be a problem related either to the order itself or to the type of store you're using (test store). Try this in a real production store.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.