Skip to content

Release 3.0.0: fix core issues and add new v3 zendesk endpoints #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Sep 23, 2020

Conversation

rsbowers
Copy link
Contributor

No description provided.

@rsbowers rsbowers requested a review from agrohs September 10, 2020 23:49
@todo
Copy link

todo bot commented Sep 10, 2020

can we get customer URL or timestamps??

// TODO: can we get customer URL or timestamps??
return $customer;
}
protected function formatAddress($address)


This comment was generated by todo based on a TODO comment in d81ef13 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 10, 2020

get without tax

'without_tax' => $this->formatPrice($order->getGrandTotal() - $order->getTaxAmount(), $currency), // TODO: get without tax
'tax' => $this->formatPrice($order->getTaxAmount(), $currency) // TODO: get tax
),
'timestamps' => array(
'created_at' => $order->getCreatedAt(),
'updated_at' => $order->getUpdatedAt(),


This comment was generated by todo based on a TODO comment in d81ef13 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 10, 2020

get tax

'tax' => $this->formatPrice($order->getTaxAmount(), $currency) // TODO: get tax
),
'timestamps' => array(
'created_at' => $order->getCreatedAt(),
'updated_at' => $order->getUpdatedAt(),
)


This comment was generated by todo based on a TODO comment in d81ef13 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 10, 2020

grab authorization as well

$transaction = $payment->lookupTransaction($lastTransId, 'capture'); // TODO grab authorization as well
}
if (!empty($transaction)) {
$transactionData = $transaction->getData();
}


This comment was generated by todo based on a TODO comment in d81ef13 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 10, 2020

validate this is the correct value

