Skip to content
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

BC-918 fix cancel coupon #48

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/Resources/Shop/PromotionsResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ public function applyCoupon($basketId, string $couponCode)
*/
public function cancelCoupon($basketId, string $couponCode, $userId)
{
$params = [
"basketId" => $basketId,
"couponCode" => $couponCode,
"userId" => $userId
];
$params = [
"basketId" => $basketId,
"couponCode" => $couponCode,
"userId" => $userId,
"method" => 'discardcoupon'
];

$response = $this->handler->handle('POST', $params, 'discard');
$response = $this->handler->handle('POST', $params);
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you check it?
Now you miss part of URL
Please connect to Gateway and check from TEST


//TODO: refactor to make method
return $response;
Expand Down