-
Notifications
You must be signed in to change notification settings - Fork 16
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
PO-120 (Opencart<> Opencart Deprecated error) #165
Changes from 5 commits
fdca454
e749b7a
185171c
3767048
ec28b4b
94244e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# This file is for unifying the coding style for different editors and IDEs | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rohitcbr please remove this file. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @yashgit891 removed in this commit 94244e8 |
||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[**.php] | ||
indent_style = space | ||
indent_size = 4 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: feature.md | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rohitcbr Please remove .github folder There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @yashgit891 removed in this commit 94244e8 |
||
description: Submit a proposal for a new feature | ||
title: '[Feature]: ' | ||
labels: [':rocket: Feature Request'] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
### Thank you for taking the time to suggest a new feature! | ||
We kindly ask that you search to see if an issue [already exists](https://github.com/razorpay/razorpay-php/issues?q=is%3Aissue+sort%3Acreated-desc+) for your feature. | ||
We are also happy to accept contributions from our users. | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: '🚀 Feature Proposal' | ||
description: | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: solution | ||
attributes: | ||
label: Suggested Solution | ||
description: | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: alternatives | ||
attributes: | ||
label: Alternatives | ||
description: | ||
validations: | ||
required: false | ||
- type: textarea | ||
id: extra | ||
attributes: | ||
label: Additional Information | ||
description: | ||
validations: | ||
required: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: issue.md | ||
description: Create a report to help us improve | ||
labels: ["issue"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to fill out this issue report! | ||
- type: textarea | ||
id: repro-steps | ||
attributes: | ||
label: Steps to reproduce the behavior | ||
description: | ||
placeholder: | | ||
1. Fetch a '...' | ||
2. Update the '....' | ||
3. See error | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: expected-behavior | ||
attributes: | ||
label: Expected behavior | ||
description: A clear and concise description of what you expected to happen. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: actual-behavior | ||
attributes: | ||
label: Actual behavior | ||
description: A clear and concise description of what actually happen. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: code-snippets | ||
attributes: | ||
label: Code snippets | ||
description: If applicable, add code snippets to help explain your problem. | ||
render: Php | ||
validations: | ||
required: false | ||
- type: input | ||
id: language-version | ||
attributes: | ||
label: Php version | ||
placeholder: Php v7.4 | ||
validations: | ||
required: true | ||
- type: input | ||
id: lib-version | ||
attributes: | ||
label: Library version | ||
placeholder: razorpay-php v2.8.4 | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: additional-context | ||
attributes: | ||
label: Additional Information | ||
description: Add any other information about the problem here. | ||
validations: | ||
required: false |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: composer | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "04:00" | ||
timezone: Asia/Calcutta |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## Note :- Please follow the below points while attaching test cases document link below: | ||
### - If label `Tested` is added then test cases document URL is mandatory. | ||
### - Link added should be a valid URL and accessible throughout the org. | ||
### - If the branch name contains hotfix / revert by default the BVT workflow check will pass. | ||
|
||
| Test Case Document URL | | ||
|-----------------------------------------------| | ||
| Please paste test case document link here.... | |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+* | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up php 8.0 | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.0' | ||
- name: 'Create env file' | ||
run: | | ||
touch ${{ github.workspace }}/tests/.env | ||
echo RAZORPAY_API_KEY=${{ secrets.RAZORPAY_API_KEY }} >> ${{ github.workspace }}/tests/.env | ||
echo RAZORPAY_API_SECRET=${{ secrets.RAZORPAY_API_SECRET }} >> ${{ github.workspace }}/tests/.env | ||
cat ${{ github.workspace }}/tests/.env | ||
- name: Install dependencies | ||
run: composer self-update && composer install && composer require vlucas/phpdotenv && composer dump-autoload | ||
- name: Run tests and collect coverage | ||
run: vendor/bin/phpunit ./tests/CoverageTest.php --coverage-clover coverage.xml . | ||
env: | ||
RAZORPAY_API_KEY: ${{ secrets.RAZORPAY_API_KEY }} | ||
RAZORPAY_API_SECRET: ${{ secrets.RAZORPAY_API_SECRET }} | ||
RAZORPAY_PARTNER_API_KEY: ${{ secrets.RAZORPAY_PARTNER_API_KEY }} | ||
RAZORPAY_PARTNER_API_SECRET: ${{ secrets.RAZORPAY_PARTNER_API_SECRET }} | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: SecurityChecks | ||
on: | ||
pull_request: {} | ||
push: | ||
branches: ["master"] | ||
schedule: | ||
- cron: '30 20 * * *' | ||
jobs: | ||
semgrep: | ||
name: Semgrep | ||
runs-on: [ubuntu-latest] | ||
container: | ||
image: returntocorp/semgrep | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Run semgrep | ||
run: semgrep ci | ||
env: | ||
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} | ||
|
||
workflow_status: | ||
runs-on: [ ubuntu-latest ] # nosemgrep : semgrep.dev/s/swati31196:github_provided_runner | ||
name: Update Status Check | ||
needs: [ semgrep ] | ||
if: always() | ||
env: | ||
githubCommit: ${{ github.event.pull_request.head.sha }} | ||
steps: | ||
- name: Set github commit id | ||
run: | | ||
if [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "schedule" ]; then | ||
echo "githubCommit=${{ github.sha }}" >> $GITHUB_ENV | ||
fi | ||
exit 0 | ||
- name: Failed | ||
id: failed | ||
if: (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) && github.ref != 'refs/heads/master' | ||
run: | | ||
echo 'Failing the workflow for github security status check.' | ||
curl -X POST -H "Content-Type: application/json" -H "Authorization: token ${{ github.token }}" \ | ||
-d '{ "state" : "failure" , "context" : "github/security-status-check" , "description" : "github/security-status-check", "target_url" : "https://github.com/${{ github.repository }}" }' \ | ||
https://api.github.com/repos/${{ github.repository }}/statuses/${{ env.githubCommit }} | ||
exit 1 | ||
- name: Success | ||
if: steps.failed.conclusion == 'skipped' || github.ref != 'refs/heads/master' | ||
run: | | ||
echo 'Status check has passed!' | ||
curl -X POST -H "Content-Type: application/json" -H "Authorization: token ${{ github.token }}" \ | ||
-d '{ "state" : "success" , "context" : "github/security-status-check" , "description" : "github/security-status-check", "target_url" : "https://github.com/${{ github.repository }}" }' \ | ||
https://api.github.com/repos/${{ github.repository }}/statuses/${{ env.githubCommit }} | ||
exit 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
composer.lock | ||
phpunit.xml | ||
vendor/ | ||
reports/ | ||
**/.DS_Store |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
dist: precise | ||
language: php | ||
php: | ||
- 7.3 | ||
- 7.4 | ||
- 8.0 | ||
- 8.1 | ||
|
||
install: composer install | ||
before_script: | ||
- cp phpunit.xml.dist phpunit.xml | ||
# These two are required in the build step for non-composer-tests | ||
- mkdir -p libs | ||
- cd libs && wget https://github.com/rmccue/Requests/archive/v2.0.4.zip -O requests.zip && unzip requests.zip && rm requests.zip && cd .. | ||
- rm -rf libs/Requests-2.0.4/examples libs/Requests-2.0.4/docs libs/Requests-2.0.4/bin libs/Requests-2.0.4/tests | ||
script: | ||
# Run a syntax validation check on all PHP files | ||
- find . -path ./vendor -prune -o -iname '*.php' |xargs -n1 php -l | ||
- ./vendor/bin/phpunit | ||
|
||
notifications: | ||
slack: | ||
secure: fLT1x7BCXi8+sP1Qk1lP74+60JIBCw2clUTSOmB0OuoQGWYIJ4qelKcGH5FFsADGuC1GX2pf0fKRiLdavVrGpBkD4MGFPpyYKPYb0S/FyArN3PjdaNvAqE1VgQCtKkbugP5bHH9bp631+lo2EGQVLWTjlwiijWbCEyDu3L0YVMY= | ||
# We are doing the releases for non-composer folks | ||
# So this includes the vendor directory | ||
before_deploy: | ||
- echo $TRAVIS_TAG > version.txt | ||
- cat release.txt |zip -r@ "razorpay-php.zip" | ||
deploy: | ||
provider: releases | ||
# Otherwise, we lose the vendor/ directory | ||
skip_cleanup: true | ||
api_key: | ||
secure: bHcu1jUASH6aVSD1LmzXdjQC4hc0o8EBbVs9X8e5j+/OC7+UuBBRu+jh6gQje/XWu9Nj1W2LkWhv0IKX1tJbcs0uRstggx+xC0ZayRzkscsqErqeM4WeyJjxe5ewb2eeGujtl9+WWFB3wpUQJtxXaaPuGYtroYGGYuI23wzKN4A= | ||
# travis doesn't support multi file deployes yet, not that we need them | ||
file: razorpay-php.zip | ||
on: | ||
# Only do the release for one build every tag | ||
php: 7.3 | ||
# GitHub refuses to accept releases that are not tagged | ||
tags: true | ||
# Allow builds for non-master branches as well | ||
all_branches: true | ||
# Only do the releases if the repo is not a fork | ||
repo: razorpay/razorpay-php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rohitcbr please put platform as OpenCart.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yashgit891 updated here
razorpay-opencart/admin/language/en-gb/extension/payment/razorpay.php
Line 115 in 94244e8