Jump to content

Recommended Posts

Bác ơi. Em làm theo bác mà nó cứ báo lỗi giỏ hàng là sao ạ. Các bác giúp e với. 

E dùng thử cái php của admin rồi mà nó vẫn báo lỗi ạ!

:a32::a32::a32::a32::a32:

----------------------------------------------------------- Ghép bài-----------------------------------------------------------------------

Đây là cái e nhận được sau khi gọi checkout/get, ko biết có sai gì không ạ?

{"cart_type":0,"shipping_orders":[{"logistics":{"non_integrated_channelids":[],"logistic_service_types":{"standard":{"name":"V\u1eadn Chuy\u1ec3n Nhanh","max_cost":4713000000,"channel_ids":[50010,50011,50012,50015],"min_cost":2635000000,"priority":2,"consolidated_logistic_info":{"shopee_max_cost":750000000,"shop_promo_only_min_cost":2635000000,"shop_promo_only_max_cost":4713000000,"enabled":true,"shopee_min_cost":0},"identifier":"standard","enabled":true,"sla_msg":""}},"logistic_channels":{"50010":{"channel_data":{"category":15,"cashless":0,"display_name":"Viettel Post","name":"Viettel Post","is_mask_channel":0,"channelid":50010,"enabled":true,"extra_flag":0,"min_amount_need_ic":0,"priority":3,"warning_msg":"","flag":695834330257,"warning":"","maintenance":0,"need_check_ic":false,"is_show_preferred_delivery_option":1,"address_type":0,"cod_supported":true,"shipping_method":15},"cost_info":{"discount_promotion_rule_snapshot_id":47938,"estimated_shipping_fee":4713000000,"enjoy_discount":true,"discounted_shipping_fee":750000000,"discount_promotion_rule_id":42657,"rebate_promotion_rule_id":42657,"discounts":{"shopee":3963000000,"seller":0},"cost":750000000,"original_cost":4713000000,"discount_amount":3963000000},"preferred_delivery_instructions":{"options":[]},"shippability_info":{"next_available_date":"","able_to_ship":true},"shipping_fee_data":{"cod_fee":0,"shipping_fee_before_discount":4713000000,"shipping_fee_detail":{"BASIC_SHIPPING_FEE":4713000000,"SELLER_ESTIMATED_INSURANCE_FEE":0,"SHOPEE_OR_SELLER_SHIPPING_DISCOUNT":-3963000000,"SHIPPING_DISCOUNT_BY_SELLER":0,"SELLER_ESTIMATED_BASIC_SHIPPING_FEE":0,"SHIPPING_DISCOUNT_BY_SHOPEE":3963000000,"INSURANCE_FEE":0,"ITEM_TOTAL":0,"shop_promo_only":true,"COD_FEE":0,"SELLER_ONLY_SHIPPING_DISCOUNT":0},"chargeable_shipping_fee":4713000000},"days_to_deliver":5,"preferred_delivery_time_info":{"alert_msg":"","options":[{"option_id":0,"name":"T\u1ea5t c\u1ea3 c\u00e1c ng\u00e0y trong tu\u1ea7n","short_name":"T\u1ea5t c\u1ea3 c\u00e1c ng\u00e0y trong tu\u1ea7n","description":"Ph\u00f9 h\u1ee3p v\u1edbi \u0111\u1ecba ch\u1ec9 nh\u00e0 ri\u00eang, lu\u00f4n c\u00f3 ng\u01b0\u1eddi nh\u1eadn h\u00e0ng"},{"option_id":1,"name":"Ch\u1ec9 giao h\u00e0ng gi\u1edd h\u00e0nh ch\u00ednh","short_name":"Gi\u1edd h\u00e0nh ch\u00ednh","description":"Ph\u00f9 h\u1ee3p v\u1edbi \u0111\u1ecba ch\u1ec9 v\u0103n ph\u00f2ng/c\u01a1 quan"}]},"cover_shipping_fee":false,"delivery_data":{"delay_message":"","estimated_delivery_date_from":1613805735,"is_shopee_24h":false,"min_days":3,"detail_info":{"edt_max_dt":"2021-02-24","he_pt":0,"cdt_max":3.78,"he_cdt":1,"apt":0.0,"cdt_min":0.9,"edt_min_dt":"2021-02-20"},"estimated_delivery_date_to":1614151335,"is_rapid_sla":false,"max_days":7,"estimated_delivery_time_min":3,"display_mode":"edt_by_date","is_cross_border":false,"estimated_delivery_time_max":7,"has_edt":true},"cod_data":{"cod_available":true},"guarantee_extension_period":null},"50011":{"channel_data":{"category":14,"cashless":0,"display_name":"Giao H\u00e0ng Nhanh","name":"Giao H\u00e0ng Nhanh","is_mask_channel":0,"channelid":50011,"enabled":true,"extra_flag":0,"min_amount_need_ic":0,"priority":4,"warning_msg":"","flag":695834330257,"warning":"","maintenance":0,"need_check_ic":false,"is_show_preferred_delivery_option":1,"address_type":0,"cod_supported":true,"shipping_method":14},"cost_info":{"discount_promotion_rule_snapshot_id":47938,"estimated_shipping_fee":3932500000,"enjoy_discount":true,"discounted_shipping_fee":0,"discount_promotion_rule_id":42657,"rebate_promotion_rule_id":42657,"discounts":{"shopee":3932500000,"seller":0},"cost":0,"original_cost":3932500000,"discount_amount":3932500000},"preferred_delivery_instructions":{"options":[]},"shippability_info":{"next_available_date":"","able_to_ship":true},"shipping_fee_data":{"cod_fee":0,"shipping_fee_before_discount":3932500000,"shipping_fee_detail":{"BASIC_SHIPPING_FEE":3932500000,"SELLER_ESTIMATED_INSURANCE_FEE":0,"SHOPEE_OR_SELLER_SHIPPING_DISCOUNT":-3932500000,"SHIPPING_DISCOUNT_BY_SELLER":0,"SELLER_ESTIMATED_BASIC_SHIPPING_FEE":0,"SHIPPING_DISCOUNT_BY_SHOPEE":3932500000,"INSURANCE_FEE":0,"ITEM_TOTAL":0,"shop_promo_only":true,"COD_FEE":0,"SELLER_ONLY_SHIPPING_DISCOUNT":0},"chargeable_shipping_fee":3932500000},"days_to_deliver":5,"preferred_delivery_time_info":{"alert_msg":"","options":[{"option_id":0,"name":"T\u1ea5t c\u1ea3 c\u00e1c ng\u00e0y trong tu\u1ea7n","short_name":"T\u1ea5t c\u1ea3 c\u00e1c ng\u00e0y trong tu\u1ea7n","description":"Ph\u00f9 h\u1ee3p v\u1edbi \u0111\u1ecba ch\u1ec9 nh\u00e0 ri\u00eang, lu\u00f4n c\u00f3 ng\u01b0\u1eddi nh\u1eadn h\u00e0ng"},{"option_id":1,"name":"Ch\u1ec9 giao h\u00e0ng gi\u1edd h\u00e0nh ch\u00ednh","short_name":"Gi\u1edd h\u00e0nh ch\u00ednh","description":"Ph\u00f9 h\u1ee3p v\u1edbi \u0111\u1ecba ch\u1ec9 v\u0103n ph\u00f2ng/c\u01a1 quan"}]},"cover_shipping_fee":false,"delivery_data":{"delay_message":"","estimated_delivery_date_from":1613805735,"is_shopee_24h":false,"min_days":3,"detail_info":{"edt_max_dt":"2021-02-22","he_pt":0,"cdt_max":2.69,"he_cdt":0,"apt":0.0,"cdt_min":0.66,"edt_min_dt":"2021-02-20"},"estimated_delivery_date_to":1613978535,"is_rapid_sla":false,"max_days":5,"estimated_delivery_time_min":3,"display_mode":"edt_by_date","is_cross_border":false,"estimated_delivery_time_max":5,"has_edt":true},"cod_data":{"cod_available":true},"guarantee_extension_period":null},"50012":{"channel_data":{"category":17,"cashless":0,"display_name":"Giao H\u00e0ng Ti\u1ebft Ki\u1ec7m","name":"Giao H\u00e0ng Ti\u1ebft Ki\u1ec7m","is_mask_channel":0,"channelid":50012,"enabled":true,"extra_flag":0,"min_amount_need_ic":0,"priority":7,"warning_msg":"","flag":695834330257,"warning":"","maintenance":0,"need_check_ic":false,"is_show_preferred_delivery_option":1,"address_type":0,"cod_supported":true,"shipping_method":17},"cost_info":{"discount_promotion_rule_snapshot_id":47938,"estimated_shipping_fee":4340000000,"enjoy_discount":true,"discounted_shipping_fee":350000000,"discount_promotion_rule_id":42657,"rebate_promotion_rule_id":42657,"discounts":{"shopee":3990000000,"seller":0},"cost":350000000,"original_cost":4340000000,"discount_amount":3990000000},"preferred_delivery_instructions":{"options":[]},"shippability_info":{"next_available_date":"","able_to_ship":true},"shipping_fee_data":{"cod_fee":0,"shipping_fee_before_discount":4340000000,"shipping_fee_detail":{"BASIC_SHIPPING_FEE":4340000000,"SELLER_ESTIMATED_INSURANCE_FEE":0,"SHOPEE_OR_SELLER_SHIPPING_DISCOUNT":-3990000000,"SHIPPING_DISCOUNT_BY_SELLER":0,"SELLER_ESTIMATED_BASIC_SHIPPING_FEE":0,"SHIPPING_DISCOUNT_BY_SHOPEE":3990000000,"INSURANCE_FEE":0,"ITEM_TOTAL":0,"shop_promo_only":true,"COD_FEE":0,"SELLER_ONLY_SHIPPING_DISCOUNT":0},"chargeable_shipping_fee":4340000000},"days_to_deliver":5,"preferred_delivery_time_info":{"alert_msg":"","options":[{"option_id":0,"name":"T\u1ea5t c\u1ea3 c\u00e1c ng\u00e0y trong tu\u1ea7n","short_name":"T\u1ea5t c\u1ea3 c\u00e1c ng\u00e0y trong tu\u1ea7n","description":"Ph\u00f9 h\u1ee3p v\u1edbi \u0111\u1ecba ch\u1ec9 nh\u00e0 ri\u00eang, lu\u00f4n c\u00f3 ng\u01b0\u1eddi nh\u1eadn h\u00e0ng"},{"option_id":1,"name":"Ch\u1ec9 giao h\u00e0ng gi\u1edd h\u00e0nh ch\u00ednh","short_name":"Gi\u1edd h\u00e0nh ch\u00ednh","description":"Ph\u00f9 h\u1ee3p v\u1edbi \u0111\u1ecba ch\u1ec9 v\u0103n ph\u00f2ng/c\u01a1 quan"}]},"cover_shipping_fee":false,"delivery_data":{"delay_message":"","estimated_delivery_date_from":1613805735,"is_shopee_24h":false,"min_days":3,"detail_info":{"edt_max_dt":"2021-02-22","he_pt":0,"cdt_max":2.92,"he_cdt":0,"apt":0.0,"cdt_min":0.61,"edt_min_dt":"2021-02-20"},"estimated_delivery_date_to":1613978535,"is_rapid_sla":false,"max_days":5,"estimated_delivery_time_min":3,"display_mode":"edt_by_date","is_cross_border":false,"estimated_delivery_time_max":5,"has_edt":true},"cod_data":{"cod_available":true},"guarantee_extension_period":null},"50015":{"channel_data":{"category":29,"cashless":0,"display_name":"VNPost Nhanh","name":"VNPost Nhanh","is_mask_channel":0,"channelid":50015,"enabled":true,"extra_flag":0,"min_amount_need_ic":0,"priority":6,"warning_msg":"","flag":695834330257,"warning":"","maintenance":0,"need_check_ic":false,"is_show_preferred_delivery_option":1,"address_type":0,"cod_supported":true,"shipping_method":29},"cost_info":{"discount_promotion_rule_snapshot_id":47728,"estimated_shipping_fee":2635000000,"enjoy_discount":true,"discounted_shipping_fee":0,"discount_promotion_rule_id":41544,"rebate_promotion_rule_id":41544,"discounts":{"shopee":2635000000,"seller":0},"cost":0,"original_cost":2635000000,"discount_amount":2635000000},"preferred_delivery_instructions":{"options":[]},"shippability_info":{"next_available_date":"","able_to_ship":true},"shipping_fee_data":{"cod_fee":0,"shipping_fee_before_discount":2635000000,"shipping_fee_detail":{"BASIC_SHIPPING_FEE":2635000000,"SELLER_ESTIMATED_INSURANCE_FEE":0,"SHOPEE_OR_SELLER_SHIPPING_DISCOUNT":-2635000000,"SHIPPING_DISCOUNT_BY_SELLER":0,"SELLER_ESTIMATED_BASIC_SHIPPING_FEE":0,"SHIPPING_DISCOUNT_BY_SHOPEE":2635000000,"INSURANCE_FEE":0,"ITEM_TOTAL":0,"shop_promo_only":true,"COD_FEE":0,"SELLER_ONLY_SHIPPING_DISCOUNT":0},"chargeable_shipping_fee":2635000000},"days_to_deliver":5,"preferred_delivery_time_info":{"alert_msg":"","options":[{"option_id":0,"name":"T\u1ea5t c\u1ea3 c\u00e1c ng\u00e0y trong tu\u1ea7n","short_name":"T\u1ea5t c\u1ea3 c\u00e1c ng\u00e0y trong tu\u1ea7n","description":"Ph\u00f9 h\u1ee3p v\u1edbi \u0111\u1ecba ch\u1ec9 nh\u00e0 ri\u00eang, lu\u00f4n c\u00f3 ng\u01b0\u1eddi nh\u1eadn h\u00e0ng"},{"option_id":1,"name":"Ch\u1ec9 giao h\u00e0ng gi\u1edd h\u00e0nh ch\u00ednh","short_name":"Gi\u1edd h\u00e0nh ch\u00ednh","description":"Ph\u00f9 h\u1ee3p v\u1edbi \u0111\u1ecba ch\u1ec9 v\u0103n ph\u00f2ng/c\u01a1 quan"}]},"cover_shipping_fee":false,"delivery_data":{"delay_message":"","estimated_delivery_date_from":1613805735,"is_shopee_24h":false,"min_days":3,"detail_info":{"edt_max_dt":"2021-02-22","he_pt":0,"cdt_max":1.74,"he_cdt":1,"apt":0.0,"cdt_min":0.98,"edt_min_dt":"2021-02-20"},"estimated_delivery_date_to":1613978535,"is_rapid_sla":false,"max_days":5,"estimated_delivery_time_min":3,"display_mode":"edt_by_date","is_cross_border":false,"estimated_delivery_time_max":5,"has_edt":true},"cod_data":{"cod_available":true},"guarantee_extension_period":null}},"integrated_channelids":[50010,50011,50015,50012],"voucher_wallet_checking_channel_ids":[50010,50011,50015,50012]},"selected_logistic_channelid":50011,"cod_fee":0,"order_total":10547500000,"shipping_id":1,"shopee_shipping_discount_id":42657,"selected_logistic_channelid_with_warning":null,"shipping_fee_discount":0,"shipping_group_description":"","selected_preferred_delivery_time_option_id":0,"buyer_remark":null,"buyer_address_data":{"tax_address":"","error_status":"","address_type":0,"addressid":56743703},"order_total_without_shipping":6615000000,"tax_payable":0,"amount_detail":{"BASIC_SHIPPING_FEE":3932500000,"SELLER_ESTIMATED_INSURANCE_FEE":0,"SHOPEE_OR_SELLER_SHIPPING_DISCOUNT":-3932500000,"VOUCHER_DISCOUNT":0,"SHIPPING_DISCOUNT_BY_SELLER":0,"SELLER_ESTIMATED_BASIC_SHIPPING_FEE":0,"SHIPPING_DISCOUNT_BY_SHOPEE":3932500000,"INSURANCE_FEE":0,"ITEM_TOTAL":6615000000,"TAX_EXEMPTION":0,"shop_promo_only":true,"COD_FEE":0,"TAX_FEE":0,"SELLER_ONLY_SHIPPING_DISCOUNT":0},"buyer_ic_number":"","fulfillment_info":{"fulfillment_flag":64,"fulfillment_source":"","managed_by_sbs":false,"order_fulfillment_type":2,"warehouse_address_id":0},"voucher_wallet_checking_channel_ids":[50010,50011,50015,50012],"shoporder_indexes":[0],"shipping_fee":3932500000,"tax_exemption":0,"shipping_group_icon":""}],"disabled_checkout_info":{"auto_popup":false,"description":"","error_infos":[]},"timestamp":1613546474,"checkout_price_data":{"shipping_subtotal":3932500000,"shipping_discount_subtotal":0,"shipping_subtotal_before_discount":3932500000,"bundle_deals_discount":null,"group_buy_discount":0,"merchandise_subtotal":6615000000,"tax_payable":0,"buyer_txn_fee":0,"credit_card_promotion":null,"promocode_applied":null,"shopee_coins_redeemed":null,"total_payable":10547500000,"tax_exemption":0},"client_id":0,"promotion_data":{"promotion_msg":"","price_discount":0,"can_use_coins":false,"voucher_info":{"coin_earned":0,"promotionid":0,"discount_percentage":0,"discount_value":0,"voucher_code":null,"reward_type":0,"coin_percentage":0,"used_price":0},"coin_info":{"coin_offset":0,"coin_earn":0,"coin_earn_by_voucher":0,"coin_used":0},"free_shipping_voucher_info":{"free_shipping_voucher_id":0,"disabled_reason":null,"free_shipping_voucher_code":""},"applied_voucher_code":null,"shop_voucher_entrances":[{"status":false,"shopid":317481388}],"card_promotion_enabled":false,"invalid_message":null,"card_promotion_id":null,"voucher_code":null,"use_coins":false},"payment_channel_info":{"channels":[{"subcategory":28,"is_new":false,"kyc_enforcement_needed":false,"currency":"VND","disabled_reason_learn_more_button_text":"","pin_set_up_needed":false,"spm_option_info":"","category":28,"disabled_reason_learn_more":"","wallet_balance":0,"name_label":"label_airpay_wallet","payment_channel_banners":[],"priority":3,"icon_background":"","version":2,"has_wallet":false,"channel_behavior":{"disable_instruction":false,"disable_cancel":false},"extra_data":{"include_shipping_and_discounts":false,"sub_description_1":"","banned_categories":[],"expiry_extension":0,"voucher_payment_type":0,"min_amount":0,"eligible_transfer":"","sub_description_2":"","expiry_duration":0,"price_limit":0,"max_checkout_price":0},"spm_channel_id":5001800,"disabled_reason_key":0,"preselect_disabled":false,"description":"","info_link":"","be_channel_id":50040,"promotion_info":{"text":"","voucher_payment_type":[]},"flag":44023419240449,"activation_needed":true,"groups":{"bank_transfer":false,"installment":false,"airpay":true,"immediate":true,"credit_card":false,"wallet":true,"cod":false,"spm_channel":true,"general_card":false,"bank_account":false},"option_keys_name":[],"topup_needed":false,"icon":"https://shopee.vn/static/images/ic_paymentoption_airpay.png","name":"V\u00ed AirPay","info_text":"","country":"VN","payment_result_text":"","enabled":false,"pin_reset_needed":false,"channel_id":5001800,"always_show":false,"sub_description_info":{"second":{"text":"","highlight":false},"first":{"text":"","highlight":false}},"balance":0,"disabled_reason":"V\u00ed AirPay c\u1ee7a b\u1ea1n ch\u01b0a \u0111\u01b0\u1ee3c k\u00edch ho\u1ea1t ho\u1eb7c ch\u01b0a li\u00ean k\u1ebft v\u1edbi t\u00e0i kho\u1ea3n ng\u00e2n h\u00e0ng. H\u00e3y nh\u1ea5n Thi\u1ebft l\u1eadp ngay \u0111\u1ec3 b\u1eaft \u0111\u1ea7u!","always_expanded":true},{"channelid":59000,"subcategory":6,"is_new":false,"currency":"VND","disabled_reason_learn_more_button_text":"","spm_option_info":"","category":6,"disabled_reason_learn_more":"","wallet_balance":0,"name_label":"label_cod","payment_channel_banners":[],"priority":87,"icon_background":"","version":1,"channel_behavior":{},"extra_data":{"include_shipping_and_discounts":true,"voucher_payment_type":0,"banned_categories":[],"expiry_extension":0,"sub_description_1":"","min_amount":0,"eligible_transfer":"","sub_description_2":"","expiry_duration":259200,"price_limit":0,"max_checkout_price":0},"spm_channel_id":0,"disabled_reason_key":0,"preselect_disabled":false,"description":"Cash on Delivery","info_link":"","be_channel_id":59000,"promotion_info":{"text":"","voucher_payment_type":[]},"flag":10995116286035,"groups":{"bank_transfer":false,"installment":false,"airpay":false,"immediate":false,"credit_card":false,"wallet":false,"cod":true,"spm_channel":false,"general_card":false,"bank_account":false},"option_keys_name":[],"has_wallet":false,"icon":"https://mall.shopee.vn/static/images/ic_paymentoption_cod.png","name":"Thanh to\u00e1n khi nh\u1eadn h\u00e0ng","info_text":"","country":"VN","payment_result_text":"","enabled":true,"always_show":false,"sub_description_info":{"second":{"highlight":false,"text":""},"first":{"text":"","highlight":false}},"disabled_reason":""}],"promotion_info":{"text":""},"grouping_info":{"groups":[{"display_info":{"name":"V\u00ed AirPay","info_link":"","info_text":"","icon_background":"#ffffff","promotion_info":{},"channel_id":5001800,"version":2,"icon":"https://shopee.vn/static/images/ic_paymentoption_airpay.png"},"group_id":0,"to_combine":[5001800,5002900]}]}},"dropshipping_info":null,"selected_payment_channel_data":{"version":1,"payment_channelid":59000,"option_info":"","text_info":{}},"shoporders":[{"shop":{"remark_type":0,"support_ereceipt":false,"images":"","is_official_shop":false,"cb_option":false,"shopid":317481388,"shop_name":"Ng\u00f4i Nh\u00e0 Ti\u1ec7n L\u1ee3i 24H"},"buyer_remark":null,"shipping_fee":3932500000,"order_total":10547500000,"shipping_id":1,"buyer_ic_number":"","items":[{"itemid":7763372648,"is_add_on_sub_item":false,"image":"9ac00286ccc1725baaabf2a365701c8a","shopid":317481388,"opc_extra_data":{"slash_price_activity_id":0},"promotion_id":0,"add_on_deal_id":0,"modelid":51858824533,"offerid":0,"source":"","checkout":true,"item_group_id":0,"service_by_shopee_flag":false,"none_shippable_full_reason":"","price":6615000000,"is_flash_sale":false,"categories":[{"catids":[87,2359,13936]}],"shippable":true,"name":"M\u00f3c treo qu\u1ea7n \u00e1o \u0111a n\u0103ng 9 l\u1ed7 - SmartHouseware24","none_shippable_reason":"","is_pre_order":false,"stock":0,"model_name":"","quantity":1}],"logistics":{"non_integrated_channelids":[],"integrated_channelids":[50010,50011,50015,50012],"logistic_channels":{"50010":{"channel_data":{"category":15,"cashless":0,"display_name":"Viettel Post","name":"Viettel Post","is_mask_channel":0,"channelid":50010,"enabled":true,"extra_flag":0,"min_amount_need_ic":0,"priority":3,"warning_msg":"","flag":695834330257,"warning":"","maintenance":0,"need_check_ic":false,"is_show_preferred_delivery_option":1,"address_type":0,"cod_supported":true,"shipping_method":15},"cost_info":{"discount_promotion_rule_snapshot_id":47938,"estimated_shipping_fee":4713000000,"enjoy_discount":true,"discounted_shipping_fee":750000000,"discount_promotion_rule_id":42657,"rebate_promotion_rule_id":42657,"discounts":{"shopee":3963000000,"seller":0},"cost":750000000,"original_cost":4713000000,"discount_amount":3963000000},"preferred_delivery_instructions":{"options":[]},"shippability_info":{"next_available_date":"","able_to_ship":true},"shipping_fee_data":{"cod_fee":0,"shipping_fee_before_discount":4713000000,"shipping_fee_detail":{"BASIC_SHIPPING_FEE":4713000000,"COD_FEE":0,"SHOPEE_OR_SELLER_SHIPPING_DISCOUNT":-3963000000,"SHIPPING_DISCOUNT_BY_SELLER":0,"SELLER_ESTIMATED_INSURANCE_FEE":0,"SELLER_ESTIMATED_BASIC_SHIPPING_FEE":0,"SHIPPING_DISCOUNT_BY_SHOPEE":3963000000,"INSURANCE_FEE":0,"ITEM_TOTAL":0,"shop_promo_only":true,"SELLER_ONLY_SHIPPING_DISCOUNT":0},"chargeable_shipping_fee":4713000000},"days_to_deliver":5,"preferred_delivery_time_info":{"alert_msg":"","options":[{"option_id":0,"name":"T\u1ea5t c\u1ea3 c\u00e1c ng\u00e0y trong tu\u1ea7n","short_name":"T\u1ea5t c\u1ea3 c\u00e1c ng\u00e0y trong tu\u1ea7n","description":"Ph\u00f9 h\u1ee3p v\u1edbi \u0111\u1ecba ch\u1ec9 nh\u00e0 ri\u00eang, lu\u00f4n c\u00f3 ng\u01b0\u1eddi nh\u1eadn h\u00e0ng"},{"option_id":1,"name":"Ch\u1ec9 giao h\u00e0ng gi\u1edd h\u00e0nh ch\u00ednh","short_name":"Gi\u1edd h\u00e0nh ch\u00ednh","description":"Ph\u00f9 h\u1ee3p v\u1edbi \u0111\u1ecba ch\u1ec9 v\u0103n ph\u00f2ng/c\u01a1 quan"}]},"cover_shipping_fee":false,"delivery_data":{"is_rapid_sla":false,"estimated_delivery_date_from":1613805735,"is_shopee_24h":false,"min_days":3,"detail_info":{"edt_max_dt":"2021-02-24","he_pt":0,"cdt_max":3.78,"he_cdt":1,"apt":0.0,"cdt_min":0.9,"edt_min_dt":"2021-02-20"},"estimated_delivery_date_to":1614151335,"delay_message":"","max_days":7,"estimated_delivery_time_min":3,"display_mode":"edt_by_date","is_cross_border":false,"estimated_delivery_time_max":7,"has_edt":true},"cod_data":{"cod_available":true},"guarantee_extension_period":null},"50011":{"channel_data":{"category":14,"cashless":0,"display_name":"Giao H\u00e0ng Nhanh","name":"Giao H\u00e0ng Nhanh","is_mask_channel":0,"channelid":50011,"enabled":true,"extra_flag":0,"min_amount_need_ic":0,"priority":4,"warning_msg":"","flag":695834330257,"warning":"","maintenance":0,"need_check_ic":false,"is_show_preferred_delivery_option":1,"address_type":0,"cod_supported":true,"shipping_method":14},"cost_info":{"discount_promotion_rule_snapshot_id":47938,"estimated_shipping_fee":3932500000,"enjoy_discount":true,"discounted_shipping_fee":0,"discount_promotion_rule_id":42657,"rebate_promotion_rule_id":42657,"discounts":{"shopee":3932500000,"seller":0},"cost":0,"original_cost":3932500000,"discount_amount":3932500000},"preferred_delivery_instructions":{"options":[]},"shippability_info":{"next_available_date":"","able_to_ship":true},"shipping_fee_data":{"cod_fee":0,"shipping_fee_before_discount":3932500000,"shipping_fee_detail":{"BASIC_SHIPPING_FEE":3932500000,"COD_FEE":0,"SHOPEE_OR_SELLER_SHIPPING_DISCOUNT":-3932500000,"SHIPPING_DISCOUNT_BY_SELLER":0,"SELLER_ESTIMATED_INSURANCE_FEE":0,"SELLER_ESTIMATED_BASIC_SHIPPING_FEE":0,"SHIPPING_DISCOUNT_BY_SHOPEE":3932500000,"INSURANCE_FEE":0,"ITEM_TOTAL":0,"shop_promo_only":true,"SELLER_ONLY_SHIPPING_DISCOUNT":0},"chargeable_shipping_fee":3932500000},"days_to_deliver":5,"preferred_delivery_time_info":{"alert_msg":"","options":[{"option_id":0,"name":"T\u1ea5t c\u1ea3 c\u00e1c ng\u00e0y trong tu\u1ea7n","short_name":"T\u1ea5t c\u1ea3 c\u00e1c ng\u00e0y trong tu\u1ea7n","description":"Ph\u00f9 h\u1ee3p v\u1edbi \u0111\u1ecba ch\u1ec9 nh\u00e0 ri\u00eang, lu\u00f4n c\u00f3 ng\u01b0\u1eddi nh\u1eadn h\u00e0ng"},{"option_id":1,"name":"Ch\u1ec9 giao h\u00e0ng gi\u1edd h\u00e0nh ch\u00ednh","short_name":"Gi\u1edd h\u00e0nh ch\u00ednh","description":"Ph\u00f9 h\u1ee3p v\u1edbi \u0111\u1ecba ch\u1ec9 v\u0103n ph\u00f2ng/c\u01a1 quan"}]},"cover_shipping_fee":false,"delivery_data":{"is_rapid_sla":false,"estimated_delivery_date_from":1613805735,"is_shopee_24h":false,"min_days":3,"detail_info":{"edt_max_dt":"2021-02-22","he_pt":0,"cdt_max":2.69,"he_cdt":0,"apt":0.0,"cdt_min":0.66,"edt_min_dt":"2021-02-20"},"estimated_delivery_date_to":1613978535,"delay_message":"","max_days":5,"estimated_delivery_time_min":3,"display_mode":"edt_by_date","is_cross_border":false,"estimated_delivery_time_max":5,"has_edt":true},"cod_data":{"cod_available":true},"guarantee_extension_period":null},"50012":{"channel_data":{"category":17,"cashless":0,"display_name":"Giao H\u00e0ng Ti\u1ebft Ki\u1ec7m","name":"Giao H\u00e0ng Ti\u1ebft Ki\u1ec7m","is_mask_channel":0,"channelid":50012,"enabled":true,"extra_flag":0,"min_amount_need_ic":0,"priority":7,"warning_msg":"","flag":695834330257,"warning":"","maintenance":0,"need_check_ic":false,"is_show_preferred_delivery_option":1,"address_type":0,"cod_supported":true,"shipping_method":17},"cost_info":{"discount_promotion_rule_snapshot_id":47938,"estimated_shipping_fee":4340000000,"enjoy_discount":true,"discounted_shipping_fee":350000000,"discount_promotion_rule_id":42657,"rebate_promotion_rule_id":42657,"discounts":{"shopee":3990000000,"seller":0},"cost":350000000,"original_cost":4340000000,"discount_amount":3990000000},"preferred_delivery_instructions":{"options":[]},"shippability_info":{"next_available_date":"","able_to_ship":true},"shipping_fee_data":{"cod_fee":0,"shipping_fee_before_discount":4340000000,"shipping_fee_detail":{"BASIC_SHIPPING_FEE":4340000000,"COD_FEE":0,"SHOPEE_OR_SELLER_SHIPPING_DISCOUNT":-3990000000,"SHIPPING_DISCOUNT_BY_SELLER":0,"SELLER_ESTIMATED_INSURANCE_FEE":0,"SELLER_ESTIMATED_BASIC_SHIPPING_FEE":0,"SHIPPING_DISCOUNT_BY_SHOPEE":3990000000,"INSURANCE_FEE":0,"ITEM_TOTAL":0,"shop_promo_only":true,"SELLER_ONLY_SHIPPING_DISCOUNT":0},"chargeable_shipping_fee":4340000000},"days_to_deliver":5,"preferred_delivery_time_info":{"alert_msg":"","options":[{"option_id":0,"name":"T\u1ea5t c\u1ea3 c\u00e1c ng\u00e0y trong tu\u1ea7n","short_name":"T\u1ea5t c\u1ea3 c\u00e1c ng\u00e0y trong tu\u1ea7n","description":"Ph\u00f9 h\u1ee3p v\u1edbi \u0111\u1ecba ch\u1ec9 nh\u00e0 ri\u00eang, lu\u00f4n c\u00f3 ng\u01b0\u1eddi nh\u1eadn h\u00e0ng"},{"option_id":1,"name":"Ch\u1ec9 giao h\u00e0ng gi\u1edd h\u00e0nh ch\u00ednh","short_name":"Gi\u1edd h\u00e0nh ch\u00ednh","description":"Ph\u00f9 h\u1ee3p v\u1edbi \u0111\u1ecba ch\u1ec9 v\u0103n ph\u00f2ng/c\u01a1 quan"}]},"cover_shipping_fee":false,"delivery_data":{"is_rapid_sla":false,"estimated_delivery_date_from":1613805735,"is_shopee_24h":false,"min_days":3,"detail_info":{"edt_max_dt":"2021-02-22","he_pt":0,"cdt_max":2.92,"he_cdt":0,"apt":0.0,"cdt_min":0.61,"edt_min_dt":"2021-02-20"},"estimated_delivery_date_to":1613978535,"delay_message":"","max_days":5,"estimated_delivery_time_min":3,"display_mode":"edt_by_date","is_cross_border":false,"estimated_delivery_time_max":5,"has_edt":true},"cod_data":{"cod_available":true},"guarantee_extension_period":null},"50015":{"channel_data":{"category":29,"cashless":0,"display_name":"VNPost Nhanh","name":"VNPost Nhanh","is_mask_channel":0,"channelid":50015,"enabled":true,"extra_flag":0,"min_amount_need_ic":0,"priority":6,"warning_msg":"","flag":695834330257,"warning":"","maintenance":0,"need_check_ic":false,"is_show_preferred_delivery_option":1,"address_type":0,"cod_supported":true,"shipping_method":29},"cost_info":{"discount_promotion_rule_snapshot_id":47728,"estimated_shipping_fee":2635000000,"enjoy_discount":true,"discounted_shipping_fee":0,"discount_promotion_rule_id":41544,"rebate_promotion_rule_id":41544,"discounts":{"shopee":2635000000,"seller":0},"cost":0,"original_cost":2635000000,"discount_amount":2635000000},"preferred_delivery_instructions":{"options":[]},"shippability_info":{"next_available_date":"","able_to_ship":true},"shipping_fee_data":{"cod_fee":0,"shipping_fee_before_discount":2635000000,"shipping_fee_detail":{"BASIC_SHIPPING_FEE":2635000000,"COD_FEE":0,"SHOPEE_OR_SELLER_SHIPPING_DISCOUNT":-2635000000,"SHIPPING_DISCOUNT_BY_SELLER":0,"SELLER_ESTIMATED_INSURANCE_FEE":0,"SELLER_ESTIMATED_BASIC_SHIPPING_FEE":0,"SHIPPING_DISCOUNT_BY_SHOPEE":2635000000,"INSURANCE_FEE":0,"ITEM_TOTAL":0,"shop_promo_only":true,"SELLER_ONLY_SHIPPING_DISCOUNT":0},"chargeable_shipping_fee":2635000000},"days_to_deliver":5,"preferred_delivery_time_info":{"alert_msg":"","options":[{"option_id":0,"name":"T\u1ea5t c\u1ea3 c\u00e1c ng\u00e0y trong tu\u1ea7n","short_name":"T\u1ea5t c\u1ea3 c\u00e1c ng\u00e0y trong tu\u1ea7n","description":"Ph\u00f9 h\u1ee3p v\u1edbi \u0111\u1ecba ch\u1ec9 nh\u00e0 ri\u00eang, lu\u00f4n c\u00f3 ng\u01b0\u1eddi nh\u1eadn h\u00e0ng"},{"option_id":1,"name":"Ch\u1ec9 giao h\u00e0ng gi\u1edd h\u00e0nh ch\u00ednh","short_name":"Gi\u1edd h\u00e0nh ch\u00ednh","description":"Ph\u00f9 h\u1ee3p v\u1edbi \u0111\u1ecba ch\u1ec9 v\u0103n ph\u00f2ng/c\u01a1 quan"}]},"cover_shipping_fee":false,"delivery_data":{"is_rapid_sla":false,"estimated_delivery_date_from":1613805735,"is_shopee_24h":false,"min_days":3,"detail_info":{"edt_max_dt":"2021-02-22","he_pt":0,"cdt_max":1.74,"he_cdt":1,"apt":0.0,"cdt_min":0.98,"edt_min_dt":"2021-02-20"},"estimated_delivery_date_to":1613978535,"delay_message":"","max_days":5,"estimated_delivery_time_min":3,"display_mode":"edt_by_date","is_cross_border":false,"estimated_delivery_time_max":5,"has_edt":true},"cod_data":{"cod_available":true},"guarantee_extension_period":null}},"logistic_service_types":{"standard":{"name":"V\u1eadn Chuy\u1ec3n Nhanh","max_cost":4713000000,"channel_ids":[50010,50011,50012,50015],"min_cost":2635000000,"priority":2,"consolidated_logistic_info":{"shopee_max_cost":750000000,"shop_promo_only_min_cost":2635000000,"shop_promo_only_max_cost":4713000000,"enabled":true,"shopee_min_cost":0},"identifier":"standard","enabled":true,"sla_msg":""}},"voucher_wallet_checking_channel_ids":[50010,50011,50015,50012]},"selected_preferred_delivery_time_option_id":0,"selected_logistic_channelid":50011,"cod_fee":0,"tax_payable":0,"buyer_address_data":{"tax_address":"","error_status":"","address_type":0,"addressid":56743703},"shipping_fee_discount":0,"order_total_without_shipping":6615000000,"tax_exemption":0,"amount_detail":{"BASIC_SHIPPING_FEE":3932500000,"COD_FEE":0,"SHOPEE_OR_SELLER_SHIPPING_DISCOUNT":-3932500000,"VOUCHER_DISCOUNT":0,"SHIPPING_DISCOUNT_BY_SELLER":0,"SELLER_ESTIMATED_INSURANCE_FEE":0,"SELLER_ESTIMATED_BASIC_SHIPPING_FEE":0,"SHIPPING_DISCOUNT_BY_SHOPEE":3932500000,"INSURANCE_FEE":0,"ITEM_TOTAL":6615000000,"TAX_EXEMPTION":0,"shop_promo_only":true,"TAX_FEE":0,"SELLER_ONLY_SHIPPING_DISCOUNT":0}}],"can_checkout":true,"order_update_info":{},"buyer_txn_fee_info":{}}

