承接 be-lenka/fhb-kika-api-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

be-lenka/fhb-kika-api-client

Composer 安装命令:

composer require be-lenka/fhb-kika-api-client

包简介

Library for accessing Kika API v3 of FHB Fulfillment

README 文档

README

Full API docs available at: https://kikaapi3.docs.apiary.io/#

Production API URL: https://api.fhb.sk/v3

Development API URL: https://api-dev.fhb.sk/v3

Library for API v3

Usage:

<?php

const API_ID  = '5275fe3ca57307bf8cecfb7b08a447c0';
const SECRET = 'ErYFgUCXWJeINyc89066ed90kcwr28ceta8s1t4a';
const ENDPOINT = 'https://api-dev.fhb.sk/v3';

$api = new belenka\FHB\Kika\ApiClient\RestApi(API_ID, SECRET);
$api->setEndpoint(ENDPOINT);

Products

$products = new belenka\FHB\Kika\ApiClient\Products($api);
$uniqueId = '123456';

$data = array(
	'id' => $uniqueId,
	'name' => 'Shampoo',
	'ean' => '8580000001234',
	'photoUrl' => 'http://example.com/image.png',
	'notifyLink' => '"http://example.com/api/product/123/notify',
	'customs_information'=>[
	    'hs_code'=>'00112233',
	    'country_of_origin' => 'SK',
	    'purchase_price' => 23.50
	]
);

try {

	//create
	$result = $products->create($data);
	echo '<pre>';
	print_r($result);
	echo '</pre>';

	//update
	$data['name'] = 'Šampón updated';
	$result = $products->update($uniqueId, $data);
	echo '<pre>';
	print_r($result);
	echo '</pre>';

	//read
	$result = $products->read($uniqueId);
	echo '<pre>';
	print_r($result);
	echo '</pre>';

	//readAll
	$result = $products->readAll();
	echo '<pre>';
	print_r($result);
	echo '</pre>';


} catch (Kika\ApiClient\RestApiException $e) {
	die($e->getMessage());
}

Orders

$orders = new belenka\FHB\Kika\ApiClient\Orders($api);

$uniqueId = '123456';

$data = array(
	'id' => $uniqueId,
	'variable_symbol =>'12345',
	'parcel_service'=> 'dpd',
	'delivery_point'=>'1234',
	'cod'=>22.50,
	'value'=> 22.50,
	'recipient'=>[
		'address'=>[
			'name'=>'john doe',
			'street'=>'Main street 1',
			'city'=>'New City',
			'zip'=>'12345',
			'province'=>'South',
			'country'=>'SK'
		],
		'contact'=[
			'email'=>'info@example.com',
			'phone'=>'421901234567'
		]
	],
	'items'=>[
		[
			'id'=>1234,
			'quantity'=> 2
		]
	],
	'notification'=>[
		'confirmed'=>'http://localhost',
		'sent'=>'http://localhost',
		'delivered'=>'http://localhost',
		'returned'=>'http://localhost',
		'ticket_created'=>'http://localhost',
		'ticket_updated'=>'http://localhost',
		'ticket_closed'=>'http://localhost',
	],
	'invoice'=>'http://localhost/file.pdf',
	'note' => 'no comment',
	'note_delivery' => 'no comment',
	'invoice_detail' => [
		'number'=>'INV0001',
		'total'=>22.50,
		'currency'=>'EUR',
		'date_of_issue'=>'2023-01-02',
		'products'=>[
			[
				'code'=> 123,
				'description' =>'socks white 38',
				'hs_code'=>112233,
				'value'=>12.50,
				'quantity'=>1,
				'country_of_origin'=>'SK'
			]
		],
		'fees'=>[
			[
				'type'=>'discount|shipping|other',
				'description'=>'Shipping Fee',
				'value'=>1.3
			]
		]
	]
	
);


try {

	//create
	$result = $orders->create($data);
	echo '<pre>';
	print_r($result);
	echo '</pre>';

	//update
	$data['name'] = 'Martin Novák updated';
	$result = $orders->update($uniqueId, $data);
	echo '<pre>';
	print_r($result);
	echo '</pre>';

	//read
	$result = $orders->read($uniqueId);
	echo '<pre>';
	print_r($result);
	echo '</pre>';

	//anonymization
	$result = $orders->anonymization($uniqueId);
	echo '<pre>';
	print_r($result);
	echo '</pre>';

	//delete
	$result = $orders->delete($uniqueId);
	echo '<pre>';
	print_r($result);
	echo '</pre>';


} catch (RestApiException $e) {
	die($e->getMessage());
}

be-lenka/fhb-kika-api-client 适用场景与选型建议

be-lenka/fhb-kika-api-client 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 15.41k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 07 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 be-lenka/fhb-kika-api-client 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 be-lenka/fhb-kika-api-client 我们能提供哪些服务?
定制开发 / 二次开发

基于 be-lenka/fhb-kika-api-client 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 15.41k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 21
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-10