Skip to content

Commit

Permalink
Fix storeId passthru for UrlOverride plugin (#7)
Browse files Browse the repository at this point in the history
* Fix storeId passthru for UrlOverride plugin

---------

Co-authored-by: Adam Wysocki <adam.wysocki@tpay.com>
  • Loading branch information
s4ddly and Adam Wysocki authored Aug 22, 2024
1 parent a12a387 commit dc4e3d8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:

permissions:
contents: write
pull-requests: write

jobs:
pull_request:
Expand All @@ -19,13 +20,8 @@ jobs:
name: 'tpay-magento2-graphql'
path: './'

- uses: actions/github-script@v6
- uses: mshick/add-pr-comment@v2
with:
github-token: ${{ secrets.TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Tpay Magento2 GraphQL plugin - ${{ steps.plugin-upload.outputs.artifact-url }}'
})
message: |
Tpay Magento2 GraphQL plugin - ${{ steps.plugin-upload.outputs.artifact-url }}
4 changes: 4 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.4]
### Fixed
- Fix storeId passthru for UrlOverride plugin

## [1.1.2]
### Added
Expand Down
8 changes: 4 additions & 4 deletions Plugin/UrlOverride.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ public function __construct(ConfigurationProvider $tpayConfig)
$this->tpayConfig = $tpayConfig;
}

public function afterGetTpayFormData(TpayPayment $subject, $result, $name, $storeId = 0)
public function afterGetTpayFormData(TpayPayment $subject, $result)
{
$successUrl = $this->tpayConfig->getConfigData('graphql_url_override/success_url', $storeId);
$errorUrl = $this->tpayConfig->getConfigData('graphql_url_override/error_url', $storeId);
$notificationUrl = $this->tpayConfig->getConfigData('graphql_url_override/notification_url', $storeId);
$successUrl = $this->tpayConfig->getConfigData('graphql_url_override/success_url', $subject->getStore());
$errorUrl = $this->tpayConfig->getConfigData('graphql_url_override/error_url', $subject->getStore());
$notificationUrl = $this->tpayConfig->getConfigData('graphql_url_override/notification_url', $subject->getStore());

if (!empty($successUrl)) {
$result['return_url'] = $successUrl;
Expand Down

0 comments on commit dc4e3d8

Please sign in to comment.