Em sợ là e lm cái checkout/get sai nên data để checkorder nó không đúng nhưng chưa biết có phải không ạ?

Các pro giúp e với ạ.

Chia sẻ bài đăng này


Link tới bài viết
Share on other sites
On 1/3/2020 at 09:51, Wikipedia said:

Như ae đã biết, vụ checkout shopee giờ khá khoai. Hnay rảnh rỗi - sang tháng mới - tặng ae đoạn code checkout Shopee. Mà chính xác hơn là solution cho ae quất. 

Giá trị: 10.000.000 VND :v (ảo tưởng tí)

1. x-track-id là gì?

Như ae thấy, giờ khi call place_order, trong header sẽ có thằng x-track-id. Vậy nó là con mẹ gì vậy?

Shopee giờ khôn hơn rồi. Đầu tiên, em nó sẽ dùng vài thông tin trong đoạn trả về của api checkout/get + thông tin account đặt hàng => Mã hóa SHA512 => tạo ra 1 chuỗi x-track-id.

SHA512 là mã hóa 1 chiều, nên cơ bản là không thể giải mã. Vậy shopee check valid cái x-track-id thế nào?

Cũng giống như việc check password vậy, shopee sẽ dựa vào thông tin bạn post lên ở api place_order và cũng mã hóa các thông tin cần thiết => sau đó so sánh kq đó với chính cái x-track-id bạn post llên trong header.