'id' => $transactionData['transaction_id'], //TODO validate this is the correct value
'type' => $transactionData['txn_type'], //TODO is this only always payment? or can this be refund?
'reference' => $transactionData['txn_id'], //TODO validate this is the correct value
'gateway' => $gateway, //TODO validate this is the correct value
'status' => $payment->getCcCidStatus(), //TODO validate this is the correct value
'meta' => array(


This comment was generated by todo based on a TODO comment in d81ef13 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 10, 2020

is this only always payment? or can this be refund?

'type' => $transactionData['txn_type'], //TODO is this only always payment? or can this be refund?
'reference' => $transactionData['txn_id'], //TODO validate this is the correct value
'gateway' => $gateway, //TODO validate this is the correct value
'status' => $payment->getCcCidStatus(), //TODO validate this is the correct value
'meta' => array(
'display_price' => $this->formatPrice($transactionAmount, $currency),


This comment was generated by todo based on a TODO comment in d81ef13 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 10, 2020

validate this is the correct value

'reference' => $transactionData['txn_id'], //TODO validate this is the correct value
'gateway' => $gateway, //TODO validate this is the correct value
'status' => $payment->getCcCidStatus(), //TODO validate this is the correct value
'meta' => array(
'display_price' => $this->formatPrice($transactionAmount, $currency),
'timestamps' => array(


This comment was generated by todo based on a TODO comment in d81ef13 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 10, 2020

validate this is the correct value

'gateway' => $gateway, //TODO validate this is the correct value
'status' => $payment->getCcCidStatus(), //TODO validate this is the correct value
'meta' => array(
'display_price' => $this->formatPrice($transactionAmount, $currency),
'timestamps' => array(
'created_at' => $order->getCreatedAt(),


This comment was generated by todo based on a TODO comment in d81ef13 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 10, 2020

validate this is the correct value

'status' => $payment->getCcCidStatus(), //TODO validate this is the correct value
'meta' => array(
'display_price' => $this->formatPrice($transactionAmount, $currency),
'timestamps' => array(
'created_at' => $order->getCreatedAt(),
'updated_at' => $order->getUpdatedAt(),


This comment was generated by todo based on a TODO comment in d81ef13 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 10, 2020

!!!!!!!: read version from config.xml

// TODO!!!!!!!: read version from config.xml
// $configSettings = Mage::getSingleton('Zendesk_Zendesk/config');
// Mage::log(json_encode($configSettings), null, 'zendesk.log');
$this->getResponse()->setHeader('X-Extension-Version', '3.0.0');
return $this;
}


This comment was generated by todo based on a TODO comment in d81ef13 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 10, 2020

rename to searchOrdersAction?

// TODO: rename to searchOrdersAction?
public function searchOrdersAction()
{
if(!$this->_authorise()) {
return $this;
}


This comment was generated by todo based on a TODO comment in d81ef13 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 10, 2020

!!: implement this method

// TODO!!: implement this method
$info = Mage::helper('zendesk')->getOrderDetailExtended($order);
$this->getResponse()
->setBody(json_encode($info))
->setHttpResponseCode(200)


This comment was generated by todo based on a TODO comment in d81ef13 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 10, 2020

does this bring back guest cutsomers

// TODO does this bring back guest cutsomers
foreach($customerFilters as $customerKey => $customerValue) {
$customerCollection->addFieldToFilter($customerKey, $customerValue);
}
foreach($generalFilters as $generalKey => $generalValue) {


This comment was generated by todo based on a TODO comment in d81ef13 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 10, 2020

display config version here in UI -->

<!-- TODO: display config version here in UI -->
<zendesk translate="label" module="zendesk">
<label>Zendesk</label>
<class>zendesk-section</class>


This comment was generated by todo based on a TODO comment in d81ef13 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 11, 2020

should this be customerId or entity id??

$id = $order->getCustomerId(); // TODO: should this be customerId or entity id??
$email = $order->getCustomerEmail();
$customer = array();
if ($isGuest){
$customer['type'] = 'guest';


This comment was generated by todo based on a TODO comment in 3c9b180 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 11, 2020

display config version here in UI -->

<!-- TODO: display config version here in UI -->
<zendesk translate="label" module="zendesk">
<label>Zendesk</label>
<class>zendesk-section</class>


This comment was generated by todo based on a TODO comment in 3c9b180 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 15, 2020

display config version here in UI -->

<!-- TODO: display config version here in UI -->
<zendesk translate="label" module="zendesk">
<label>Zendesk</label>
<class>zendesk-section</class>


This comment was generated by todo based on a TODO comment in 7270a84 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 16, 2020

display config version here in UI -->

<!-- TODO: display config version here in UI -->
<zendesk translate="label" module="zendesk">
<label>Zendesk</label>
<class>zendesk-section</class>


This comment was generated by todo based on a TODO comment in fc937ec in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 16, 2020

display config version here in UI -->

<!-- TODO: display config version here in UI -->
<zendesk translate="label" module="zendesk">
<label>Zendesk</label>
<class>zendesk-section</class>


This comment was generated by todo based on a TODO comment in 8fa721a in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 16, 2020

display config version here in UI -->

<!-- TODO: display config version here in UI -->
<zendesk translate="label" module="zendesk">
<label>Zendesk</label>
<class>zendesk-section</class>


This comment was generated by todo based on a TODO comment in 10247cd in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 16, 2020

display config version here in UI -->

<!-- TODO: display config version here in UI -->
<zendesk translate="label" module="zendesk">
<label>Zendesk</label>
<class>zendesk-section</class>


This comment was generated by todo based on a TODO comment in e80f306 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 16, 2020

display config version here in UI -->

<!-- TODO: display config version here in UI -->
<zendesk translate="label" module="zendesk">
<label>Zendesk</label>
<class>zendesk-section</class>


This comment was generated by todo based on a TODO comment in 89bacb6 in #164. cc @agnostack.

@todo
Copy link

todo bot commented Sep 23, 2020

display config version here in UI -->

<!-- TODO: display config version here in UI -->
<zendesk translate="label" module="zendesk">
<label>Zendesk</label>
<class>zendesk-section</class>


This comment was generated by todo based on a TODO comment in 047a2c8 in #164. cc @agnostack.

// TODO!!!!!!!: read version from config.xml
// $configSettings = Mage::getSingleton('Zendesk_Zendesk/config');
// Mage::log(json_encode($configSettings), null, 'zendesk.log');
$this->getResponse()->setHeader('X-Extension-Version', '3.0.0');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello - this should really be inside _authorise after the token is validated, to ensure the version is not exposed to unauthorised clients, as otherwise it could be used to detect vulnerable versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants