Skip to content

Commit 042e6a1

Browse files
committed
feat: added callback table and update to work with newer Magento versions
1 parent 5ae7b71 commit 042e6a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1722
-1014
lines changed

.gitignore

Lines changed: 0 additions & 43 deletions
This file was deleted.

Api/CallbackRepositoryInterface.php

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
3+
/**
4+
*
5+
* DISCLAIMER
6+
*
7+
* Do not edit or add to this file if you wish to upgrade this extension to newer
8+
* version in the future.
9+
*
10+
* @category Picpay
11+
* @package Picpay_Payment
12+
*
13+
*/
14+
15+
declare(strict_types=1);
16+
17+
namespace Picpay\Payment\Api;
18+
19+
interface CallbackRepositoryInterface
20+
{
21+
/**
22+
* Save Queue
23+
* @param \Picpay\Payment\Api\Data\CallbackInterface $callback
24+
* @return \Picpay\Payment\Api\Data\CallbackInterface
25+
* @throws \Magento\Framework\Exception\LocalizedException
26+
*/
27+
public function save(
28+
\Picpay\Payment\Api\Data\CallbackInterface $callback
29+
);
30+
31+
/**
32+
* Retrieve CallbackInterface
33+
* @param string $id
34+
* @return \Picpay\Payment\Api\Data\CallbackInterface
35+
* @throws \Magento\Framework\Exception\LocalizedException
36+
*/
37+
public function get($id);
38+
39+
/**
40+
* Retrieve Queue matching the specified criteria.
41+
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
42+
* @return \Picpay\Payment\Api\Data\CallbackSearchResultsInterface
43+
* @throws \Magento\Framework\Exception\LocalizedException
44+
*/
45+
public function getList(
46+
\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
47+
);
48+
}

Api/Data/CallbackInterface.php

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
<?php
2+
/**
3+
*
4+
*
5+
*
6+
*
7+
*
8+
*
9+
* DISCLAIMER
10+
*
11+
* Do not edit or add to this file if you wish to upgrade this extension to newer
12+
* version in the future.
13+
*
14+
* @category Picpay
15+
* @package Picpay_Payment
16+
*
17+
*
18+
*/
19+
20+
namespace Picpay\Payment\Api\Data;
21+
22+
interface CallbackInterface extends \Magento\Framework\Api\ExtensibleDataInterface
23+
{
24+
/**
25+
* Constants for keys of data array. Identical to the name of the getter in snake case.
26+
*/
27+
const ENTITY_ID = 'entity_id';
28+
const INCREMENT_ID = 'increment_id';
29+
const STATUS = 'status';
30+
const METHOD = 'method';
31+
const PAYLOAD = 'payload';
32+
const CREATED_AT = 'created_at';
33+
const UPDATED_AT = 'updated_at';
34+
35+
/**
36+
* Get EntityId.
37+
*
38+
* @return int
39+
*/
40+
public function getEntityId();
41+
42+
/**
43+
* Set EntityId.
44+
* @param $entityId
45+
*/
46+
public function setEntityId($entityId);
47+
48+
/**
49+
* Get IncrementID.
50+
*
51+
* @return string
52+
*/
53+
public function getIncrementId();
54+
55+
/**
56+
* Set IncrementId.
57+
* @param $orderId
58+
*/
59+
public function setIncrementId($incrementId);
60+
61+
/**
62+
* Get Status.
63+
*
64+
* @return string
65+
*/
66+
public function getStatus();
67+
68+
/**
69+
* Set Status.
70+
* @param $status
71+
*/
72+
public function setStatus($status);
73+
74+
/**
75+
* Get Method.
76+
*
77+
* @return string
78+
*/
79+
public function getMethod();
80+
81+
/**
82+
* Set Method.
83+
* @param $method
84+
*/
85+
public function setMethod($method);
86+
87+
/**
88+
* Get Payload.
89+
*
90+
* @return string
91+
*/
92+
public function getPayload();
93+
94+
/**
95+
* Set Payload.
96+
* @param $payload
97+
*/
98+
public function setPayload($payload);
99+
100+
/**
101+
* Get CreatedAt.
102+
*
103+
* @return string
104+
*/
105+
public function getCreatedAt();
106+
107+
/**
108+
* Set CreatedAt.
109+
* @param $createdAt
110+
*/
111+
public function setCreatedAt($createdAt);
112+
113+
/**
114+
* Get CreatedAt.
115+
*
116+
* @return string
117+
*/
118+
public function getUpdatedAt();
119+
120+
/**
121+
* Set Updated At.
122+
* @param $updatedAt
123+
*/
124+
public function setUpdatedAt($updatedAt);
125+
126+
/**
127+
* @return \Picpay\Payment\Api\Data\CallbackExtensionInterface|null
128+
*/
129+
public function getExtensionAttributes();
130+
131+
/**
132+
* @param \Picpay\Payment\Api\Data\CallbackExtensionInterface $extensionAttributes
133+
* @return void
134+
*/
135+
public function setExtensionAttributes(CallbackExtensionInterface $extensionAttributes);
136+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
/**
3+
*
4+
*
5+
*
6+
*
7+
*
8+
*
9+
* DISCLAIMER
10+
*
11+
* Do not edit or add to this file if you wish to upgrade this extension to newer
12+
* version in the future.
13+
*
14+
* @category Picpay
15+
* @package Picpay_Payment
16+
*
17+
*
18+
*/
19+
20+
declare(strict_types=1);
21+
22+
namespace Picpay\Payment\Api\Data;
23+
24+
interface CallbackSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface
25+
{
26+
/**
27+
* Get transaction list.
28+
* @return \Picpay\Payment\Api\Data\CallbackInterface[]
29+
*/
30+
public function getItems();
31+
32+
/**
33+
* Set entity_id list.
34+
* @param \Picpay\Payment\Api\Data\CallbackInterface[] $items
35+
* @return $this
36+
*/
37+
public function setItems(array $items);
38+
}
39+

0 commit comments

Comments
 (0)