Lý thuyết thì vậy rồi, giờ là cách tính x-track-id.

 

Nội dung ẩn

  • Bạn cần Reaction hoặc trả lời chủ đề này để thấy nội dung bị ẩn.

 

Kết luận 1: chuỗi mã hóa thì fix bởi các tham số như trên, còn key mã hóa thì sẽ phụ cmn thuộc vào userid của thằng đang mua. Và thằng x-track-id này lại trở thành key của hàm mã hóa data json.

 

2. X-CV-ID là gì? Tôi có cần post cái của nợ gì mã hóa lên không?

- Thực ra m cũng đ' biết X-CV-ID là cm gì.

- Tôi có cần post cái của nợ gì mã hóa lên không? Trả lời: Tùy các bạn, nó phụ thuộc vào độ nguy hiểm của các bạn. Riêng tôi, tôi thích đơn giản, yêu màu tím !

Đoạn jav dài quá, chưa beautify nên thôi nợ k post nhé. Về cơ bản ae thấy khi nó post api place_order => nó sẽ tự chèn X-CV-ID = 100.

Tôi k biết là gì, tại sao lại 100 mà đ' phải 999 hay 9999. Như tôi đã đề cập ở trên đấy "Tùy các bạn, nó phụ thuộc vào độ nguy hiểm của các bạn". Các bạn thích post data mã hóa cho nguy hiểm hoặc thích số 100 thì cứ cho nó là 100 đi.

Còn tôi, tôi thích số 69 anh em ạ. Nên tôi cho nó = 69. Vì nó là 69 nên tôi chỉ cần post đoạn json như trước kia lên mà thôi. K cần thiết mã hóa làm gì cả.

Kết luận 2: 

- X-CV-ID >= 100 ==> thì post data mã hóa (Mà trong bài này m có hướng dẫn cách mã hóa data json đ' đâu?)

-  0 < X-CV-ID < 100 ==> Post cái json như mọi khi bạn vẫn làm :)

2020-03-01_09h41_22.png


2020-03-01_09h41_57.png

 

Chốt: AE chỉ cần tính đúng x-track-id là đủ.

Ae đã có 10tr cho tháng 3 chưa? Ngại gì k thử nhỉ.

Hãy để lại 1 vài like và ít còm men cho người ae thiện lành nào !

 

Chia sẻ bài đăng này


Link tới bài viết
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Trả lời chủ đề này...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...