├── .distignore
├── .github
├── CONTRIBUTING.md
└── workflows
│ ├── codeql-analysis.yml
│ └── deploy.yml
├── .gitignore
├── .wordpress-org
├── banner-1544x500-rtl.png
├── banner-1544x500.png
├── banner-772x250-rtl.png
├── banner-772x250.png
├── icon-256x256.png
├── icon.png
├── screenshot-1.png
└── screenshot-2.png
├── LICENSE.txt
├── README.md
├── assets
├── css
│ ├── email-invoice.css
│ ├── email-receipt-owner.css
│ ├── email-receipt.css
│ ├── font-awesome.min.css
│ ├── paystack-admin.css
│ ├── paystack-admin.css.map
│ ├── paystack-admin.scss
│ └── pff-paystack.css
├── fonts
│ ├── Graphik-Black.otf
│ ├── Graphik-BlackItalic.otf
│ ├── Graphik-Bold.otf
│ ├── Graphik-BoldItalic.otf
│ ├── Graphik-Extralight.otf
│ ├── Graphik-ExtralightItalic.otf
│ ├── Graphik-Light.otf
│ ├── Graphik-LightItalic.otf
│ ├── Graphik-Medium.otf
│ ├── Graphik-MediumItalic.otf
│ ├── Graphik-Regular.otf
│ ├── Graphik-RegularItalic.otf
│ ├── Graphik-Semibold.otf
│ ├── Graphik-SemiboldItalic.otf
│ ├── Graphik-Super.otf
│ ├── Graphik-SuperItalic.otf
│ ├── Graphik-Thin.otf
│ ├── Graphik-ThinItalic.otf
│ ├── fontawesome-webfont-.eot
│ ├── fontawesome-webfont-v=4.2.0.eot
│ ├── fontawesome-webfont-v=4.2.0.svg
│ ├── fontawesome-webfont-v=4.2.0.ttf
│ └── fontawesome-webfont-v=4.2.0.woff
├── images
│ ├── cardlogos.png
│ ├── logo.png
│ └── logos@2x.png
└── js
│ ├── jquery.blockUI.min.js
│ ├── paystack-admin.js
│ ├── paystack-public.js
│ └── tinymce-plugin.js
├── includes
└── classes
│ ├── class-activation.php
│ ├── class-api.php
│ ├── class-confirm-payment.php
│ ├── class-email-invoice.php
│ ├── class-email-receipt-owner.php
│ ├── class-email-receipt.php
│ ├── class-email.php
│ ├── class-field-shortcodes.php
│ ├── class-form-shortcode.php
│ ├── class-form-submit.php
│ ├── class-forms-list.php
│ ├── class-forms-update.php
│ ├── class-helpers.php
│ ├── class-payments-list-table.php
│ ├── class-paystack-forms.php
│ ├── class-request-plan.php
│ ├── class-request-subscription.php
│ ├── class-retry-submit.php
│ ├── class-settings.php
│ ├── class-setup.php
│ ├── class-submissions.php
│ ├── class-tinymce-plugin.php
│ ├── class-transaction-fee.php
│ ├── class-transaction-verify.php
│ └── deprecated.php
├── index.php
├── languages
├── pff-paystack-en_EN.mo
├── pff-paystack-en_EN.po
├── pff-paystack-en_US.mo
├── pff-paystack-en_US.po
└── pff-paystack.pot
├── package.json
├── paystack-forms.php
└── readme.txt
/.distignore:
--------------------------------------------------------------------------------
1 | /.wordpress-org
2 | /.git
3 | /.github
4 | /node_modules
5 |
6 | .distignore
7 | .gitignore
--------------------------------------------------------------------------------
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # How To Contribute
2 |
3 | Community made patches, bug reports and contributions are always welcome for Paystack plugins and libraries.
4 |
5 | When contributing please ensure you follow the guidelines below to help us keep on top of things.
6 |
7 | __Please Note:__
8 |
9 | GitHub is for _bug reports and contributions only_ - if you have a support question or a request for a customization this is not the right place to post it. Please reach out by
10 |
11 | - sending a message from [our website](https://paystack.com/contact).
12 | - posting a question on the plugin support forum.
13 |
14 | ## Contributing to Plugin
15 |
16 | ### Reporting Issues
17 |
18 | Reporting issues is a great way to became a contributor as it doesn't require technical skills. In fact you don't even need to know a programming language or to be able to check the code itself, you just need to make sure that everything works as expected and [submit an issue report](https://github.com/PaystackHQ/wordpress-payment-forms-for-paystack/issues/new) if you spot a bug. Sound like something you're up for? Go for it!
19 |
20 | #### How To Submit An Issue Report
21 |
22 | If something isn't working, congratulations you've found a bug! Help us fix it by submitting an issue report:
23 |
24 | * Make sure you have a [GitHub account](https://github.com/signup/free)
25 | * Search the [Existing Issues](https://github.com/PaystackHQ/wordpress-payment-forms-for-paystack/issues) to be sure that the one you've noticed isn't already there
26 | * Submit a report for your issue
27 | * Clearly describe the issue (including steps to reproduce it if it's a bug)
28 | * Make sure you fill in the earliest version that you know has the issue.
29 |
30 | ### Making Changes
31 |
32 | If you believe you have an improvement to the plugin, please feel free to send a pull request so we can review and merge.
33 |
34 | #### How To Submit A PR
35 |
36 | * Fork the repository on GitHub
37 | * Clone the repository into your local system and create a branch that describes what you are working on by prefixing with `feature/`, `fix/`, `chore/`and so on followed by the title of the fix or feature.
38 | * Make the changes to your forked repository's branch. Ensure you are using [PHP Coding Standards (PHPCS)](https://github.com/squizlabs/PHP_CodeSniffer)
39 | * Make commits that are descriptive and breaks down the process.
40 | * Please **don't** modify the changelog - this will be maintained by Paystack developers.
41 | * Push your fix to the remote version of your branch and create a PR that aims to merge that branch into `master`.
42 |
43 | After you follow the step above, the next stage will be waiting on us to merge your Pull Request. We review them all, and make suggestions and changes as and if necessary.
44 |
45 | # Additional Resources
46 |
47 | * [General GitHub documentation](https://help.github.com/)
48 | * [GitHub pull request documentation](https://help.github.com/articles/about-pull-requests/)
49 | * [Paystack Documentation](https://developers.paystack.co/v1.0/docs/)
50 | * [Paystack Helpdesk](https://paystack.com/help)
--------------------------------------------------------------------------------
/.github/workflows/codeql-analysis.yml:
--------------------------------------------------------------------------------
1 | # For most projects, this workflow file will not need changing; you simply need
2 | # to commit it to your repository.
3 | #
4 | # You may wish to alter this file to override the set of languages analyzed,
5 | # or to provide custom queries or build logic.
6 | #
7 | # ******** NOTE ********
8 | # We have attempted to detect the languages in your repository. Please check
9 | # the `language` matrix defined below to confirm you have the correct set of
10 | # supported CodeQL languages.
11 | #
12 | name: "CodeQL"
13 |
14 | on:
15 | push:
16 | branches: [ master ]
17 | pull_request:
18 | # The branches below must be a subset of the branches above
19 | branches: [ master ]
20 | schedule:
21 | - cron: '20 2 * * 5'
22 |
23 | jobs:
24 | analyze:
25 | name: Analyze
26 | runs-on: ubuntu-latest
27 | permissions:
28 | actions: read
29 | contents: read
30 | security-events: write
31 |
32 | strategy:
33 | fail-fast: false
34 | matrix:
35 | language: [ 'javascript' ]
36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37 | # Learn more:
38 | # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
39 |
40 | steps:
41 | - name: Checkout repository
42 | uses: actions/checkout@v2
43 |
44 | # Initializes the CodeQL tools for scanning.
45 | - name: Initialize CodeQL
46 | uses: github/codeql-action/init@v1
47 | with:
48 | languages: ${{ matrix.language }}
49 | # If you wish to specify custom queries, you can do so here or in a config file.
50 | # By default, queries listed here will override any specified in a config file.
51 | # Prefix the list here with "+" to use these queries and those in the config file.
52 | # queries: ./path/to/local/query, your-org/your-repo/queries@main
53 |
54 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55 | # If this step fails, then you should remove it and run the build manually (see below)
56 | - name: Autobuild
57 | uses: github/codeql-action/autobuild@v1
58 |
59 | # ℹ️ Command-line programs to run using the OS shell.
60 | # 📚 https://git.io/JvXDl
61 |
62 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63 | # and modify them (or add more) to build your code if your project
64 | # uses a compiled language
65 |
66 | #- run: |
67 | # make bootstrap
68 | # make release
69 |
70 | - name: Perform CodeQL Analysis
71 | uses: github/codeql-action/analyze@v1
72 |
--------------------------------------------------------------------------------
/.github/workflows/deploy.yml:
--------------------------------------------------------------------------------
1 | name: Deploy to WordPress.org
2 | on:
3 | release:
4 | types: [published]
5 | jobs:
6 | tag:
7 | name: New release
8 | runs-on: ubuntu-latest
9 | steps:
10 | - name: Checkout code
11 | uses: actions/checkout@v2
12 | - name: WordPress Plugin Deploy
13 | id: deploy
14 | uses: 10up/action-wordpress-plugin-deploy@stable
15 | with:
16 | generate-zip: true
17 | env:
18 | SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
19 | SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
20 | SLUG: payment-forms-for-paystack
21 | - name: Upload release asset
22 | uses: actions/upload-release-asset@v1
23 | env:
24 | GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
25 | with:
26 | upload_url: ${{ github.event.release.upload_url }}
27 | asset_path: ${{ steps.deploy.outputs.zip-path }}
28 | asset_name: ${{ github.event.repository.name }}.zip
29 | asset_content_type: application/zip
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
--------------------------------------------------------------------------------
/.wordpress-org/banner-1544x500-rtl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/.wordpress-org/banner-1544x500-rtl.png
--------------------------------------------------------------------------------
/.wordpress-org/banner-1544x500.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/.wordpress-org/banner-1544x500.png
--------------------------------------------------------------------------------
/.wordpress-org/banner-772x250-rtl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/.wordpress-org/banner-772x250-rtl.png
--------------------------------------------------------------------------------
/.wordpress-org/banner-772x250.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/.wordpress-org/banner-772x250.png
--------------------------------------------------------------------------------
/.wordpress-org/icon-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/.wordpress-org/icon-256x256.png
--------------------------------------------------------------------------------
/.wordpress-org/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/.wordpress-org/icon.png
--------------------------------------------------------------------------------
/.wordpress-org/screenshot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/.wordpress-org/screenshot-1.png
--------------------------------------------------------------------------------
/.wordpress-org/screenshot-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/.wordpress-org/screenshot-2.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Payment Forms for Paystack
4 |
5 | Welcome to the Paysment Forms for Paystack repository on GitHub. Here you can browse the source, look at open issues and keep track of development.
6 |
7 | If you are a developer, you can join our Developer Community on [Slack](https://slack.paystack.com).
8 |
9 | ## Installation
10 |
11 | 1. Install the [Payment Forms for Paystack](https://wordpress.org/plugins/payment-forms-for-paystack/) via the Plugins section of your WordPress Dashboard.
12 | 2. For configuration options, please visit our [Help Desk](https://support.paystack.com/hc/en-us/articles/360009881260-How-to-set-up-Paystack-Payment-Forms-for-WordPress).
13 |
14 | ## Documentation
15 | * [Paystack Documentation](https://paystack.com/docs)
16 | * [Paystack Helpdesk](https://paystack.com/help)
17 |
18 | ## Support
19 | This repository is not suitable for general Paystack support. Please use the issue tracker for bug reports and feature requests directly related to this plugin. For general support, you can reach out by
20 |
21 | * sending a message from [our website](https://paystack.com/contact).
22 | * posting an issues on the plugin [support forum](https://wordpress.org/support/plugin/payment-forms-for-paystack).
23 |
24 | ## Contributing to Payment Forms for Paystack
25 |
26 | If you have a patch or have stumbled upon an issue with the Paystack Gateway for Payment Forms for Paystack plugin, you can contribute this back to the code. Please read our [contributor guidelines](https://github.com/PaystackHQ/wordpress-payment-forms-for-paystack/blob/master/.github/CONTRIBUTING.md) for more information how you can do this.
27 |
--------------------------------------------------------------------------------
/assets/css/email-invoice.css:
--------------------------------------------------------------------------------
1 | body {
2 | Margin: 0;
3 | padding: 0;
4 | min-width: 100%
5 | }
6 |
7 | a,
8 | #outlook a {
9 | display: inline-block
10 | }
11 |
12 | a,
13 | a span {
14 | text-decoration: none
15 | }
16 |
17 | img {
18 | line-height: 1;
19 | outline: 0;
20 | border: 0;
21 | text-decoration: none;
22 | -ms-interpolation-mode: bicubic;
23 | mso-line-height-rule: exactly
24 | }
25 |
26 | table {
27 | border-spacing: 0;
28 | mso-table-lspace: 0;
29 | mso-table-rspace: 0
30 | }
31 |
32 | td {
33 | padding: 0
34 | }
35 |
36 | .email_summary {
37 | display: none;
38 | font-size: 1px;
39 | line-height: 1px;
40 | max-height: 0;
41 | max-width: 0;
42 | opacity: 0;
43 | overflow: hidden
44 | }
45 |
46 | .font_default,
47 | h1,
48 | h2,
49 | h3,
50 | h4,
51 | h5,
52 | h6,
53 | p,
54 | a {
55 | font-family: Helvetica, Arial, sans-serif
56 | }
57 |
58 | small {
59 | font-size: 86%;
60 | font-weight: normal
61 | }
62 |
63 | .pricing_box_cell small {
64 | font-size: 74%
65 | }
66 |
67 | .font_default,
68 | p {
69 | font-size: 15px
70 | }
71 |
72 | p {
73 | line-height: 23px;
74 | Margin-top: 16px;
75 | Margin-bottom: 24px
76 | }
77 |
78 | .lead {
79 | font-size: 19px;
80 | line-height: 27px;
81 | Margin-bottom: 16px
82 | }
83 |
84 | .header_cell .column_cell {
85 | font-size: 20px;
86 | font-weight: bold
87 | }
88 |
89 | .header_cell p {
90 | margin-bottom: 0
91 | }
92 |
93 | h1,
94 | h2,
95 | h3,
96 | h4,
97 | h5,
98 | h6 {
99 | Margin-left: 0;
100 | Margin-right: 0;
101 | Margin-top: 16px;
102 | Margin-bottom: 8px;
103 | padding: 0
104 | }
105 |
106 | .line-through {
107 | text-decoration: line-through
108 | }
109 |
110 | h1,
111 | h2 {
112 | font-size: 26px;
113 | line-height: 36px;
114 | font-weight: bold
115 | }
116 |
117 | .pricing_box h1,
118 | .pricing_box h2,
119 | .primary_pricing_box h1,
120 | .primary_pricing_box h2 {
121 | line-height: 20px;
122 | Margin-top: 16px;
123 | Margin-bottom: 0
124 | }
125 |
126 | h3,
127 | h4 {
128 | font-size: 22px;
129 | line-height: 30px;
130 | font-weight: bold
131 | }
132 |
133 | h5 {
134 | font-size: 18px;
135 | line-height: 26px;
136 | font-weight: bold
137 | }
138 |
139 | h6 {
140 | font-size: 16px;
141 | line-height: 24px;
142 | font-weight: bold
143 | }
144 |
145 | .primary_btn td,
146 | .secondary_btn td {
147 | font-size: 16px;
148 | mso-line-height-rule: exactly
149 | }
150 |
151 | .primary_btn a,
152 | .secondary_btn a {
153 | font-weight: bold
154 | }
155 |
156 | .email_body {
157 | padding: 32px 10px;
158 | text-align: center
159 | }
160 |
161 | .email_container,
162 | .row,
163 | .col-1,
164 | .col-13,
165 | .col-2,
166 | .col-3 {
167 | display: inline-block;
168 | width: 100%;
169 | vertical-align: top;
170 | text-align: center
171 | }
172 |
173 | .email_container {
174 | width: 100%;
175 | margin: 0 auto
176 | }
177 |
178 | .email_container,
179 | .row,
180 | .col-3 {
181 | max-width: 580px
182 | }
183 |
184 | .col-1 {
185 | max-width: 190px
186 | }
187 |
188 | .col-2 {
189 | max-width: 290px
190 | }
191 |
192 | .col-13 {
193 | max-width: 390px
194 | }
195 |
196 | .row {
197 | margin: 0 auto
198 | }
199 |
200 | .column {
201 | width: 100%;
202 | vertical-align: top
203 | }
204 |
205 | .column_cell {
206 | padding: 16px;
207 | text-align: center;
208 | vertical-align: top
209 | }
210 |
211 | .col-bottom-0 .column_cell {
212 | padding-bottom: 0
213 | }
214 |
215 | .col-top-0 .column_cell {
216 | padding-top: 0
217 | }
218 |
219 | .email_container,
220 | .header_cell,
221 | .jumbotron_cell,
222 | .content_cell,
223 | .footer_cell,
224 | .image_responsive {
225 | font-size: 0 !important;
226 | text-align: center
227 | }
228 |
229 | .header_cell,
230 | .footer_cell {
231 | padding-bottom: 16px
232 | }
233 |
234 | .header_cell .column_cell,
235 | .footer_cell .col-13 .column_cell,
236 | .footer_cell .col-1 .column_cell {
237 | text-align: left;
238 | padding-top: 16px
239 | }
240 |
241 | .header_cell {
242 | -webkit-border-radius: 4px 4px 0 0;
243 | border-radius: 4px 4px 0 0
244 | }
245 |
246 | .header_cell img {
247 | max-width: 156px;
248 | height: auto
249 | }
250 |
251 | .footer_cell {
252 | text-align: center;
253 | -webkit-border-radius: 0 0 4px 4px;
254 | border-radius: 0 0 4px 4px
255 | }
256 |
257 | .footer_cell p {
258 | Margin: 16px 0
259 | }
260 |
261 | .invoice_cell .column_cell {
262 | text-align: left;
263 | padding-top: 0;
264 | padding-bottom: 0
265 | }
266 |
267 | .invoice_cell p {
268 | margin-top: 8px;
269 | margin-bottom: 16px
270 | }
271 |
272 | .pricing_box {
273 | border-collapse: separate;
274 | padding: 10px 16px;
275 | -webkit-border-radius: 4px;
276 | border-radius: 4px
277 | }
278 |
279 | .primary_pricing_box {
280 | border-collapse: separate;
281 | padding: 18px 16px;
282 | -webkit-border-radius: 4px;
283 | border-radius: 4px
284 | }
285 |
286 | .text_quote .column_cell {
287 | border-left: 4px solid;
288 | text-align: left;
289 | padding-right: 0;
290 | padding-top: 0;
291 | padding-bottom: 0
292 | }
293 |
294 | .primary_btn,
295 | .secondary_btn {
296 | clear: both;
297 | margin: 0 auto
298 | }
299 |
300 | .primary_btn td,
301 | .secondary_btn td {
302 | text-align: center;
303 | vertical-align: middle;
304 | padding: 12px 24px;
305 | -webkit-border-radius: 4px;
306 | border-radius: 4px
307 | }
308 |
309 | .primary_btn a,
310 | .primary_btn span,
311 | .secondary_btn a,
312 | .secondary_btn span {
313 | text-align: center;
314 | display: block
315 | }
316 |
317 | .label .font_default {
318 | font-size: 10px;
319 | font-weight: bold;
320 | text-transform: uppercase;
321 | letter-spacing: 2px;
322 | padding: 3px 7px;
323 | -webkit-border-radius: 2px;
324 | border-radius: 2px;
325 | white-space: nowrap
326 | }
327 |
328 | .icon_holder,
329 | .hruler {
330 | width: 62px;
331 | margin-left: auto;
332 | margin-right: auto;
333 | clear: both
334 | }
335 |
336 | .icon_holder {
337 | width: 48px
338 | }
339 |
340 | .hspace,
341 | .hruler_cell {
342 | font-size: 0;
343 | height: 8px;
344 | overflow: hidden
345 | }
346 |
347 | .hruler_cell {
348 | height: 4px;
349 | line-height: 4px
350 | }
351 |
352 | .icon_cell {
353 | font-size: 0;
354 | line-height: 1;
355 | -webkit-border-radius: 80px;
356 | border-radius: 80px;
357 | padding: 8px;
358 | height: 48px
359 | }
360 |
361 | .product_row {
362 | padding: 0 0 16px
363 | }
364 |
365 | .product_row .column_cell {
366 | padding: 16px 16px 0
367 | }
368 |
369 | .image_thumb img {
370 | -webkit-border-radius: 4px;
371 | border-radius: 4px
372 | }
373 |
374 | .product_row .col-13 .column_cell {
375 | text-align: left
376 | }
377 |
378 | .product_row h6 {
379 | Margin-top: 0
380 | }
381 |
382 | .product_row p {
383 | Margin-top: 8px;
384 | Margin-bottom: 8px
385 | }
386 |
387 | .order_total_right .column_cell {
388 | text-align: right
389 | }
390 |
391 | .order_total_left .column_cell {
392 | text-align: left
393 | }
394 |
395 | .order_total p {
396 | Margin: 8px 0
397 | }
398 |
399 | .order_total h2 {
400 | Margin: 8px 0
401 | }
402 |
403 | .image_responsive img {
404 | display: block;
405 | width: 100%;
406 | height: auto;
407 | max-width: 580px;
408 | margin-left: auto;
409 | margin-right: auto
410 | }
411 |
412 | body,
413 | .email_body {
414 | background-color: #f2f2f2
415 | }
416 |
417 | .header_cell,
418 | .footer_cell,
419 | .content_cell {
420 | background-color: #fff
421 | }
422 |
423 | .secondary_btn td,
424 | .icon_primary .icon_cell,
425 | .primary_pricing_box {
426 | background-color: #ffb26b
427 | }
428 |
429 | .jumbotron_cell,
430 | .pricing_box {
431 | background-color: #fafafa
432 | }
433 |
434 | .primary_btn td,
435 | .label .font_default {
436 | background-color: #666
437 | }
438 |
439 | .icon_secondary .icon_cell {
440 | background-color: #dbdbdb
441 | }
442 |
443 | .label_1 .font_default {
444 | background-color: #62a9dd
445 | }
446 |
447 | .label_2 .font_default {
448 | background-color: #8965ad
449 | }
450 |
451 | .label_3 .font_default {
452 | background-color: #df6164
453 | }
454 |
455 | .primary_btn a,
456 | .primary_btn span,
457 | .secondary_btn a,
458 | .secondary_btn span,
459 | .label .font_default,
460 | .primary_pricing_box,
461 | .primary_pricing_box h1,
462 | .primary_pricing_box small {
463 | color: #fff
464 | }
465 |
466 | h2,
467 | h4,
468 | h5,
469 | h6 {
470 | color: #666
471 | }
472 |
473 | .column_cell {
474 | color: #888
475 | }
476 |
477 | h1,
478 | h3,
479 | a,
480 | a span,
481 | .text-secondary,
482 | .column_cell .text-secondary,
483 | .content_cell h2 .text-secondary {
484 | color: #ffb26b
485 | }
486 |
487 | .footer_cell a,
488 | .footer_cell a span {
489 | color: #7a7a7a
490 | }
491 |
492 | .text-muted,
493 | .footer_cell .column_cell,
494 | .content h4 span,
495 | .content h3 span {
496 | color: #b3b3b5
497 | }
498 |
499 | .footer_cell,
500 | .product_row,
501 | .order_total {
502 | border-top: 1px solid
503 | }
504 |
505 | .product_row,
506 | .order_total,
507 | .icon_secondary .icon_cell,
508 | .footer_cell,
509 | .content .product_row,
510 | .content .order_total,
511 | .pricing_box,
512 | .text_quote .column_cell {
513 | border-color: #f2f2f2
514 | }
515 |
516 | @media screen {
517 |
518 | h1,
519 | h2,
520 | h3,
521 | h4,
522 | h5,
523 | h6,
524 | p,
525 | a,
526 | .font_default {
527 | font-family: "Noto Sans", Helvetica, Arial, sans-serif !important
528 | }
529 |
530 | .primary_btn td,
531 | .secondary_btn td {
532 | padding: 0 !important
533 | }
534 |
535 | .primary_btn a,
536 | .secondary_btn a {
537 | padding: 12px 24px !important
538 | }
539 | }
540 |
541 | @media screen and (min-width:631px) and (max-width:769px) {
542 |
543 | .col-1,
544 | .col-2,
545 | .col-3,
546 | .col-13 {
547 | float: left !important
548 | }
549 |
550 | .col-1 {
551 | width: 200px !important
552 | }
553 |
554 | .col-2 {
555 | width: 300px !important
556 | }
557 | }
558 |
559 | @media screen and (max-width:630px) {
560 | .jumbotron_cell {
561 | background-size: cover !important
562 | }
563 | .row,
564 | .col-1,
565 | .col-13,
566 | .col-2,
567 | .col-3 {
568 | max-width: 100% !important
569 | }
570 | }
--------------------------------------------------------------------------------
/assets/css/email-receipt-owner.css:
--------------------------------------------------------------------------------
1 | body {
2 | Margin: 0;
3 | padding: 0;
4 | min-width: 100%
5 | }
6 |
7 | a,
8 | #outlook a {
9 | display: inline-block
10 | }
11 |
12 | a,
13 | a span {
14 | text-decoration: none
15 | }
16 |
17 | img {
18 | line-height: 1;
19 | outline: 0;
20 | border: 0;
21 | text-decoration: none;
22 | -ms-interpolation-mode: bicubic;
23 | mso-line-height-rule: exactly
24 | }
25 |
26 | table {
27 | border-spacing: 0;
28 | mso-table-lspace: 0;
29 | mso-table-rspace: 0
30 | }
31 |
32 | td {
33 | padding: 0
34 | }
35 |
36 | .email_summary {
37 | display: none;
38 | font-size: 1px;
39 | line-height: 1px;
40 | max-height: 0;
41 | max-width: 0;
42 | opacity: 0;
43 | overflow: hidden
44 | }
45 |
46 | .font_default,
47 | h1,
48 | h2,
49 | h3,
50 | h4,
51 | h5,
52 | h6,
53 | p,
54 | a {
55 | font-family: Helvetica, Arial, sans-serif
56 | }
57 |
58 | small {
59 | font-size: 86%;
60 | font-weight: normal
61 | }
62 |
63 | .pricing_box_cell small {
64 | font-size: 74%
65 | }
66 |
67 | .font_default,
68 | p {
69 | font-size: 15px
70 | }
71 |
72 | p {
73 | line-height: 23px;
74 | Margin-top: 16px;
75 | Margin-bottom: 24px
76 | }
77 |
78 | .lead {
79 | font-size: 19px;
80 | line-height: 27px;
81 | Margin-bottom: 16px
82 | }
83 |
84 | .header_cell .column_cell {
85 | font-size: 20px;
86 | font-weight: bold
87 | }
88 |
89 | .header_cell p {
90 | margin-bottom: 0
91 | }
92 |
93 | h1,
94 | h2,
95 | h3,
96 | h4,
97 | h5,
98 | h6 {
99 | Margin-left: 0;
100 | Margin-right: 0;
101 | Margin-top: 16px;
102 | Margin-bottom: 8px;
103 | padding: 0
104 | }
105 |
106 | .line-through {
107 | text-decoration: line-through
108 | }
109 |
110 | h1,
111 | h2 {
112 | font-size: 26px;
113 | line-height: 36px;
114 | font-weight: bold
115 | }
116 |
117 | .pricing_box h1,
118 | .pricing_box h2,
119 | .primary_pricing_box h1,
120 | .primary_pricing_box h2 {
121 | line-height: 20px;
122 | Margin-top: 16px;
123 | Margin-bottom: 0
124 | }
125 |
126 | h3,
127 | h4 {
128 | font-size: 22px;
129 | line-height: 30px;
130 | font-weight: bold
131 | }
132 |
133 | h5 {
134 | font-size: 18px;
135 | line-height: 26px;
136 | font-weight: bold
137 | }
138 |
139 | h6 {
140 | font-size: 16px;
141 | line-height: 24px;
142 | font-weight: bold
143 | }
144 |
145 | .primary_btn td,
146 | .secondary_btn td {
147 | font-size: 16px;
148 | mso-line-height-rule: exactly
149 | }
150 |
151 | .primary_btn a,
152 | .secondary_btn a {
153 | font-weight: bold
154 | }
155 |
156 | .email_body {
157 | padding: 32px 6px;
158 | text-align: center
159 | }
160 |
161 | .email_container,
162 | .row,
163 | .col-1,
164 | .col-13,
165 | .col-2,
166 | .col-3 {
167 | display: inline-block;
168 | width: 100%;
169 | vertical-align: top;
170 | text-align: center
171 | }
172 |
173 | .email_container {
174 | width: 100%;
175 | margin: 0 auto
176 | }
177 |
178 | .email_container {
179 | max-width: 588px
180 | }
181 |
182 | .row,
183 | .col-3 {
184 | max-width: 580px
185 | }
186 |
187 | .col-1 {
188 | max-width: 190px
189 | }
190 |
191 | .col-2 {
192 | max-width: 290px
193 | }
194 |
195 | .col-13 {
196 | max-width: 390px
197 | }
198 |
199 | .row {
200 | margin: 0 auto
201 | }
202 |
203 | .column {
204 | width: 100%;
205 | vertical-align: top
206 | }
207 |
208 | .column_cell {
209 | padding: 16px;
210 | text-align: center;
211 | vertical-align: top
212 | }
213 |
214 | .col-bottom-0 .column_cell {
215 | padding-bottom: 0
216 | }
217 |
218 | .col-top-0 .column_cell {
219 | padding-top: 0
220 | }
221 |
222 | .email_container,
223 | .header_cell,
224 | .jumbotron_cell,
225 | .content_cell,
226 | .footer_cell,
227 | .image_responsive {
228 | font-size: 0 !important;
229 | text-align: center
230 | }
231 |
232 | .header_cell,
233 | .footer_cell {
234 | padding-bottom: 16px
235 | }
236 |
237 | .header_cell .column_cell,
238 | .footer_cell .col-13 .column_cell,
239 | .footer_cell .col-1 .column_cell {
240 | text-align: left;
241 | padding-top: 16px
242 | }
243 |
244 | .header_cell img {
245 | max-width: 156px;
246 | height: auto
247 | }
248 |
249 | .footer_cell {
250 | text-align: center
251 | }
252 |
253 | .footer_cell p {
254 | Margin: 16px 0
255 | }
256 |
257 | .invoice_cell .column_cell {
258 | text-align: left;
259 | padding-top: 0;
260 | padding-bottom: 0
261 | }
262 |
263 | .invoice_cell p {
264 | margin-top: 8px;
265 | margin-bottom: 16px
266 | }
267 |
268 | .pricing_box {
269 | border-collapse: separate;
270 | padding: 10px 16px
271 | }
272 |
273 | .primary_pricing_box {
274 | border-collapse: separate;
275 | padding: 18px 16px
276 | }
277 |
278 | .text_quote .column_cell {
279 | border-left: 4px solid;
280 | text-align: left;
281 | padding-right: 0;
282 | padding-top: 0;
283 | padding-bottom: 0
284 | }
285 |
286 | .primary_btn,
287 | .secondary_btn {
288 | clear: both;
289 | margin: 0 auto
290 | }
291 |
292 | .primary_btn td,
293 | .secondary_btn td {
294 | text-align: center;
295 | vertical-align: middle;
296 | padding: 12px 24px
297 | }
298 |
299 | .primary_btn a,
300 | .primary_btn span,
301 | .secondary_btn a,
302 | .secondary_btn span {
303 | text-align: center;
304 | display: block
305 | }
306 |
307 | .label .font_default {
308 | font-size: 10px;
309 | font-weight: bold;
310 | text-transform: uppercase;
311 | letter-spacing: 2px;
312 | padding: 3px 7px;
313 | white-space: nowrap
314 | }
315 |
316 | .icon_holder,
317 | .hruler {
318 | width: 62px;
319 | margin-left: auto;
320 | margin-right: auto;
321 | clear: both
322 | }
323 |
324 | .icon_holder {
325 | width: 48px
326 | }
327 |
328 | .hspace,
329 | .hruler_cell {
330 | font-size: 0;
331 | height: 8px;
332 | overflow: hidden
333 | }
334 |
335 | .hruler_cell {
336 | height: 4px;
337 | line-height: 4px
338 | }
339 |
340 | .icon_cell {
341 | font-size: 0;
342 | line-height: 1;
343 | padding: 8px;
344 | height: 48px
345 | }
346 |
347 | .product_row {
348 | padding: 0 0 16px
349 | }
350 |
351 | .product_row .column_cell {
352 | padding: 16px 16px 0
353 | }
354 |
355 | .product_row .col-13 .column_cell {
356 | text-align: left
357 | }
358 |
359 | .product_row h6 {
360 | Margin-top: 0
361 | }
362 |
363 | .product_row p {
364 | Margin-top: 8px;
365 | Margin-bottom: 8px
366 | }
367 |
368 | .order_total_right .column_cell {
369 | text-align: right
370 | }
371 |
372 | .order_total_left .column_cell {
373 | text-align: left
374 | }
375 |
376 | .order_total p {
377 | Margin: 8px 0
378 | }
379 |
380 | .order_total h2 {
381 | Margin: 8px 0
382 | }
383 |
384 | .image_responsive img {
385 | display: block;
386 | width: 100%;
387 | height: auto;
388 | max-width: 580px;
389 | margin-left: auto;
390 | margin-right: auto
391 | }
392 |
393 | body,
394 | .email_body,
395 | .header_cell,
396 | .content_cell,
397 | .footer_cell {
398 | background-color: #fff
399 | }
400 |
401 | .secondary_btn td,
402 | .icon_primary .icon_cell,
403 | .primary_pricing_box {
404 | background-color: #2f68b4
405 | }
406 |
407 | .jumbotron_cell,
408 | .pricing_box {
409 | background-color: #f2f2f5
410 | }
411 |
412 | .primary_btn td,
413 | .label .font_default {
414 | background-color: #22aaa0
415 | }
416 |
417 | .icon_secondary .icon_cell {
418 | background-color: #e1e3e7
419 | }
420 |
421 | .label_1 .font_default {
422 | background-color: #62a9dd
423 | }
424 |
425 | .label_2 .font_default {
426 | background-color: #8965ad
427 | }
428 |
429 | .label_3 .font_default {
430 | background-color: #df6164
431 | }
432 |
433 | .primary_btn a,
434 | .primary_btn span,
435 | .secondary_btn a,
436 | .secondary_btn span,
437 | .label .font_default,
438 | .primary_pricing_box,
439 | .primary_pricing_box h1,
440 | .primary_pricing_box small {
441 | color: #fff
442 | }
443 |
444 | h2,
445 | h4,
446 | h5,
447 | h6 {
448 | color: #383d42
449 | }
450 |
451 | .column_cell {
452 | color: #888
453 | }
454 |
455 | .header_cell .column_cell,
456 | .header_cell a,
457 | .header_cell a span,
458 | h1,
459 | h3,
460 | a,
461 | a span,
462 | .text-secondary,
463 | .column_cell .text-secondary,
464 | .content_cell h2 .text-secondary {
465 | color: #2f68b4
466 | }
467 |
468 | .footer_cell a,
469 | .footer_cell a span {
470 | color: #7a7a7a
471 | }
472 |
473 | .text-muted,
474 | .footer_cell .column_cell,
475 | .content h4 span,
476 | .content h3 span {
477 | color: #b3b3b5
478 | }
479 |
480 | .header_cell,
481 | .footer_cell {
482 | border-top: 4px solid;
483 | border-bottom: 4px solid
484 | }
485 |
486 | .header_cell,
487 | .footer_cell,
488 | .jumbotron_cell,
489 | .content_cell {
490 | border-left: 4px solid;
491 | border-right: 4px solid
492 | }
493 |
494 | .footer_cell,
495 | .product_row,
496 | .order_total {
497 | border-top: 1px solid
498 | }
499 |
500 | .header_cell,
501 | .footer_cell,
502 | .jumbotron_cell,
503 | .content_cell,
504 | .product_row,
505 | .order_total,
506 | .icon_secondary .icon_cell,
507 | .footer_cell,
508 | .content .product_row,
509 | .content .order_total,
510 | .pricing_box,
511 | .text_quote .column_cell {
512 | border-color: #d8dde4
513 | }
514 |
515 | @media screen {
516 |
517 | h1,
518 | h2,
519 | h3,
520 | h4,
521 | h5,
522 | h6,
523 | p,
524 | a,
525 | .font_default {
526 | font-family: "Noto Sans", Helvetica, Arial, sans-serif !important
527 | }
528 |
529 | .primary_btn td,
530 | .secondary_btn td {
531 | padding: 0 !important
532 | }
533 |
534 | .primary_btn a,
535 | .secondary_btn a {
536 | padding: 12px 24px !important
537 | }
538 | }
539 |
540 | @media screen and (min-width:631px) and (max-width:769px) {
541 |
542 | .col-1,
543 | .col-2,
544 | .col-3,
545 | .col-13 {
546 | float: left !important
547 | }
548 |
549 | .col-1 {
550 | width: 200px !important
551 | }
552 |
553 | .col-2 {
554 | width: 300px !important
555 | }
556 | }
557 |
558 | @media screen and (max-width:630px) {
559 | .jumbotron_cell {
560 | background-size: cover !important
561 | }
562 |
563 | .row,
564 | .col-1,
565 | .col-13,
566 | .col-2,
567 | .col-3 {
568 | max-width: 100% !important
569 | }
570 | }
--------------------------------------------------------------------------------
/assets/css/email-receipt.css:
--------------------------------------------------------------------------------
1 | body{Margin:0;padding:0;min-width:100%}a,#outlook a{display:inline-block}a,a span{text-decoration:none}img{line-height:1;outline:0;border:0;text-decoration:none;-ms-interpolation-mode:bicubic;mso-line-height-rule:exactly}table{border-spacing:0;mso-table-lspace:0;mso-table-rspace:0}td{padding:0}.email_summary{display:none;font-size:1px;line-height:1px;max-height:0;max-width:0;opacity:0;overflow:hidden}.font_default,h1,h2,h3,h4,h5,h6,p,a{font-family:Helvetica,Arial,sans-serif}small{font-size:86%;font-weight:normal}.pricing_box_cell small{font-size:74%}.font_default,p{font-size:15px}p{line-height:23px;Margin-top:16px;Margin-bottom:24px}.lead{font-size:19px;line-height:27px;Margin-bottom:16px}.header_cell .column_cell{font-size:20px;font-weight:bold}.header_cell p{margin-bottom:0}h1,h2,h3,h4,h5,h6{Margin-left:0;Margin-right:0;Margin-top:16px;Margin-bottom:8px;padding:0}.line-through{text-decoration:line-through}h1,h2{font-size:26px;line-height:36px;font-weight:bold}.pricing_box h1,.pricing_box h2,.primary_pricing_box h1,.primary_pricing_box h2{line-height:20px;Margin-top:16px;Margin-bottom:0}h3,h4{font-size:22px;line-height:30px;font-weight:bold}h5{font-size:18px;line-height:26px;font-weight:bold}h6{font-size:16px;line-height:24px;font-weight:bold}.primary_btn td,.secondary_btn td{font-size:16px;mso-line-height-rule:exactly}.primary_btn a,.secondary_btn a{font-weight:bold}.email_body{padding:32px 6px;text-align:center}.email_container,.row,.col-1,.col-13,.col-2,.col-3{display:inline-block;width:100%;vertical-align:top;text-align:center}.email_container{width:100%;margin:0 auto}.email_container{max-width:588px}.row,.col-3{max-width:580px}.col-1{max-width:190px}.col-2{max-width:290px}.col-13{max-width:390px}.row{margin:0 auto}.column{width:100%;vertical-align:top}.column_cell{padding:16px;text-align:center;vertical-align:top}.col-bottom-0 .column_cell{padding-bottom:0}.col-top-0 .column_cell{padding-top:0}.email_container,.header_cell,.jumbotron_cell,.content_cell,.footer_cell,.image_responsive{font-size:0!important;text-align:center}.header_cell,.footer_cell{padding-bottom:16px}.header_cell .column_cell,.footer_cell .col-13 .column_cell,.footer_cell .col-1 .column_cell{text-align:left;padding-top:16px}.header_cell img{max-width:156px;height:auto}.footer_cell{text-align:center}.footer_cell p{Margin:16px 0}.invoice_cell .column_cell{text-align:left;padding-top:0;padding-bottom:0}.invoice_cell p{margin-top:8px;margin-bottom:16px}.pricing_box{border-collapse:separate;padding:10px 16px}.primary_pricing_box{border-collapse:separate;padding:18px 16px}.text_quote .column_cell{border-left:4px solid;text-align:left;padding-right:0;padding-top:0;padding-bottom:0}.primary_btn,.secondary_btn{clear:both;margin:0 auto}.primary_btn td,.secondary_btn td{text-align:center;vertical-align:middle;padding:12px 24px}.primary_btn a,.primary_btn span,.secondary_btn a,.secondary_btn span{text-align:center;display:block}.label .font_default{font-size:10px;font-weight:bold;text-transform:uppercase;letter-spacing:2px;padding:3px 7px;white-space:nowrap}.icon_holder,.hruler{width:62px;margin-left:auto;margin-right:auto;clear:both}.icon_holder{width:48px}.hspace,.hruler_cell{font-size:0;height:8px;overflow:hidden}.hruler_cell{height:4px;line-height:4px}.icon_cell{font-size:0;line-height:1;padding:8px;height:48px}.product_row{padding:0 0 16px}.product_row .column_cell{padding:16px 16px 0}.product_row .col-13 .column_cell{text-align:left}.product_row h6{Margin-top:0}.product_row p{Margin-top:8px;Margin-bottom:8px}.order_total_right .column_cell{text-align:right}.order_total_left .column_cell{text-align:left}.order_total p{Margin:8px 0}.order_total h2{Margin:8px 0}.image_responsive img{display:block;width:100%;height:auto;max-width:580px;margin-left:auto;margin-right:auto}body,.email_body,.header_cell,.content_cell,.footer_cell{background-color:#fff}.secondary_btn td,.icon_primary .icon_cell,.primary_pricing_box{background-color:#2f68b4}.jumbotron_cell,.pricing_box{background-color:#f2f2f5}.primary_btn td,.label .font_default{background-color:#22aaa0}.icon_secondary .icon_cell{background-color:#e1e3e7}.label_1 .font_default{background-color:#62a9dd}.label_2 .font_default{background-color:#8965ad}.label_3 .font_default{background-color:#df6164}.primary_btn a,.primary_btn span,.secondary_btn a,.secondary_btn span,.label .font_default,.primary_pricing_box,.primary_pricing_box h1,.primary_pricing_box small{color:#fff}h2,h4,h5,h6{color:#383d42}.column_cell{color:#888}.header_cell .column_cell,.header_cell a,.header_cell a span,h1,h3,a,a span,.text-secondary,.column_cell .text-secondary,.content_cell h2 .text-secondary{color:#2f68b4}.footer_cell a,.footer_cell a span{color:#7a7a7a}.text-muted,.footer_cell .column_cell,.content h4 span,.content h3 span{color:#b3b3b5}.header_cell,.footer_cell{border-top:4px solid;border-bottom:4px solid}.header_cell,.footer_cell,.jumbotron_cell,.content_cell{border-left:4px solid;border-right:4px solid}.footer_cell,.product_row,.order_total{border-top:1px solid}.header_cell,.footer_cell,.jumbotron_cell,.content_cell,.product_row,.order_total,.icon_secondary .icon_cell,.footer_cell,.content .product_row,.content .order_total,.pricing_box,.text_quote .column_cell{border-color:#d8dde4}@media screen{h1,h2,h3,h4,h5,h6,p,a,.font_default{font-family:"Noto Sans",Helvetica,Arial,sans-serif!important}.primary_btn td,.secondary_btn td{padding:0!important}.primary_btn a,.secondary_btn a{padding:12px 24px!important}}@media screen and (min-width:631px) and (max-width:769px){.col-1,.col-2,.col-3,.col-13{float:left!important}.col-1{width:200px!important}.col-2{width:300px!important}}@media screen and (max-width:630px){.jumbotron_cell{background-size:cover!important}.row,.col-1,.col-13,.col-2,.col-3{max-width:100%!important}}
--------------------------------------------------------------------------------
/assets/css/paystack-admin.css:
--------------------------------------------------------------------------------
1 | #titlediv .inside p.description {
2 | margin: 8px 2px 0;
3 | }
4 | #titlediv .inside p.description label {
5 | cursor: pointer;
6 | }
7 |
8 | span.shortcode {
9 | display: block;
10 | margin: 2px 0;
11 | }
12 | span.shortcode.old {
13 | background: #777;
14 | color: #fff;
15 | }
16 | span.shortcode > input {
17 | background: inherit;
18 | color: inherit;
19 | font-size: 12px;
20 | border: none;
21 | box-shadow: none;
22 | padding: 4px 8px;
23 | margin: 0;
24 | }
25 |
26 | #submitpost input.copy {
27 | margin-bottom: 10px;
28 | }
29 | #submitpost input.delete {
30 | padding: 0;
31 | margin: 0;
32 | border: none;
33 | cursor: pointer;
34 | background: inherit;
35 | color: #a00;
36 | }
37 | #submitpost input.delete:hover {
38 | color: #f00;
39 | }
40 | #submitpost input.delete:focus {
41 | outline: thin dotted;
42 | }
43 |
44 | .postbox-container .postbox h3 {
45 | border-bottom: 1px solid transparent;
46 | }
47 |
48 | .keyboard-interaction {
49 | visibility: hidden;
50 | color: #23282d;
51 | }
52 |
53 | #misc-publishing-actions .misc-pub-section::before {
54 | content: "\f488";
55 | -moz-osx-font-smoothing: grayscale;
56 | display: inline-block;
57 | font: 20px/1 dashicons;
58 | left: -1px;
59 | padding: 0 2px 0 0;
60 | position: relative;
61 | text-decoration: none !important;
62 | top: 0;
63 | vertical-align: top;
64 | color: #82878c;
65 | }
66 | #misc-publishing-actions .misc-pub-section.warning::before {
67 | content: "\f534";
68 | }
69 | #misc-publishing-actions .misc-pub-section.warning a.external {
70 | font-style: italic;
71 | }
72 |
73 | .config-error {
74 | color: #d00;
75 | font-style: normal;
76 | font-size: 13px;
77 | }
78 | .config-error ul,
79 | .config-error span,
80 | .config-error div {
81 | margin: 0;
82 | }
83 | .config-error ul li,
84 | .config-error span li,
85 | .config-error div li {
86 | padding: 0 4px;
87 | margin: 0;
88 | }
89 | .config-error ul li a.external,
90 | .config-error span li a.external,
91 | .config-error div li a.external {
92 | font-style: italic;
93 | }
94 |
95 | [data-config-field][aria-invalid=true] {
96 | border-color: #d00;
97 | }
98 |
99 | /*
100 | * Tabs
101 | */
102 | #contact-form-editor-tabs {
103 | border-bottom: 1px solid #aaa;
104 | padding: 9px 15px 0 10px;
105 | margin: 0;
106 | }
107 | #contact-form-editor-tabs li {
108 | display: inline-block;
109 | list-style: none;
110 | border: 1px solid #ccc;
111 | border-bottom: 1px solid #aaa;
112 | padding: 0;
113 | margin: 0 4px -1px;
114 | background-color: #e4e4e4;
115 | }
116 | #contact-form-editor-tabs li:hover {
117 | background-color: #fff;
118 | }
119 | #contact-form-editor-tabs li.ui-tabs-active, #contact-form-editor-tabs li.ui-tabs-active:hover {
120 | border-top: 1px solid #aaa;
121 | border-right: 1px solid #aaa;
122 | border-left: 1px solid #aaa;
123 | border-bottom: 1px solid #f5f5f5;
124 | background-color: #f5f5f5;
125 | }
126 | #contact-form-editor-tabs li a {
127 | padding: 6px 10px;
128 | font-size: 14px;
129 | font-weight: normal;
130 | line-height: 30px;
131 | color: #333;
132 | text-decoration: none;
133 | }
134 | #contact-form-editor-tabs li a:hover {
135 | color: #000;
136 | }
137 | #contact-form-editor-tabs li.ui-tabs-active a {
138 | color: #000;
139 | font-size: 14px;
140 | font-weight: bold;
141 | }
142 |
143 | #contact-form-editor .contact-form-editor-panel {
144 | background-color: #f5f5f5;
145 | border: 1px solid #aaa;
146 | border-top: none;
147 | padding: 16px;
148 | }
149 | #contact-form-editor .contact-form-editor-panel h2 {
150 | font-size: 18px;
151 | font-weight: 400;
152 | line-height: 24px;
153 | margin: 8px 0;
154 | padding: 0;
155 | }
156 | #contact-form-editor .contact-form-editor-panel fieldset legend {
157 | line-height: 1.5;
158 | margin: 0.6em 0 0.4em;
159 | }
160 | #contact-form-editor .form-table th {
161 | width: 100px;
162 | }
163 |
164 | /*
165 | * Form Panel
166 | */
167 | #tag-generator-list a.button {
168 | font-size: 12px;
169 | height: 26px;
170 | line-height: 24px;
171 | margin: 2px;
172 | padding: 0 8px 1px;
173 | }
174 |
175 | .tag-generator-panel {
176 | position: relative;
177 | height: 495px;
178 | }
179 | .tag-generator-panel .control-box {
180 | padding: 0;
181 | margin: 0;
182 | height: 380px;
183 | overflow: auto;
184 | }
185 | .tag-generator-panel .control-box > fieldset legend {
186 | border: 1px solid #dfdfdf;
187 | border-left: 4px solid #00a0d2;
188 | background: #f7fcfe;
189 | padding: 4px 12px;
190 | margin: 4px 0;
191 | line-height: 1.4em;
192 | width: 95%;
193 | }
194 | .tag-generator-panel .control-box input.oneline {
195 | width: 200px;
196 | }
197 | .tag-generator-panel .control-box textarea.values {
198 | width: 200px;
199 | height: 6em;
200 | }
201 | .tag-generator-panel .control-box input[type=number],
202 | .tag-generator-panel .control-box input[type=date] {
203 | width: 88px;
204 | }
205 | .tag-generator-panel .control-box table {
206 | width: 100%;
207 | }
208 | .tag-generator-panel .control-box table .form-table th {
209 | width: 120px;
210 | padding: 4px 10px 4px 0;
211 | font-size: 13px;
212 | }
213 | .tag-generator-panel .control-box table .form-table td {
214 | padding: 4px 10px;
215 | font-size: 13px;
216 | }
217 | .tag-generator-panel .control-box table .form-table td label {
218 | line-height: 1.1em;
219 | }
220 | .tag-generator-panel .control-box table .form-table td label .description {
221 | line-height: 1.4em;
222 | }
223 | .tag-generator-panel .control-box table caption {
224 | text-align: left;
225 | font-size: 110%;
226 | font-weight: bold;
227 | color: #777;
228 | margin: 10px 0 5px;
229 | }
230 | .tag-generator-panel .insert-box {
231 | position: absolute;
232 | left: -15px;
233 | right: -15px;
234 | bottom: -15px;
235 | width: 100%;
236 | height: 84px;
237 | margin: 0;
238 | padding: 8px 16px;
239 | background-color: #fcfcfc;
240 | border-top: 1px solid #dfdfdf;
241 | overflow: auto;
242 | }
243 | .tag-generator-panel .insert-box input.tag {
244 | width: 480px;
245 | float: left;
246 | background-color: transparent;
247 | box-shadow: none;
248 | }
249 | .tag-generator-panel .insert-box .submitbox {
250 | padding: 2px 4px;
251 | }
252 | .tag-generator-panel .insert-box .submitbox input[type=button] {
253 | float: right;
254 | }
255 | .tag-generator-panel .insert-box .description label {
256 | cursor: text;
257 | }
258 |
259 | /*
260 | * Mail Panel
261 | */
262 | .contact-form-editor-box-mail span.mailtag {
263 | display: inline-block;
264 | margin: 0 0 0 4px;
265 | padding: 1px 2px;
266 | cursor: pointer;
267 | color: #000;
268 | }
269 | .contact-form-editor-box-mail span.mailtag.used {
270 | color: #666;
271 | }
272 |
273 | /*
274 | * Messages Panel
275 | */
276 | #messages-panel p.description {
277 | margin: 5px 0 10px;
278 | }
279 |
280 | /*
281 | * List Table
282 | */
283 | .fixed .column-title {
284 | width: 38%;
285 | }
286 | .fixed .column-shortcode {
287 | width: 38%;
288 | }
289 |
290 | /*
291 | * Welcome Panel
292 | */
293 | .welcome-panel h3 {
294 | font-size: 16px;
295 | font-weight: 600;
296 | line-height: 2.1em;
297 | margin: 1.33em 0 0;
298 | }
299 | .welcome-panel p.message {
300 | line-height: 1.4em;
301 | margin-right: 25px;
302 | }
303 | .welcome-panel li {
304 | margin-bottom: 12px;
305 | }
306 | .welcome-panel-close {
307 | z-index: 2;
308 | }
309 |
310 | /*
311 | * Integration
312 | */
313 | .card {
314 | background: #fff none repeat scroll 0 0;
315 | border: 1px solid #e5e5e5;
316 | border-left: 4px solid #e5e5e5;
317 | box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
318 | margin-top: 20px;
319 | max-width: 520px;
320 | min-width: 255px;
321 | padding: 0.7em 2em 1em;
322 | position: relative;
323 | }
324 | .card.active {
325 | border-color: #00a0d2;
326 | }
327 | .card img.icon {
328 | float: left;
329 | margin: 8px 8px 8px -8px;
330 | }
331 | .card h2.title {
332 | float: left;
333 | max-width: 240px;
334 | font-size: 1.3em;
335 | font-weight: 600;
336 | }
337 | .card .infobox {
338 | float: right;
339 | font-size: 13px;
340 | color: #666;
341 | margin: 2px 0 5px;
342 | line-height: 1.5;
343 | max-width: 240px;
344 | }
345 | .card .inside .form-table th {
346 | padding: 15px 10px 15px 0;
347 | width: 160px;
348 | }
349 | .card .inside .form-table td {
350 | padding: 10px 10px;
351 | }
352 |
353 | .paystack_setting_page input {
354 | width: 50%;
355 | }
356 |
357 | #custom-metabox-holder-sortables {
358 | margin-top: 30px;
359 | }
360 |
361 | .wp-list-table .column-id {
362 | width: 5%;
363 | }
364 | .wp-list-table .column-email {
365 | width: 20%;
366 | }
367 | .wp-list-table .column-metadata {
368 | width: 35%;
369 | }
370 | .wp-list-table .column-amount {
371 | width: 10%;
372 | }
373 | .wp-list-table .column-txn_code {
374 | width: 15%;
375 | }
376 | .wp-list-table .column-date {
377 | width: 10%;
378 | }
379 | /*# sourceMappingURL=paystack-admin.css.map */
--------------------------------------------------------------------------------
/assets/css/paystack-admin.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["paystack-admin.scss","paystack-admin.css"],"names":[],"mappings":"AAEE;EACC,iBAAA;ACDH;ADGG;EACC,eAAA;ACDJ;;ADOA;EACC,cAAA;EACA,aAAA;ACJD;ADMC;EACC,gBAAA;EACA,WAAA;ACJF;ADOC;EACC,mBAAA;EACA,cAAA;EACA,eAAA;EACA,YAAA;EACA,gBAAA;EACA,gBAAA;EACA,SAAA;ACLF;;ADUC;EACC,mBAAA;ACPF;ADUC;EACC,UAAA;EACA,SAAA;EACA,YAAA;EACA,eAAA;EACA,mBAAA;EACA,WAAA;ACRF;ADUE;EACC,WAAA;ACRH;ADWE;EACC,oBAAA;ACTH;;ADcA;EACC,oCAAA;ACXD;;ADcA;EACC,kBAAA;EACA,cAAA;ACXD;;ADgBE;EACC,gBAAA;EACA,kCAAA;EACA,qBAAA;EACA,sBAAA;EACA,UAAA;EACA,kBAAA;EACA,kBAAA;EACA,gCAAA;EACA,MAAA;EACA,mBAAA;EACA,cAAA;ACbH;ADgBE;EACC,gBAAA;ACdH;ADiBE;EACC,kBAAA;ACfH;;ADoBA;EACC,WAAA;EACA,kBAAA;EACA,eAAA;ACjBD;ADmBC;;;EAGC,SAAA;ACjBF;ADmBE;;;EACC,cAAA;EACA,SAAA;ACfH;ADiBG;;;EACC,kBAAA;ACbJ;;ADmBA;EACC,kBAAA;AChBD;;ADmBA;;EAAA;AAGC;EACG,6BAAA;EACA,wBAAA;EACA,SAAA;AChBJ;ADkBI;EACI,qBAAA;EACA,gBAAA;EACA,sBAAA;EACA,6BAAA;EACA,UAAA;EACA,kBAAA;EACA,yBAAA;AChBR;ADkBQ;EACI,sBAAA;AChBZ;ADmBQ;EAEI,0BAAA;EACA,4BAAA;EACA,2BAAA;EACA,gCAAA;EACA,yBAAA;AClBZ;ADqBQ;EACI,iBAAA;EACA,eAAA;EACA,mBAAA;EACA,iBAAA;EACA,WAAA;EACA,qBAAA;ACnBZ;ADqBY;EACI,WAAA;ACnBhB;ADuBQ;EACI,WAAA;EACA,eAAA;EACA,iBAAA;ACrBZ;;AD2BI;EACI,yBAAA;EACA,sBAAA;EACA,gBAAA;EACA,aAAA;ACxBR;AD0BQ;EACI,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,aAAA;EACA,UAAA;ACxBZ;AD2BQ;EACI,gBAAA;EACA,qBAAA;ACzBZ;AD6BI;EACI,YAAA;AC3BR;;AD+BA;;EAAA;AAII;EACI,eAAA;EACA,YAAA;EACA,iBAAA;EACA,WAAA;EACA,kBAAA;AC7BR;;ADiCA;EACI,kBAAA;EACA,aAAA;AC9BJ;ADgCI;EACI,UAAA;EACA,SAAA;EACA,aAAA;EACA,cAAA;AC9BR;ADgCQ;EACI,yBAAA;EACA,8BAAA;EACA,mBAAA;EACA,iBAAA;EACA,aAAA;EACA,kBAAA;EACA,UAAA;AC9BZ;ADiCQ;EACI,YAAA;AC/BZ;ADkCQ;EACI,YAAA;EACA,WAAA;AChCZ;ADmCQ;;EAEI,WAAA;ACjCZ;ADoCQ;EACI,WAAA;AClCZ;ADqCgB;EACI,YAAA;EACA,uBAAA;EACA,eAAA;ACnCpB;ADsCgB;EACI,iBAAA;EACA,eAAA;ACpCpB;ADsCoB;EACI,kBAAA;ACpCxB;ADsCwB;EACI,kBAAA;ACpC5B;AD0CY;EACI,gBAAA;EACA,eAAA;EACA,iBAAA;EACA,WAAA;EACA,kBAAA;ACxChB;AD6CI;EACI,kBAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,WAAA;EACA,YAAA;EACA,SAAA;EACA,iBAAA;EACA,yBAAA;EACA,6BAAA;EACA,cAAA;AC3CR;AD6CQ;EACI,YAAA;EACA,WAAA;EACA,6BAAA;EACA,gBAAA;AC3CZ;AD8CQ;EACI,gBAAA;AC5CZ;AD8CY;EACI,YAAA;AC5ChB;ADgDQ;EACI,YAAA;AC9CZ;;ADmDA;;EAAA;AAII;EACI,qBAAA;EACA,iBAAA;EACA,gBAAA;EACA,eAAA;EACA,WAAA;ACjDR;ADmDQ;EACI,WAAA;ACjDZ;;ADsDA;;EAAA;AAII;EACI,kBAAA;ACpDR;;ADwDA;;EAAA;AAII;EACI,UAAA;ACtDR;ADyDI;EACI,UAAA;ACvDR;;AD2DA;;EAAA;AAII;EACI,eAAA;EACA,gBAAA;EACA,kBAAA;EACA,kBAAA;ACzDR;AD4DI;EACI,kBAAA;EACA,kBAAA;AC1DR;AD6DI;EACI,mBAAA;AC3DR;AD8DI;EACI,UAAA;AC5DR;;ADgEA;;EAAA;AAGA;EACI,uCAAA;EACA,yBAAA;EACA,8BAAA;EACA,yCAAA;EACA,gBAAA;EACA,gBAAA;EACA,gBAAA;EACA,sBAAA;EACA,kBAAA;AC7DJ;AD+DI;EACI,qBAAA;AC7DR;ADgEI;EACI,WAAA;EACA,wBAAA;AC9DR;ADiEI;EACI,WAAA;EACA,gBAAA;EACA,gBAAA;EACA,gBAAA;AC/DR;ADkEI;EACI,YAAA;EACA,eAAA;EACA,WAAA;EACA,iBAAA;EACA,gBAAA;EACA,gBAAA;AChER;ADqEY;EACI,yBAAA;EACA,YAAA;ACnEhB;ADsEY;EACI,kBAAA;ACpEhB;;AD2EI;EACI,UAAA;ACxER;;AD4EA;EACI,gBAAA;ACzEJ;;AD6EI;EACI,SAAA;AC1ER;AD6EI;EACI,UAAA;AC3ER;AD8EI;EACI,UAAA;AC5ER;AD+EI;EACI,UAAA;AC7ER;ADgFI;EACI,UAAA;AC9ER;ADiFI;EACI,UAAA;AC/ER","file":"paystack-admin.css"}
--------------------------------------------------------------------------------
/assets/css/paystack-admin.scss:
--------------------------------------------------------------------------------
1 | #titlediv {
2 | .inside {
3 | p.description {
4 | margin: 8px 2px 0;
5 |
6 | label {
7 | cursor: pointer;
8 | }
9 | }
10 | }
11 | }
12 |
13 | span.shortcode {
14 | display: block;
15 | margin: 2px 0;
16 |
17 | &.old {
18 | background: #777;
19 | color: #fff;
20 | }
21 |
22 | > input {
23 | background: inherit;
24 | color: inherit;
25 | font-size: 12px;
26 | border: none;
27 | box-shadow: none;
28 | padding: 4px 8px;
29 | margin: 0;
30 | }
31 | }
32 |
33 | #submitpost {
34 | input.copy {
35 | margin-bottom: 10px;
36 | }
37 |
38 | input.delete {
39 | padding: 0;
40 | margin: 0;
41 | border: none;
42 | cursor: pointer;
43 | background: inherit;
44 | color: #a00;
45 |
46 | &:hover {
47 | color: #f00;
48 | }
49 |
50 | &:focus {
51 | outline: thin dotted;
52 | }
53 | }
54 | }
55 |
56 | .postbox-container .postbox h3 {
57 | border-bottom: 1px solid transparent;
58 | }
59 |
60 | .keyboard-interaction {
61 | visibility: hidden;
62 | color: #23282d;
63 | }
64 |
65 | #misc-publishing-actions {
66 | .misc-pub-section {
67 | &::before {
68 | content: "\f488";
69 | -moz-osx-font-smoothing: grayscale;
70 | display: inline-block;
71 | font: 20px/1 dashicons;
72 | left: -1px;
73 | padding: 0 2px 0 0;
74 | position: relative;
75 | text-decoration: none !important;
76 | top: 0;
77 | vertical-align: top;
78 | color: #82878c;
79 | }
80 |
81 | &.warning::before {
82 | content: "\f534";
83 | }
84 |
85 | &.warning a.external {
86 | font-style: italic;
87 | }
88 | }
89 | }
90 |
91 | .config-error {
92 | color: #d00;
93 | font-style: normal;
94 | font-size: 13px;
95 |
96 | ul,
97 | span,
98 | div {
99 | margin: 0;
100 |
101 | li {
102 | padding: 0 4px;
103 | margin: 0;
104 |
105 | a.external {
106 | font-style: italic;
107 | }
108 | }
109 | }
110 | }
111 |
112 | [data-config-field][aria-invalid="true"] {
113 | border-color: #d00;
114 | }
115 |
116 | /*
117 | * Tabs
118 | */
119 | #contact-form-editor-tabs {
120 | border-bottom: 1px solid #aaa;
121 | padding: 9px 15px 0 10px;
122 | margin: 0;
123 |
124 | li {
125 | display: inline-block;
126 | list-style: none;
127 | border: 1px solid #ccc;
128 | border-bottom: 1px solid #aaa;
129 | padding: 0;
130 | margin: 0 4px -1px;
131 | background-color: #e4e4e4;
132 |
133 | &:hover {
134 | background-color: #fff;
135 | }
136 |
137 | &.ui-tabs-active,
138 | &.ui-tabs-active:hover {
139 | border-top: 1px solid #aaa;
140 | border-right: 1px solid #aaa;
141 | border-left: 1px solid #aaa;
142 | border-bottom: 1px solid #f5f5f5;
143 | background-color: #f5f5f5;
144 | }
145 |
146 | a {
147 | padding: 6px 10px;
148 | font-size: 14px;
149 | font-weight: normal;
150 | line-height: 30px;
151 | color: #333;
152 | text-decoration: none;
153 |
154 | &:hover {
155 | color: #000;
156 | }
157 | }
158 |
159 | &.ui-tabs-active a {
160 | color: #000;
161 | font-size: 14px;
162 | font-weight: bold;
163 | }
164 | }
165 | }
166 |
167 | #contact-form-editor {
168 | .contact-form-editor-panel {
169 | background-color: #f5f5f5;
170 | border: 1px solid #aaa;
171 | border-top: none;
172 | padding: 16px;
173 |
174 | h2 {
175 | font-size: 18px;
176 | font-weight: 400;
177 | line-height: 24px;
178 | margin: 8px 0;
179 | padding: 0;
180 | }
181 |
182 | fieldset legend {
183 | line-height: 1.5;
184 | margin: .6em 0 .4em;
185 | }
186 | }
187 |
188 | .form-table th {
189 | width: 100px;
190 | }
191 | }
192 |
193 | /*
194 | * Form Panel
195 | */
196 | #tag-generator-list {
197 | a.button {
198 | font-size: 12px;
199 | height: 26px;
200 | line-height: 24px;
201 | margin: 2px;
202 | padding: 0 8px 1px;
203 | }
204 | }
205 |
206 | .tag-generator-panel {
207 | position: relative;
208 | height: 495px;
209 |
210 | .control-box {
211 | padding: 0;
212 | margin: 0;
213 | height: 380px;
214 | overflow: auto;
215 |
216 | > fieldset legend {
217 | border: 1px solid #dfdfdf;
218 | border-left: 4px solid #00a0d2;
219 | background: #f7fcfe;
220 | padding: 4px 12px;
221 | margin: 4px 0;
222 | line-height: 1.4em;
223 | width: 95%;
224 | }
225 |
226 | input.oneline {
227 | width: 200px;
228 | }
229 |
230 | textarea.values {
231 | width: 200px;
232 | height: 6em;
233 | }
234 |
235 | input[type="number"],
236 | input[type="date"] {
237 | width: 88px;
238 | }
239 |
240 | table {
241 | width: 100%;
242 |
243 | .form-table {
244 | th {
245 | width: 120px;
246 | padding: 4px 10px 4px 0;
247 | font-size: 13px;
248 | }
249 |
250 | td {
251 | padding: 4px 10px;
252 | font-size: 13px;
253 |
254 | label {
255 | line-height: 1.1em;
256 |
257 | .description {
258 | line-height: 1.4em;
259 | }
260 | }
261 | }
262 | }
263 |
264 | caption {
265 | text-align: left;
266 | font-size: 110%;
267 | font-weight: bold;
268 | color: #777;
269 | margin: 10px 0 5px;
270 | }
271 | }
272 | }
273 |
274 | .insert-box {
275 | position: absolute;
276 | left: -15px;
277 | right: -15px;
278 | bottom: -15px;
279 | width: 100%;
280 | height: 84px;
281 | margin: 0;
282 | padding: 8px 16px;
283 | background-color: #fcfcfc;
284 | border-top: 1px solid #dfdfdf;
285 | overflow: auto;
286 |
287 | input.tag {
288 | width: 480px;
289 | float: left;
290 | background-color: transparent;
291 | box-shadow: none;
292 | }
293 |
294 | .submitbox {
295 | padding: 2px 4px;
296 |
297 | input[type="button"] {
298 | float: right;
299 | }
300 | }
301 |
302 | .description label {
303 | cursor: text;
304 | }
305 | }
306 | }
307 |
308 | /*
309 | * Mail Panel
310 | */
311 | .contact-form-editor-box-mail {
312 | span.mailtag {
313 | display: inline-block;
314 | margin: 0 0 0 4px;
315 | padding: 1px 2px;
316 | cursor: pointer;
317 | color: #000;
318 |
319 | &.used {
320 | color: #666;
321 | }
322 | }
323 | }
324 |
325 | /*
326 | * Messages Panel
327 | */
328 | #messages-panel {
329 | p.description {
330 | margin: 5px 0 10px;
331 | }
332 | }
333 |
334 | /*
335 | * List Table
336 | */
337 | .fixed {
338 | .column-title {
339 | width: 38%;
340 | }
341 |
342 | .column-shortcode {
343 | width: 38%;
344 | }
345 | }
346 |
347 | /*
348 | * Welcome Panel
349 | */
350 | .welcome-panel {
351 | h3 {
352 | font-size: 16px;
353 | font-weight: 600;
354 | line-height: 2.1em;
355 | margin: 1.33em 0 0;
356 | }
357 |
358 | p.message {
359 | line-height: 1.4em;
360 | margin-right: 25px;
361 | }
362 |
363 | li {
364 | margin-bottom: 12px;
365 | }
366 |
367 | &-close {
368 | z-index: 2;
369 | }
370 | }
371 |
372 | /*
373 | * Integration
374 | */
375 | .card {
376 | background: #fff none repeat scroll 0 0;
377 | border: 1px solid #e5e5e5;
378 | border-left: 4px solid #e5e5e5;
379 | box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
380 | margin-top: 20px;
381 | max-width: 520px;
382 | min-width: 255px;
383 | padding: 0.7em 2em 1em;
384 | position: relative;
385 |
386 | &.active {
387 | border-color: #00a0d2;
388 | }
389 |
390 | img.icon {
391 | float: left;
392 | margin: 8px 8px 8px -8px;
393 | }
394 |
395 | h2.title {
396 | float: left;
397 | max-width: 240px;
398 | font-size: 1.3em;
399 | font-weight: 600;
400 | }
401 |
402 | .infobox {
403 | float: right;
404 | font-size: 13px;
405 | color: #666;
406 | margin: 2px 0 5px;
407 | line-height: 1.5;
408 | max-width: 240px;
409 | }
410 |
411 | .inside {
412 | .form-table {
413 | th {
414 | padding: 15px 10px 15px 0;
415 | width: 160px;
416 | }
417 |
418 | td {
419 | padding: 10px 10px;
420 | }
421 | }
422 | }
423 | }
424 |
425 | .paystack_setting_page {
426 | input {
427 | width: 50%;
428 | }
429 | }
430 |
431 | #custom-metabox-holder-sortables {
432 | margin-top: 30px;
433 | }
434 |
435 | .wp-list-table {
436 | .column-id {
437 | width: 5%;
438 | }
439 |
440 | .column-email {
441 | width: 20%;
442 | }
443 |
444 | .column-metadata {
445 | width: 35%;
446 | }
447 |
448 | .column-amount {
449 | width: 10%;
450 | }
451 |
452 | .column-txn_code {
453 | width: 15%;
454 | }
455 |
456 | .column-date {
457 | width: 10%;
458 | }
459 | }
--------------------------------------------------------------------------------
/assets/fonts/Graphik-Black.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/Graphik-Black.otf
--------------------------------------------------------------------------------
/assets/fonts/Graphik-BlackItalic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/Graphik-BlackItalic.otf
--------------------------------------------------------------------------------
/assets/fonts/Graphik-Bold.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/Graphik-Bold.otf
--------------------------------------------------------------------------------
/assets/fonts/Graphik-BoldItalic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/Graphik-BoldItalic.otf
--------------------------------------------------------------------------------
/assets/fonts/Graphik-Extralight.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/Graphik-Extralight.otf
--------------------------------------------------------------------------------
/assets/fonts/Graphik-ExtralightItalic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/Graphik-ExtralightItalic.otf
--------------------------------------------------------------------------------
/assets/fonts/Graphik-Light.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/Graphik-Light.otf
--------------------------------------------------------------------------------
/assets/fonts/Graphik-LightItalic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/Graphik-LightItalic.otf
--------------------------------------------------------------------------------
/assets/fonts/Graphik-Medium.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/Graphik-Medium.otf
--------------------------------------------------------------------------------
/assets/fonts/Graphik-MediumItalic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/Graphik-MediumItalic.otf
--------------------------------------------------------------------------------
/assets/fonts/Graphik-Regular.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/Graphik-Regular.otf
--------------------------------------------------------------------------------
/assets/fonts/Graphik-RegularItalic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/Graphik-RegularItalic.otf
--------------------------------------------------------------------------------
/assets/fonts/Graphik-Semibold.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/Graphik-Semibold.otf
--------------------------------------------------------------------------------
/assets/fonts/Graphik-SemiboldItalic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/Graphik-SemiboldItalic.otf
--------------------------------------------------------------------------------
/assets/fonts/Graphik-Super.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/Graphik-Super.otf
--------------------------------------------------------------------------------
/assets/fonts/Graphik-SuperItalic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/Graphik-SuperItalic.otf
--------------------------------------------------------------------------------
/assets/fonts/Graphik-Thin.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/Graphik-Thin.otf
--------------------------------------------------------------------------------
/assets/fonts/Graphik-ThinItalic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/Graphik-ThinItalic.otf
--------------------------------------------------------------------------------
/assets/fonts/fontawesome-webfont-.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/fontawesome-webfont-.eot
--------------------------------------------------------------------------------
/assets/fonts/fontawesome-webfont-v=4.2.0.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/fontawesome-webfont-v=4.2.0.eot
--------------------------------------------------------------------------------
/assets/fonts/fontawesome-webfont-v=4.2.0.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/fontawesome-webfont-v=4.2.0.ttf
--------------------------------------------------------------------------------
/assets/fonts/fontawesome-webfont-v=4.2.0.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/fonts/fontawesome-webfont-v=4.2.0.woff
--------------------------------------------------------------------------------
/assets/images/cardlogos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/images/cardlogos.png
--------------------------------------------------------------------------------
/assets/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/images/logo.png
--------------------------------------------------------------------------------
/assets/images/logos@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/assets/images/logos@2x.png
--------------------------------------------------------------------------------
/assets/js/jquery.blockUI.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * jQuery blockUI plugin
3 | * Version 2.70.0-2014.11.23
4 | * Requires jQuery v1.7 or later
5 | *
6 | * Examples at: http://malsup.com/jquery/block/
7 | * Copyright (c) 2007-2013 M. Alsup
8 | * Dual licensed under the MIT and GPL licenses:
9 | * http://www.opensource.org/licenses/mit-license.php
10 | * http://www.gnu.org/licenses/gpl.html
11 | *
12 | * Thanks to Amir-Hossein Sobhi for some excellent contributions!
13 | */
14 | !function(){"use strict";function a(a){function b(b,d){var f,p,q=b==window,r=d&&void 0!==d.message?d.message:void 0;if(d=a.extend({},a.blockUI.defaults,d||{}),!d.ignoreIfBlocked||!a(b).data("blockUI.isBlocked")){if(d.overlayCSS=a.extend({},a.blockUI.defaults.overlayCSS,d.overlayCSS||{}),f=a.extend({},a.blockUI.defaults.css,d.css||{}),d.onOverlayClick&&(d.overlayCSS.cursor="pointer"),p=a.extend({},a.blockUI.defaults.themedCSS,d.themedCSS||{}),r=void 0===r?d.message:r,q&&n&&c(window,{fadeOut:0}),r&&"string"!=typeof r&&(r.parentNode||r.jquery)){var s=r.jquery?r[0]:r,t={};a(b).data("blockUI.history",t),t.el=s,t.parent=s.parentNode,t.display=s.style.display,t.position=s.style.position,t.parent&&t.parent.removeChild(s)}a(b).data("blockUI.onUnblock",d.onUnblock);var u,v,w,x,y=d.baseZ;u=a(k||d.forceIframe?'':'
'),v=a(d.theme?'
':'
'),d.theme&&q?(x='',d.title&&(x+='"),x+='
',x+="
"):d.theme?(x='"):x=q?'
':'
',w=a(x),r&&(d.theme?(w.css(p),w.addClass("ui-widget-content")):w.css(f)),d.theme||v.css(d.overlayCSS),v.css("position",q?"fixed":"absolute"),(k||d.forceIframe)&&u.css("opacity",0);var z=[u,v,w],A=a(q?"body":b);a.each(z,function(){this.appendTo(A)}),d.theme&&d.draggable&&a.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var B=m&&(!a.support.boxModel||a("object,embed",q?null:b).length>0);if(l||B){if(q&&d.allowBodyStretch&&a.support.boxModel&&a("html,body").css("height","100%"),(l||!a.support.boxModel)&&!q)var C=i(b,"borderTopWidth"),D=i(b,"borderLeftWidth"),E=C?"(0 - "+C+")":0,F=D?"(0 - "+D+")":0;a.each(z,function(a,b){var c=b[0].style;if(c.position="absolute",a<2)q?c.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+d.quirksmodeOffsetHack+') + "px"'):c.setExpression("height",'this.parentNode.offsetHeight + "px"'),q?c.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):c.setExpression("width",'this.parentNode.offsetWidth + "px"'),F&&c.setExpression("left",F),E&&c.setExpression("top",E);else if(d.centerY)q&&c.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),c.marginTop=0;else if(!d.centerY&&q){var e=d.css&&d.css.top?parseInt(d.css.top,10):0,f="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+e+') + "px"';c.setExpression("top",f)}})}if(r&&(d.theme?w.find(".ui-widget-content").append(r):w.append(r),(r.jquery||r.nodeType)&&a(r).show()),(k||d.forceIframe)&&d.showOverlay&&u.show(),d.fadeIn){var G=d.onBlock?d.onBlock:j,H=d.showOverlay&&!r?G:j,I=r?G:j;d.showOverlay&&v._fadeIn(d.fadeIn,H),r&&w._fadeIn(d.fadeIn,I)}else d.showOverlay&&v.show(),r&&w.show(),d.onBlock&&d.onBlock.bind(w)();if(e(1,b,d),q?(n=w[0],o=a(d.focusableElements,n),d.focusInput&&setTimeout(g,20)):h(w[0],d.centerX,d.centerY),d.timeout){var J=setTimeout(function(){q?a.unblockUI(d):a(b).unblock(d)},d.timeout);a(b).data("blockUI.timeout",J)}}}function c(b,c){var f,g=b==window,h=a(b),i=h.data("blockUI.history"),j=h.data("blockUI.timeout");j&&(clearTimeout(j),h.removeData("blockUI.timeout")),c=a.extend({},a.blockUI.defaults,c||{}),e(0,b,c),null===c.onUnblock&&(c.onUnblock=h.data("blockUI.onUnblock"),h.removeData("blockUI.onUnblock"));var k;k=g?a(document.body).children().filter(".blockUI").add("body > .blockUI"):h.find(">.blockUI"),c.cursorReset&&(k.length>1&&(k[1].style.cursor=c.cursorReset),k.length>2&&(k[2].style.cursor=c.cursorReset)),g&&(n=o=null),c.fadeOut?(f=k.length,k.stop().fadeOut(c.fadeOut,function(){0===--f&&d(k,i,c,b)})):d(k,i,c,b)}function d(b,c,d,e){var f=a(e);if(!f.data("blockUI.isBlocked")){b.each(function(a,b){this.parentNode&&this.parentNode.removeChild(this)}),c&&c.el&&(c.el.style.display=c.display,c.el.style.position=c.position,c.el.style.cursor="default",c.parent&&c.parent.appendChild(c.el),f.removeData("blockUI.history")),f.data("blockUI.static")&&f.css("position","static"),"function"==typeof d.onUnblock&&d.onUnblock(e,d);var g=a(document.body),h=g.width(),i=g[0].style.width;g.width(h-1).width(h),g[0].style.width=i}}function e(b,c,d){var e=c==window,g=a(c);if((b||(!e||n)&&(e||g.data("blockUI.isBlocked")))&&(g.data("blockUI.isBlocked",b),e&&d.bindEvents&&(!b||d.showOverlay))){var h="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";b?a(document).bind(h,d,f):a(document).unbind(h,f)}}function f(b){if("keydown"===b.type&&b.keyCode&&9==b.keyCode&&n&&b.data.constrainTabKey){var c=o,d=!b.shiftKey&&b.target===c[c.length-1],e=b.shiftKey&&b.target===c[0];if(d||e)return setTimeout(function(){g(e)},10),!1}var f=b.data,h=a(b.target);return h.hasClass("blockOverlay")&&f.onOverlayClick&&f.onOverlayClick(b),h.parents("div."+f.blockMsgClass).length>0||0===h.parents().children().filter("div.blockUI").length}function g(a){if(o){var b=o[a===!0?o.length-1:0];b&&b.focus()}}function h(a,b,c){var d=a.parentNode,e=a.style,f=(d.offsetWidth-a.offsetWidth)/2-i(d,"borderLeftWidth"),g=(d.offsetHeight-a.offsetHeight)/2-i(d,"borderTopWidth");b&&(e.left=f>0?f+"px":"0"),c&&(e.top=g>0?g+"px":"0")}function i(b,c){return parseInt(a.css(b,c),10)||0}a.fn._fadeIn=a.fn.fadeIn;var j=a.noop||function(){},k=/MSIE/.test(navigator.userAgent),l=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),m=(document.documentMode||0,a.isFunction(document.createElement("div").style.setExpression));a.blockUI=function(a){b(window,a)},a.unblockUI=function(a){c(window,a)},a.growlUI=function(b,c,d,e){var f=a('
');b&&f.append(""+b+" "),c&&f.append(""+c+" "),void 0===d&&(d=3e3);var g=function(b){b=b||{},a.blockUI({message:f,fadeIn:"undefined"!=typeof b.fadeIn?b.fadeIn:700,fadeOut:"undefined"!=typeof b.fadeOut?b.fadeOut:1e3,timeout:"undefined"!=typeof b.timeout?b.timeout:d,centerY:!1,showOverlay:!1,onUnblock:e,css:a.blockUI.defaults.growlCSS})};g();f.css("opacity");f.mouseover(function(){g({fadeIn:0,timeout:3e4});var b=a(".blockMsg");b.stop(),b.fadeTo(300,1)}).mouseout(function(){a(".blockMsg").fadeOut(1e3)})},a.fn.block=function(c){if(this[0]===window)return a.blockUI(c),this;var d=a.extend({},a.blockUI.defaults,c||{});return this.each(function(){var b=a(this);d.ignoreIfBlocked&&b.data("blockUI.isBlocked")||b.unblock({fadeOut:0})}),this.each(function(){"static"==a.css(this,"position")&&(this.style.position="relative",a(this).data("blockUI.static",!0)),this.style.zoom=1,b(this,c)})},a.fn.unblock=function(b){return this[0]===window?(a.unblockUI(b),this):this.each(function(){c(this,b)})},a.blockUI.version=2.7,a.blockUI.defaults={message:"Please wait... ",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"20%",top:"40%",left:"40%",textAlign:"center",color:"#000",border:"2px solid #0971ce",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var n=null,o=[]}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],a):a(jQuery)}();
15 |
--------------------------------------------------------------------------------
/assets/js/paystack-admin.js:
--------------------------------------------------------------------------------
1 | (function ( $ ) {
2 | 'use strict';
3 | $('.pf-number').keydown(
4 | function (event) {
5 | if (event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9
6 | || event.keyCode == 27 || event.keyCode == 13
7 | || (event.keyCode == 65 && event.ctrlKey === true)
8 | || (event.keyCode >= 35 && event.keyCode <= 39)
9 | ) {
10 | return;
11 | }else{
12 | if (event.shiftKey || (event.keyCode < 48 || event.keyCode > 57) && (event.keyCode < 96 || event.keyCode > 105 )) {
13 | event.preventDefault();
14 | }
15 | }
16 | }
17 | );
18 | })(jQuery);
19 |
--------------------------------------------------------------------------------
/assets/js/tinymce-plugin.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | tinymce.PluginManager.add(
3 | 'custom_class', function ( editor, url ) {
4 | // Add Button to Visual Editor Toolbar
5 | editor.addButton(
6 | 'custom_class', {
7 | title: 'Insert CSS Class',
8 | cmd: 'custom_class',
9 | icon: 'icon dashicons-wordpress',
10 | }
11 | );
12 |
13 | // Add Command when Button Clicked
14 | editor.addCommand(
15 | 'custom_class', function () {
16 | // Check we have selected some text selected
17 | var text = editor.selection.getContent(
18 | {
19 | 'format': 'html'
20 | }
21 | );
22 | if (text.length === 0 ) {
23 | alert('Please select some text.');
24 | return;
25 | }
26 |
27 | // Ask the user to enter a CSS class
28 | var result = prompt('Enter the CSS class');
29 | if (!result ) {
30 | // User cancelled - exit
31 | return;
32 | }
33 | if (result.length === 0) {
34 | // User didn't enter anything - exit
35 | return;
36 | }
37 |
38 | // Insert selected text back into editor, wrapping it in an anchor tag
39 | editor.execCommand('mceReplaceContent', false, '' + text + ' ');
40 | }
41 | );
42 |
43 | // Enable/disable the button on the node change event
44 | editor.onNodeChange.add(
45 | function ( editor ) {
46 | // Get selected text, and assume we'll disable our button
47 | var selection = editor.selection.getContent();
48 | var disable = true;
49 |
50 | // If we have some text selected, don't disable the button
51 | if (selection ) {
52 | disable = false;
53 | }
54 |
55 | // Define whether our button should be enabled or disabled
56 | editor.controlManager.setDisabled('custom_class', disable);
57 | }
58 | );
59 | }
60 | );
61 | })();
--------------------------------------------------------------------------------
/includes/classes/class-activation.php:
--------------------------------------------------------------------------------
1 | prefix . PFF_PAYSTACK_TABLE;
25 | $table_name = sanitize_text_field( $table_name );
26 |
27 | // Include the DB Functions.
28 | include_once ABSPATH . 'wp-admin/includes/upgrade.php';
29 |
30 | Activation::create_tables( $table_name );
31 | Activation::maybe_upgrade( $table_name );
32 | update_option( 'kkd_db_version', '2.0' );
33 | }
34 |
35 | /**
36 | * Install Paystack DB Table
37 | */
38 | public static function create_tables( $table_name ) {
39 | global $wpdb;
40 | $query = "CREATE TABLE IF NOT EXISTS `{$table_name}` (
41 | id int(11) NOT NULL AUTO_INCREMENT,
42 | post_id int(11) NOT NULL,
43 | user_id int(11) NOT NULL,
44 | email varchar(255) DEFAULT '' NOT NULL,
45 | metadata text,
46 | paid int(1) NOT NULL DEFAULT '0',
47 | plan varchar(255) DEFAULT '' NOT NULL,
48 | txn_code varchar(255) DEFAULT '' NOT NULL,
49 | txn_code_2 varchar(255) DEFAULT '' NOT NULL,
50 | amount varchar(255) DEFAULT '' NOT NULL,
51 | ip varchar(255) NOT NULL,
52 | deleted_at varchar(255) DEFAULT '' NULL,
53 | created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
54 | paid_at timestamp,
55 | modified timestamp DEFAULT '0000-00-00 00:00:00' NOT NULL,
56 | UNIQUE KEY id (id),PRIMARY KEY (id)
57 | ) {$wpdb->get_charset_collate()};";
58 | dbDelta( $query );
59 | }
60 |
61 | /**
62 | * Install Paystack DB Table
63 | *
64 | * This function supresses the following WPCS warnings because we dont want caching involved.
65 | */
66 | public static function maybe_upgrade( $table_name ) {
67 | global $wpdb;
68 |
69 | $table_name = esc_sql( $table_name );
70 |
71 | // Get the current version number, defaults to 1.0
72 | $version = get_option( 'kkd_db_version', '1.0' );
73 |
74 | if ( version_compare( $version, '2.0' ) < 0 ) {
75 | // Check if the plan column is there?
76 | // phpcs:ignore WordPress.DB.DirectDatabaseQuery
77 | $row = $wpdb->get_results(
78 | $wpdb->prepare(
79 | "SELECT COLUMN_NAME
80 | FROM INFORMATION_SCHEMA.COLUMNS
81 | WHERE table_name = %s
82 | AND column_name = 'plan'",
83 | $table_name
84 | )
85 | );
86 | // Add in the plan column if not.
87 | if ( empty( $row ) ) {
88 | // phpcs:ignore WordPress.DB.DirectDatabaseQuery
89 | $wpdb->query(
90 | $wpdb->prepare(
91 | // phpcs:ignore WordPress.DB.DirectDatabaseQuery
92 | "ALTER TABLE `%s` ADD `plan` VARCHAR(255) NOT NULL AFTER `paid`;",
93 | $table_name
94 | )
95 | );
96 | }
97 |
98 | // Add in the txn_code_2 column.
99 | // phpcs:ignore WordPress.DB.DirectDatabaseQuery
100 | $row1 = $wpdb->get_results(
101 | $wpdb->prepare(
102 | "SELECT COLUMN_NAME
103 | FROM INFORMATION_SCHEMA.COLUMNS
104 | WHERE table_name = %s
105 | AND column_name = 'txn_code_2'",
106 | $table_name
107 | )
108 | );
109 | if ( empty( $row1 ) ) {
110 | // phpcs:ignore WordPress.DB.DirectDatabaseQuery
111 | $wpdb->query(
112 | $wpdb->prepare(
113 | // phpcs:ignore WordPress.DB.DirectDatabaseQuery
114 | "ALTER TABLE `%s` ADD `txn_code_2` VARCHAR(255) DEFAULT '' NULL AFTER `txn_code`;",
115 | $table_name
116 | )
117 | );
118 | }
119 |
120 | // Add in the paid_at column.
121 | // phpcs:ignore WordPress.DB.DirectDatabaseQuery
122 | $row2 = $wpdb->get_results(
123 | $wpdb->prepare(
124 | "SELECT COLUMN_NAME
125 | FROM INFORMATION_SCHEMA.COLUMNS
126 | WHERE table_name = %s
127 | AND column_name = 'paid_at'",
128 | $table_name
129 | )
130 | );
131 | if ( empty( $row2 ) ) {
132 | // phpcs:ignore WordPress.DB.DirectDatabaseQuery
133 | $wpdb->query(
134 | $wpdb->prepare(
135 | // phpcs:ignore WordPress.DB.DirectDatabaseQuery
136 | "ALTER TABLE `%s` ADD `paid_at` timestamp AFTER `created_at`;",
137 | $table_name
138 | )
139 | );
140 | }
141 | }
142 | }
143 | }
144 |
--------------------------------------------------------------------------------
/includes/classes/class-api.php:
--------------------------------------------------------------------------------
1 | public = esc_attr( get_option( 'tpk' ) );
61 | $this->secret = esc_attr( get_option( 'tsk' ) );
62 | } else {
63 | $this->public = esc_attr( get_option( 'lpk' ) );
64 | $this->secret = esc_attr( get_option( 'lsk' ) );
65 | }
66 | }
67 |
68 | /**
69 | * Sets the module variable.
70 | *
71 | * @param string $module
72 | * @return string
73 | */
74 | protected function set_module( $module = '' ) {
75 | $this->module = $module . '/';
76 | }
77 |
78 | /**
79 | * Sets the additional URl arguments.
80 | *
81 | * @param string $module
82 | * @return string
83 | */
84 | protected function set_url_args( $args = '' ) {
85 | $this->url_args = $args;
86 | }
87 |
88 | /**
89 | * Gets the headers for the current request.
90 | *
91 | * @return array
92 | */
93 | protected function get_headers(){
94 | return array(
95 | 'Authorization' => 'Bearer ' . $this->secret
96 | );
97 | }
98 |
99 | /**
100 | * Gets the headers for the current request.
101 | *
102 | * @return string
103 | */
104 | protected function get_url(){
105 | return $this->url . $this->module . $this->url_args;
106 | }
107 |
108 | /**
109 | * Gets the arguments for the current request.
110 | *
111 | * @return array
112 | */
113 | protected function get_args(){
114 | return array(
115 | 'headers' => $this->get_headers(),
116 | 'timeout' => 60
117 | );
118 | }
119 |
120 | /**
121 | * Sends a GET request and checks to see is is_wp_error().
122 | *
123 | * @return boolean|object
124 | */
125 | public function get_request() {
126 | $response = false;
127 | $return = wp_remote_get( $this->get_url(), $this->get_args() );
128 | if ( ! is_wp_error( $return ) && 200 === wp_remote_retrieve_response_code( $return ) ) {
129 | $response = json_decode( wp_remote_retrieve_body( $return ) );
130 | }
131 | return $response;
132 | }
133 |
134 | /**
135 | * Sends a POST request and checks to see is is_wp_error().
136 | *
137 | * @return boolean|object
138 | */
139 | public function post_request( $body = [] ) {
140 | $response = false;
141 | $args = array(
142 | 'body' => $body,
143 | 'headers' => $this->get_headers(),
144 | 'timeout' => 60,
145 | );
146 | $return = wp_remote_post( $this->get_url(), $args );
147 | if ( ! empty( $body ) && ! is_wp_error( $return ) && 200 === wp_remote_retrieve_response_code( $return ) ) {
148 | $response = json_decode( wp_remote_retrieve_body( $return ) );
149 | }
150 | return $response;
151 | }
152 |
153 | /**
154 | * Determines if all the settings have been entered.
155 | *
156 | * @return boolean
157 | */
158 | public function api_ready() {
159 | $ready = false;
160 | if ( '' !== $this->secret ) {
161 | $ready = true;
162 | }
163 | return $ready;
164 | }
165 | }
--------------------------------------------------------------------------------
/includes/classes/class-confirm-payment.php:
--------------------------------------------------------------------------------
1 | payment_meta = $payment;
106 | $this->meta = $this->helpers->parse_meta_values( get_post( $this->payment_meta->post_id ) );
107 | $this->form_id = $this->payment_meta->post_id;
108 | $this->amount = $this->payment_meta->amount;
109 | $this->oamount = $this->amount;
110 | $this->reference = $this->payment_meta->txn_code;
111 | if ( isset( $this->payment_meta->txn_code_2 ) && ! empty( $this->payment_meta->txn_code_2 ) ) {
112 | $this->reference = $this->payment_meta->txn_code_2;
113 | }
114 | }
115 |
116 | /**
117 | * Confirm Payment Functionality.
118 | */
119 | public function confirm_payment() {
120 |
121 | if ( ! isset( $_POST['nonce'] ) || false === wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce'] ) ), 'pff-paystack-confirm' ) ) {
122 | $response = array(
123 | 'error' => true,
124 | 'error_message' => esc_html__( 'Nonce verification is required.', 'pff-paystack' ),
125 | );
126 |
127 | exit( wp_json_encode( $response ) );
128 | }
129 |
130 | // This is a false positive, we are using isset as WPCS suggest in the PCP plugin.
131 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
132 | if ( ! isset( $_POST['code'] ) || '' === trim( wp_unslash( $_POST['code'] ) ) ) {
133 | $response = array(
134 | 'error' => true,
135 | 'error_message' => esc_html__( 'Did you make a payment?', 'pff-paystack' ),
136 | );
137 |
138 | exit( wp_json_encode( $response ) );
139 | }
140 |
141 | // If this is a retry payment then set the colum accordingly.
142 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
143 | if ( isset( $_POST['retry'] ) ) {
144 | $this->txn_column = 'txn_code_2';
145 | }
146 |
147 | // This is a false positive, we are using isset as WPCS suggest in the PCP plugin.
148 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
149 | if ( isset( $_POST['quantity'] ) ) {
150 | $this->quantity = sanitize_text_field( wp_unslash( $_POST['quantity'] ) );
151 | }
152 |
153 | $this->helpers = new Helpers();
154 | $code = sanitize_text_field( wp_unslash( $_POST['code'] ) );
155 | $record = $this->helpers->get_db_record( $code, $this->txn_column );
156 |
157 | if ( false !== $record ) {
158 |
159 | $this->setup_data( $record );
160 |
161 | // Verify our transaction with the Paystack API.
162 | $transaction = pff_paystack()->classes['transaction-verify']->verify_transaction( $code );
163 |
164 | if ( ! empty( $transaction ) && isset( $transaction['data'] ) ) {
165 | $transaction['data'] = json_decode( $transaction['data'] );
166 | if ( 'success' === $transaction['data']->status ) {
167 | $this->update_sold_inventory();
168 | $response = $this->update_payment_dates( $transaction['data'] );
169 | }
170 | } else {
171 | $response = [
172 | 'message' => esc_html__( 'Failed to connect to Paystack.', 'pff-paystack' ),
173 | 'result' => 'failed',
174 | ];
175 | }
176 |
177 | } else {
178 | $response = [
179 | 'message' => esc_html__( 'Payment Verification Failed', 'pff-paystack' ),
180 | 'result' => 'failed',
181 | ];
182 | }
183 |
184 | // Create plan and send reciept.
185 | if ( 'success' === $response['result'] ) {
186 |
187 | // Create a plan that the user will be subscribed to.
188 | $this->maybe_create_subscription();
189 |
190 | $sendreceipt = $this->meta['sendreceipt'];
191 | $decoded = json_decode( $this->payment_meta->metadata );
192 | $fullname = $decoded[1]->value;
193 |
194 | if ( 'yes' === $sendreceipt ) {
195 | /**
196 | * Allow 3rd Party Plugins to hook into the email sending.
197 | *
198 | * 10: Email_Receipt::send_receipt();
199 | * 11: Email_Receipt_Owner::send_receipt_owner();
200 | */
201 |
202 | do_action( 'pff_paystack_send_receipt',
203 | $this->payment_meta->post_id,
204 | $this->payment_meta->currency,
205 | $this->payment_meta->amount,
206 | $fullname,
207 | $this->payment_meta->email,
208 | $this->reference,
209 | $this->payment_meta->metadata
210 | );
211 |
212 | /**
213 | * Allow 3rd Party Plugins to hook into the email sending.
214 | * 11: Email_Receipt_Owner::send_receipt_owner();
215 | */
216 |
217 | do_action( 'pff_paystack_send_receipt_owner',
218 | $this->payment_meta->post_id,
219 | $this->payment_meta->currency,
220 | $this->payment_meta->amount,
221 | $fullname,
222 | $this->payment_meta->email,
223 | $this->reference,
224 | $this->payment_meta->metadata
225 | );
226 | }
227 | }
228 |
229 | if ( 'success' === $response['result'] && '' !== $this->meta['redirect'] ) {
230 | $response['result'] = 'success2';
231 | $response['link'] = $this->add_param_to_url( $this->meta['redirect'], $this->reference );
232 | }
233 |
234 | echo wp_json_encode( $response );
235 | die();
236 | }
237 |
238 | /**
239 | * Adds parameters to a URL.
240 | *
241 | * @param string $url The original URL.
242 | * @param string $ref The reference value to add as a parameter.
243 | * @return string The modified URL with added parameters.
244 | */
245 | public function add_param_to_url( $url, $ref ) {
246 | // Parse the URL.
247 | $parsed_url = wp_parse_url( $url );
248 |
249 | // Parse query parameters into an array.
250 | parse_str( isset( $parsed_url['query'] ) ? $parsed_url['query'] : '', $query_params );
251 |
252 | // Add the "trxref" and "reference" parameters to the query parameters.
253 | $query_params['trxref'] = $ref;
254 | $query_params['reference'] = $ref;
255 |
256 | // Rebuild the query string.
257 | $query_string = http_build_query( $query_params );
258 |
259 | // Construct the new URL.
260 | $new_url = ( isset( $parsed_url['scheme'] ) ? $parsed_url['scheme'] . '://' : '' );
261 | $new_url .= ( isset( $parsed_url['user'] ) ? $parsed_url['user'] . ( isset( $parsed_url['pass'] ) ? ':' . $parsed_url['pass'] : '' ) . '@' : '' );
262 | $new_url .= ( isset( $parsed_url['host'] ) ? $parsed_url['host'] : '' );
263 | $new_url .= ( isset( $parsed_url['port'] ) ? ':' . $parsed_url['port'] : '' );
264 | $new_url .= ( isset( $parsed_url['path'] ) ? $parsed_url['path'] : '' );
265 | $new_url .= ( ! empty( $query_string ) ? '?' . $query_string : '' );
266 | $new_url .= ( isset( $parsed_url['fragment'] ) ? '#' . $parsed_url['fragment'] : '' );
267 |
268 | return $new_url;
269 | }
270 |
271 | /**
272 | * Update the sold invetory with the amount of payments made.
273 | *
274 | * @return void
275 | */
276 | protected function update_sold_inventory() {
277 | $usequantity = $this->meta['usequantity'];
278 | $sold = (int) $this->meta['sold'];
279 |
280 | if ( 'yes' === $usequantity ) {
281 | $quantity = 1;
282 | // Nonce is checked above in the parent function confirm_payment().
283 | // phpcs:ignore WordPress.Security.NonceVerification
284 | if ( isset( $_POST['quantity'] ) ) {
285 | // phpcs:ignore WordPress.Security.NonceVerification
286 | $quantity = (int) sanitize_text_field( wp_unslash( $_POST['quantity'] ) );
287 | }
288 | $sold = $this->meta['sold'];
289 |
290 | if ( '' === $sold ) {
291 | $sold = 0;
292 | }
293 | $sold += $quantity;
294 | } else {
295 | $sold++;
296 | }
297 |
298 | if ( $this->meta['sold'] ) {
299 | update_post_meta( $this->form_id, '_sold', $sold );
300 | } else {
301 | add_post_meta( $this->form_id, '_sold', $sold, true );
302 | }
303 | }
304 |
305 | /**
306 | * Updates the paid Date for the current record.
307 | *
308 | * @param object $data
309 | * @return array
310 | */
311 | protected function update_payment_dates( $data ) {
312 | global $wpdb;
313 | $table = $wpdb->prefix . PFF_PAYSTACK_TABLE;
314 | $return = [
315 | 'message' => esc_html__( 'DB not updated.', 'pff-paystack' ),
316 | 'result' => 'failed',
317 | ];
318 |
319 | $amount_paid = $data->amount / 100;
320 | $paystack_ref = $data->reference;
321 | $paid_at = $data->transaction_date;
322 | if ( 'optional' === $this->meta['recur'] || 'plan' === $this->meta['recur'] ) {
323 | // phpcs:ignore WordPress.DB.DirectDatabaseQuery
324 | $wpdb->update(
325 | $table,
326 | array(
327 | 'paid' => 1,
328 | 'amount' => $amount_paid,
329 | 'paid_at' => $paid_at,
330 | ),
331 | array( $this->txn_column => $paystack_ref )
332 | );
333 | $return = [
334 | 'message' => $this->meta['successmsg'],
335 | 'result' => 'success',
336 | ];
337 | } else {
338 | // If this the price paid was free, or if it was a variable amount.
339 | if ( 0 === (int) $this->oamount || 1 === $this->meta['usevariableamount'] ) {
340 | // phpcs:ignore WordPress.DB.DirectDatabaseQuery
341 | $wpdb->update(
342 | $table,
343 | array(
344 | 'paid' => 1,
345 | 'amount' => $amount_paid,
346 | 'paid_at' => $paid_at,
347 | ),
348 | array( $this->txn_column => $paystack_ref )
349 | );
350 | $return = [
351 | 'message' => $this->meta['successmsg'],
352 | 'result' => 'success',
353 | ];
354 | } else {
355 | if ( (int) $this->oamount !== (int) $amount_paid ) {
356 | $return = [
357 | // translators: %1$s: currency, %2$s: formatted amount required
358 | 'message' => sprintf( esc_html__( 'Invalid amount Paid. Amount required is %1$s%2$s ', 'pff-paystack' ), $this->meta['currency'], number_format( $this->oamount ) ),
359 | 'result' => 'failed',
360 | ];
361 | } else {
362 | // phpcs:ignore WordPress.DB.DirectDatabaseQuery
363 | $wpdb->update(
364 | $table,
365 | array(
366 | 'paid' => 1,
367 | 'paid_at' => $paid_at,
368 | ),
369 | array( $this->txn_column => $paystack_ref )
370 | );
371 | $return = [
372 | 'message' => $this->meta['successmsg'],
373 | 'result' => 'success',
374 | ];
375 | }
376 | }
377 | }
378 | return $return;
379 | }
380 |
381 | protected function maybe_create_subscription() {
382 | // Create a "subscription" and attach it to the current plan code.
383 | if ( 1 == $this->meta['startdate_enabled'] && ! empty( $this->meta['startdate_days'] ) && ! empty( $this->meta['startdate_plan_code'] ) ) {
384 | $start_date = gmdate( 'c', strtotime( '+' . $this->meta['startdate_days'] . ' days' ) );
385 | $body = array(
386 | 'start_date' => $start_date,
387 | 'plan' => $this->meta['startdate_plan_code'],
388 | 'customer' => $this->payment_meta->email,
389 | );
390 |
391 | $created_sub = pff_paystack()->classes['request-subscription']->create_subscription( $body );
392 | if ( false !== $created_sub ) {
393 | // Nothing defined for this.
394 | }
395 | }
396 | }
397 | }
--------------------------------------------------------------------------------
/includes/classes/class-email-invoice.php:
--------------------------------------------------------------------------------
1 | slug = 'invoice';
53 | $this->form_id = $form_id;
54 | $this->amount = $amount;
55 | $this->currency = $currency;
56 | $this->code = $code;
57 | $this->name = $name;
58 | $this->email = stripslashes( $email );
59 | $this->referer_url = $referer_url;
60 |
61 | $this->subject = sprintf(
62 | // Translators: %1$s is the currency code, %2$s is the formatted amount
63 | esc_html__( 'Payment Invoice for %1$s %2$s', 'text-domain' ),
64 | $currency,
65 | number_format( $amount )
66 | );
67 | $this->reply_to = get_option( 'admin_email' );
68 | $this->reply_name = get_option( 'blogname' );
69 | $this->send();
70 | }
71 |
72 | public function get_html_body() {
73 | ?>
74 |
75 |
76 |
77 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 | #code ); ?>
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 | name ); ?>
131 | email ); ?>
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 | currency ) . ' ' . number_format( $this->amount ); ?>
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
171 |
172 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
231 |
232 |
233 |
234 | slug = 'receipt-owner';
51 | $this->amount = $amount;
52 | $this->currency = $currency;
53 | $this->code = $code;
54 | $this->name = $name;
55 | $this->html_email = stripslashes( $email );
56 | $this->metadata = $metadata;
57 |
58 | // Custom Values
59 | $this->subject = esc_html__( 'You just received a payment' , 'pff-paystack' );
60 | $this->heading = get_post_meta( $form_id, '_heading', true );
61 | $this->sitemessage = get_post_meta( $form_id, '_message', true );
62 |
63 | $this->reply_to = get_option( 'admin_email' );
64 | $this->reply_name = get_option( 'blogname' );
65 | $this->email = stripslashes( $this->reply_to );
66 | $this->send();
67 | }
68 |
69 | public function get_html_body() {
70 | ?>
71 |
72 |
73 |
74 |
75 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 | : currency ) . ' ' . number_format( $this->amount ); ?>
132 | : html_email ); ?>
133 | metadata );
135 | if ( array_key_exists( "0", $new ) ) {
136 | foreach ( $new as $key => $item ) {
137 | if ( 'text' === $item->type ) {
138 | echo esc_html( $item->display_name ) . ' :' . esc_html( $item->value ) . ' ';
139 | } else {
140 | echo esc_html( $item->display_name ) . ' : ' . esc_html__( 'link', 'pff-paystack' ) . ' ';
141 | }
142 | }
143 | } else {
144 | if ( count( $new ) > 0 ) {
145 | foreach ( $new as $key => $item ) {
146 | echo esc_html( $key ) . ' :' . esc_html( $item ) . ' ';
147 | }
148 | }
149 | }
150 | ?>
151 | : code ); ?>
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 | currency . ' ' . number_format( $this->amount ) ); ?> .
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
219 |
220 |
221 |
222 | slug = 'receipt';
58 | $this->amount = $amount;
59 | $this->currency = $currency;
60 | $this->code = $code;
61 | $this->name = $name;
62 | $this->email = stripslashes( $email );
63 | $this->metadata = $metadata;
64 |
65 | // Custom Values
66 | $this->subject = get_post_meta( $form_id, '_subject', true );
67 | $this->merchant = get_post_meta( $form_id, '_merchant', true );
68 | $this->heading = get_post_meta( $form_id, '_heading', true );
69 | $this->sitemessage = get_post_meta( $form_id, '_message', true );
70 |
71 | $this->reply_to = get_option( 'admin_email' );
72 | $this->reply_name = get_option( 'blogname' );
73 | $this->send();
74 | }
75 |
76 | public function get_html_body() {
77 | ?>
78 |
79 |
80 |
81 |
82 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | heading ); ?>
107 |
108 |
109 | name . ' ', ' ', true ) )
114 | );
115 | ?>
116 |
117 |
118 | sitemessage ); ?>
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 | currency ),
167 | esc_html( number_format_i18n( $this->amount ) )
168 | );
169 | ?>
170 | email )
175 | );
176 | ?>
177 | metadata );
179 | if ( array_key_exists( '0', $new ) ) {
180 | foreach ( $new as $key => $item ) {
181 | if ( 'text' === $item->type ) {
182 | echo sprintf(
183 | /* translators: %1$s: Display name, %2$s: Value */
184 | '%1$s : %2$s ',
185 | esc_html( $item->display_name ),
186 | esc_html( $item->value )
187 | );
188 | } else {
189 | echo sprintf(
190 | /* translators: %s: Display name */
191 | '%1$s : link ',
192 | esc_html( $item->display_name ),
193 | esc_url( $item->value )
194 | );
195 | }
196 | }
197 | } else {
198 | if ( count( (array) $new ) > 0 ) {
199 | foreach ( $new as $key => $item ) {
200 | echo sprintf(
201 | /* translators: %1$s: Key, %2$s: Item */
202 | '%1$s : %2$s ',
203 | esc_html( $key ),
204 | esc_html( $item )
205 | );
206 | }
207 | }
208 | }
209 | printf(
210 | /* translators: %s: Transaction code */
211 | esc_html__( 'Transaction code: %s', 'pff-paystack' ),
212 | esc_html( $this->code )
213 | );
214 | ?>
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 | currency . ' ' . number_format_i18n( $this->amount ) )
247 | );
248 | ?>
249 |
250 |
251 | .
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
296 |
297 |
298 |
299 |
300 | get_html_header();
105 | $this->get_html_body();
106 | $this->get_html_footer();
107 | $message = ob_get_contents();
108 | ob_end_clean();
109 | return $message;
110 | }
111 |
112 | public function get_html_header() {
113 | ?>
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
128 |
129 |
132 |
133 |
138 |
139 |
140 |
145 |
146 | reply_to}",
154 | "From: {$this->reply_name} <{$this->reply_to}>"
155 | );
156 | }
157 |
158 | public function send() {
159 | wp_mail( $this->email, $this->subject, $this->get_email_body(), $this->get_headers() );
160 | }
161 | }
--------------------------------------------------------------------------------
/includes/classes/class-field-shortcodes.php:
--------------------------------------------------------------------------------
1 | esc_html__( 'Title', 'pff-paystack' ),
41 | 'required' => '0',
42 | ),
43 | $atts,
44 | 'text'
45 | );
46 |
47 | // sanitize name attribute before using it.
48 | $atts['name'] = $this->sanitize_and_escape( $atts['name'] );
49 |
50 | // translators: %s: input field name to be entered by the user
51 | $name = sanitize_text_field( sprintf( esc_attr__( 'Enter %s', 'pff-paystack' ), $atts['name'] ) );
52 | $required = $atts['required'] === 'required' ? 'required' : '';
53 | $id = uniqid( 'text-' );
54 |
55 | $code = '
56 |
' . esc_html( $name );
57 |
58 | if ( $required ) {
59 | $code .= ' * ';
60 | }
61 |
62 | $code .= '
63 |
64 |
';
65 |
66 | return $code;
67 | }
68 | /**
69 | * Generates the "textarea" field.
70 | *
71 | * @param array $atts
72 | * @return string
73 | */
74 | public function textarea_field( $atts ) {
75 |
76 | $atts = shortcode_atts(
77 | array(
78 | 'name' => esc_html__( 'Title', 'pff-paystack' ),
79 | 'required' => '0',
80 | ),
81 | $atts,
82 | 'textarea'
83 | );
84 | // sanitize name attribute before using it
85 | $atts['name'] = $this->sanitize_and_escape( $atts['name'] );
86 |
87 | // translators: %s: textarea field to be entered by the user
88 | $name = sanitize_text_field( sprintf( esc_attr__( 'Enter %s', 'pff-paystack' ), $atts['name'] ) );
89 | $required = $atts['required'] === 'required' ? 'required' : '';
90 |
91 | $id = uniqid( 'textarea-' );
92 |
93 | $code = '';
94 | $code .= '
' . esc_html( $name );
95 |
96 | if ( $required ) {
97 | $code .= ' * ';
98 | }
99 |
100 | $code .= ' ';
101 | $code .= '
';
102 | $code .= '
';
103 |
104 | return $code;
105 | }
106 | /**
107 | * Generates the "checkbot" input field.
108 | *
109 | * @param array $atts
110 | * @return string
111 | */
112 | public function checkbox_field( $atts ) {
113 | $atts = shortcode_atts(
114 | array(
115 | 'name' => esc_html__( 'Title', 'pff-paystack' ),
116 | 'options' => '',
117 | 'required' => '0',
118 | ),
119 | $atts,
120 | 'checkbox'
121 | );
122 |
123 | $name = sanitize_text_field( $atts['name'] );
124 | $options = array_map( 'sanitize_text_field', explode( ',', $atts['options'] ) );
125 | $required = $atts['required'] === 'required' ? 'required' : '';
126 |
127 | $code = '';
128 | $code .= '
' . esc_html( $name );
129 |
130 | if ( $required ) {
131 | $code .= ' * ';
132 | }
133 |
134 | $code .= ' ';
135 | $code .= '
';
136 |
137 | foreach ( $options as $option ) {
138 | $id = uniqid( 'checkbox-' );
139 | $code .= '';
140 | $code .= ' ';
141 | $code .= ' ';
142 | $code .= esc_html( $option );
143 | $code .= ' ';
144 | }
145 |
146 | $code .= '
';
147 |
148 | return $code;
149 | }
150 | /**
151 | * Generates the general "input" input field.
152 | *
153 | * @param array $atts
154 | * @return string
155 | */
156 | public function input_field( $atts ) {
157 | $atts = shortcode_atts(
158 | array(
159 | 'name' => esc_html__( 'Title', 'pff-paystack' ),
160 | 'required' => '0',
161 | ),
162 | $atts,
163 | 'input'
164 | );
165 |
166 | $atts['name'] = $this->sanitize_and_escape( $atts['name'] );
167 | $name = sanitize_text_field( $atts['name'] );
168 |
169 | $required = $atts['required'] === 'required' ? 'required' : '';
170 | $fileInputId = uniqid( 'file-input-' );
171 | $textInputId = uniqid( 'text-input-' );
172 |
173 | $code = '';
174 | $code .= '
' . esc_html( $name );
175 |
176 | if ( $required ) {
177 | $code .= ' * ';
178 | }
179 |
180 | $code .= ' ';
181 | $code .= '
';
188 |
189 | return $code;
190 | }
191 | /**
192 | * Generates the "datepicker" input field.
193 | *
194 | * @param array $atts
195 | * @return string
196 | */
197 | public function datepicker_field( $atts ) {
198 | $atts = shortcode_atts(
199 | array(
200 | 'name' => esc_html__( 'Title', 'pff-paystack' ),
201 | 'required' => '0',
202 | ),
203 | $atts,
204 | 'datepicker'
205 | );
206 |
207 | // sanitize name attribute before using it
208 | $atts['name'] = $this->sanitize_and_escape( $atts['name'] );
209 |
210 | // translators: %s: datepicker field to be selected by the user
211 | $name = sanitize_text_field( sprintf( esc_attr__( 'Enter %s', 'pff-paystack' ), $atts['name'] ) );
212 | $required = $atts['required'] === 'required' ? 'required' : '';
213 | $id = uniqid( 'datepicker-' );
214 |
215 | $code = '';
216 | $code .= '
' . esc_html( $name );
217 |
218 | if ( $required ) {
219 | $code .= ' * ';
220 | }
221 |
222 | $code .= ' ';
223 | $code .= '
';
224 | $code .= '
';
225 |
226 | return $code;
227 | }
228 | /**
229 | * Generates the "dropdown" select field.
230 | *
231 | * @param array $atts
232 | * @return string
233 | */
234 | public function select_field( $atts ) {
235 | $atts = shortcode_atts(
236 | array(
237 | 'name' => esc_html__( 'Title', 'pff-paystack' ),
238 | 'options' => '',
239 | 'required' => '0',
240 | ),
241 | $atts,
242 | 'select'
243 | );
244 |
245 | $name = sanitize_text_field( $atts['name'] );
246 | $options = array_map( 'sanitize_text_field', explode( ',', $atts['options'] ) );
247 | $required = $atts['required'] === 'required' ? 'required' : '';
248 | $id = uniqid( 'select-' );
249 |
250 | $code = '';
251 | $code .= '
' . esc_html( $name );
252 |
253 | if ( $required ) {
254 | $code .= ' * ';
255 | }
256 |
257 | $code .= ' ';
258 | $code .= '
';
259 | $code .= '';
260 |
261 | foreach ( $options as $option ) {
262 | $code .= '' . esc_html( $option ) . ' ';
263 | }
264 |
265 | $code .= '
';
266 |
267 | return $code;
268 | }
269 | /**
270 | * Generates the "radio" input field.
271 | *
272 | * @param array $atts
273 | * @return string
274 | */
275 | public function radio_field( $atts ) {
276 | $atts = shortcode_atts(
277 | array(
278 | 'name' => esc_html__( 'Title', 'pff-paystack' ),
279 | 'options' => '',
280 | 'required' => '0',
281 | ),
282 | $atts,
283 | 'radio'
284 | );
285 |
286 | $name = sanitize_text_field( $atts['name'] );
287 | $options = array_map( 'sanitize_text_field', explode( ',', $atts['options'] ) );
288 | $required = $atts['required'] === 'required' ? 'required' : '';
289 |
290 | $code = '';
291 | $code .= '
' . esc_html( $name );
292 |
293 | if ( $required ) {
294 | $code .= ' * ';
295 | }
296 |
297 | $code .= ' ';
298 | $code .= '
';
299 |
300 | foreach ( $options as $index => $option ) {
301 | $id = uniqid( 'radio-' );
302 | $isChecked = $index == 0 ? 'checked' : '';
303 | $code .= '';
304 | $code .= ' ';
305 | $code .= ' ';
306 | $code .= esc_html( $option );
307 | $code .= ' ';
308 | }
309 |
310 | $code .= '
';
311 |
312 | return $code;
313 | }
314 |
315 | /**
316 | * Sanitize and escape a string for safe HTML output.
317 | *
318 | * @param string $value The input string to sanitize and escape.
319 | * @return string The sanitized and escaped string.
320 | */
321 | private function sanitize_and_escape( $value ) {
322 | // Remove all HTML tags, including malformed ones
323 | $value = wp_kses( $value, array() );
324 |
325 | // Replace backticks with single quotes
326 | $value = str_replace( '`', '`', $value );
327 |
328 | // Sanitize the string for safe database storage
329 | $value = sanitize_text_field( $value );
330 |
331 | // Escape the string for safe HTML output
332 | return esc_html( $value );
333 | }
334 | }
--------------------------------------------------------------------------------
/includes/classes/class-forms-list.php:
--------------------------------------------------------------------------------
1 | ID ) . '" >' . esc_html__( 'View Payments', 'payment_forms' ) . '';
40 | }
41 | return $actions;
42 | }
43 |
44 | /**
45 | * Registers our column names.
46 | *
47 | * @param array $columns
48 | * @return array
49 | */
50 | public function register_columns( $columns ) {
51 | $columns = array(
52 | 'cb' => ' ',
53 | 'title' => esc_html__( 'Name', 'pff-paystack' ),
54 | 'shortcode' => esc_html__( 'Shortcode', 'pff-paystack' ),
55 | 'payments' => esc_html__( 'Payments', 'pff-paystack' ),
56 | 'date' => esc_html__( 'Date', 'pff-paystack' )
57 | );
58 | return $columns;
59 | }
60 |
61 | public function column_data( $column, $post_id ) {
62 | $helpers = Helpers::get_instance();
63 | switch ( $column ) {
64 | case 'shortcode':
65 | echo wp_kses_post( '[pff-paystack id="' . $post_id . '"]"
' );
66 | break;
67 | case 'payments':
68 | $num = $helpers->get_payments_count( $post_id );
69 | echo wp_kses_post( '' . $num . ' ' );
70 | break;
71 | default:
72 | break;
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/includes/classes/class-payments-list-table.php:
--------------------------------------------------------------------------------
1 | form_id = sanitize_text_field( wp_unslash( $_GET['form'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
20 | $helpers = Helpers::get_instance();
21 | $data = array();
22 | $row_data = $helpers->get_payments_by_id( $this->form_id, $this->get_args() );
23 | $data = $this->format_row_data( $row_data );
24 | $columns = $this->get_columns();
25 | $hidden = $this->get_hidden_columns();
26 | $sortable = $this->get_sortable_columns();
27 | $per_page = 20;
28 | $current_page = $this->get_pagenum();
29 | $total_items = count( $data );
30 |
31 | $this->set_pagination_args(
32 | array(
33 | 'total_items' => $total_items,
34 | 'per_page' => $per_page
35 | )
36 | );
37 | $data = array_slice( $data, ( ( $current_page - 1 ) * $per_page ), $per_page );
38 | $this->_column_headers = array( $columns, $hidden, $sortable );
39 | $this->items = $data;
40 |
41 | $rows = count( $row_data );
42 | return $rows;
43 | }
44 |
45 | /**
46 | * Returns the headers and keys for our column headers
47 | *
48 | * @return array
49 | */
50 | public function get_columns() {
51 | $columns = array(
52 | 'id' => '#',
53 | 'email' => esc_html__( 'Email', 'pff-paystack' ),
54 | 'amount' => esc_html__( 'Amount', 'pff-paystack' ),
55 | 'txn_code' => esc_html__( 'Txn Code', 'pff-paystack' ),
56 | 'metadata' => esc_html__( 'Data', 'pff-paystack' ),
57 | 'date' => esc_html__( 'Date', 'pff-paystack' ),
58 | );
59 | return $columns;
60 | }
61 |
62 | /**
63 | * Returns an array of the hidden columns
64 | *
65 | * @return array
66 | */
67 | public function get_hidden_columns() {
68 | return array();
69 | }
70 |
71 | /**
72 | * Set which of our columns are sortable.
73 | *
74 | * @return void
75 | */
76 | public function get_sortable_columns() {
77 | return array(
78 | 'email' => array(
79 | 'email',
80 | false
81 | ),
82 | 'date' => array(
83 | 'created_at',
84 | false
85 | ),
86 | 'amount' => array(
87 | 'amount',
88 | false
89 | )
90 | );
91 | }
92 |
93 | /**
94 | * Get the table data
95 | *
96 | * @return Array
97 | */
98 | private function table_data( $data ) {
99 | return $data;
100 | }
101 |
102 | /**
103 | * Define what data to show on each column of the table
104 | *
105 | * @param Array $item Data
106 | * @param String $column_name - Current column name
107 | *
108 | * @return Mixed
109 | */
110 | public function column_default( $item, $column_name ) {
111 | switch ( $column_name ) {
112 | case 'id':
113 | case 'email':
114 | case 'amount':
115 | case 'txn_code':
116 | case 'metadata':
117 | case 'date':
118 | return $item[ $column_name ];
119 |
120 | default:
121 | return print_r( $item, true );
122 | }
123 | }
124 |
125 | /**
126 | * Allows you to sort the data by the variables set in the $_GET
127 | *
128 | * @return int
129 | */
130 | private function get_args() {
131 | $args = array(
132 | 'orderby' => 'created_at',
133 | 'order' => 'desc',
134 | );
135 | // phpcs:ignore WordPress.Security.NonceVerification.Recommended
136 | if ( ! empty( $_GET['orderby'] ) ) {
137 | $args['orderby'] = sanitize_text_field( wp_unslash( $_GET['orderby'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
138 | }
139 | // phpcs:ignore WordPress.Security.NonceVerification.Recommended
140 | if ( ! empty( $_GET['order'] ) ) {
141 | $args['order'] = sanitize_text_field( wp_unslash( $_GET['order'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
142 | if ( 'date' === $args['order'] ) {
143 | $args['order'] = 'created_at';
144 | }
145 | }
146 | return $args;
147 | }
148 |
149 | /**
150 | * Format each row into a readable HTML string.
151 | *
152 | * @param array $data
153 | * @return array
154 | */
155 | public function format_row_data( $alldata ) {
156 | $currency = get_post_meta( $this->form_id, '_currency', true );
157 | $new_data = [];
158 | foreach ( $alldata as $key => $row ) {
159 | $new_key = $key + 1;
160 | if ( $row->txn_code_2 != "" ) {
161 | $txn_code = $row->txn_code_2;
162 | } else {
163 | $txn_code = $row->txn_code;
164 | }
165 | $new_data[] = array(
166 | 'id' => $new_key,
167 | 'email' => '' . $row->email . ' ',
168 | 'amount' => $currency . '' . number_format( $row->amount ) . ' ',
169 | 'txn_code' => $txn_code,
170 | 'metadata' => $this->format_metadata( $row->metadata ),
171 | 'date' => $row->created_at
172 | );
173 | }
174 | return $new_data;
175 | }
176 |
177 | /**
178 | * Format the Meta Data for output in each table row.
179 | *
180 | * @param string $data
181 | * @return string
182 | */
183 | public function format_metadata( $data ) {
184 | $new = json_decode( $data );
185 | $text = '';
186 |
187 | // Determine both for backwards compatability
188 | if ( array_key_exists( "0", $new ) ) {
189 | foreach ( $new as $key => $item ) {
190 | if ( $item->type == 'text' ) {
191 | $text .= '' . $item->display_name . ": " . $item->value . " ";
192 | } else {
193 | $text .= '' . $item->display_name . ": link ";
194 | }
195 | }
196 | } else {
197 | $text = '';
198 | if ( count( $new ) > 0 ) {
199 | foreach ( $new as $key => $item ) {
200 | $text .= '' . $key . ": " . $item . " ";
201 | }
202 | }
203 | }
204 | return $text;
205 | }
206 | }
--------------------------------------------------------------------------------
/includes/classes/class-paystack-forms.php:
--------------------------------------------------------------------------------
1 | object.
49 | *
50 | * @var array
51 | */
52 | public $classes = array();
53 |
54 | /**
55 | * Helpers functions for the custom payments.
56 | *
57 | * @var \paystack\payment_forms\Helpers
58 | */
59 | public $helpers;
60 |
61 | /**
62 | * Initialize the plugin by setting localization, filters, and
63 | * administration functions.
64 | *
65 | * @access private
66 | */
67 | private function __construct() {
68 | $this->set_variables();
69 | $this->include_classes();
70 | $this->init_hooks();
71 | }
72 |
73 | /**
74 | * Return an instance of this class.
75 | *
76 | * @return object \paystack\payment_forms\Payment_Forms
77 | */
78 | public static function get_instance() {
79 | // If the single instance hasn't been set, set it now.
80 | if ( null == self::$instance ) {
81 | self::$instance = new self();
82 | }
83 |
84 | return self::$instance;
85 | }
86 |
87 | /**
88 | * Sets our plugin variables.
89 | *
90 | * @return void
91 | */
92 | private function set_variables() {
93 | $this->classes = array(
94 | 'activation' => '',
95 | 'setup' => 'Setup',
96 | 'helpers' => '',
97 | 'settings' => 'Settings',
98 | 'forms-list' => 'Forms_List',
99 | 'submissions' => 'Submissions',
100 | 'forms-update' => 'Forms_Update',
101 | 'tinymce-plugin' => 'TinyMCE_Plugin',
102 | 'form-shortcode' => 'Form_Shortcode',
103 | 'field-shortcodes' => 'Field_Shortcodes',
104 | 'api' => '',
105 | 'request-plan' => 'Request_Plan',
106 | 'request-subscription' => 'Request_Subscription',
107 | 'transaction-verify' => 'Transaction_Verify',
108 | 'form-submit' => 'Form_Submit',
109 | 'transaction-fee' => '',
110 | 'confirm-payment' => 'Confirm_Payment',
111 | 'email' => '',
112 | 'email-invoice' => 'Email_Invoice',
113 | 'email-receipt' => 'Email_Receipt',
114 | 'email-receipt-owner' => 'Email_Receipt_Owner',
115 | 'retry-submit' => 'Retry_Submit',
116 | );
117 | }
118 |
119 | /**
120 | * Includes our class files
121 | *
122 | * @return void
123 | */
124 | private function include_classes() {
125 | foreach ( $this->classes as $key => $name ) {
126 | include_once PFF_PAYSTACK_PLUGIN_PATH . '/includes/classes/class-' . $key . '.php';
127 | if ( '' !== $name ) {
128 | $className = $this->namespace . $name;
129 | $this->classes[$key] = new $className();
130 | }
131 | }
132 | }
133 |
134 | /**
135 | * Hook into actions and filters.
136 | *
137 | * @since 2.3
138 | */
139 | private function init_hooks() {
140 | register_activation_hook( PFF_PAYSTACK_MAIN_FILE, array( '\paystack\payment_forms\activation', 'install' ) );
141 | }
142 | }
--------------------------------------------------------------------------------
/includes/classes/class-request-plan.php:
--------------------------------------------------------------------------------
1 | set_module( 'plan' );
25 | }
26 |
27 | /**
28 | * Send a request to Paystack and get the Plan Object.
29 | *
30 | * @return boolean|object
31 | */
32 | public function fetch_plan( $code = '' ) {
33 | $plan = false;
34 | if ( '' === $code || ! $this->api_ready() ) {
35 | return false;
36 | }
37 | $this->set_url_args( $code );
38 | $response = $this->get_request();
39 | if ( $this->is_plan_valid( $response ) ) {
40 | $plan = $response;
41 | }
42 | return $plan;
43 | }
44 |
45 | /**
46 | * Reviews the plan parameters to see if the plan is active.
47 | *
48 | * @param object $plan
49 | * @return boolean
50 | */
51 | public function is_plan_valid( $plan ) {
52 | if ( null === $plan ) {
53 | return false;
54 | }
55 | if ( ! isset( $plan->status ) || false === $plan->status ) {
56 | return false;
57 | }
58 | if ( ! isset( $plan->data->is_archived ) || true === $plan->data->is_archived ) {
59 | return false;
60 | }
61 | if ( ! isset( $plan->data->is_deleted ) || true === $plan->data->is_deleted ) {
62 | return false;
63 | }
64 | return true;
65 | }
66 |
67 | /**
68 | * Send a request to the Paystack "List plans" request, and return the first found one.
69 | *
70 | * @return boolean|object
71 | */
72 | public function list_plans( $url_args = '' ) {
73 | $plan = false;
74 | if ( '' === $url_args || ! $this->api_ready() ) {
75 | return false;
76 | }
77 | $this->set_url_args( $url_args );
78 | $response = $this->get_request();
79 | if ( isset( $response->meta->total ) && $response->meta->total >= 1 && isset( $response->data[0] ) ) {
80 | $plan = $response->data[0];
81 | }
82 | return $plan;
83 | }
84 |
85 | /**
86 | * Create a plan for the customer with their amount and interval.
87 | *
88 | * @return boolean|object
89 | */
90 | public function create_plan( $body = [] ) {
91 | $plan = false;
92 | if ( empty( $body ) || ! $this->api_ready() ) {
93 | return false;
94 | }
95 | $response = $this->post_request( $body );
96 | if ( isset( $response->plan_code ) ) {
97 | $plan = $response;
98 | }
99 | return $plan;
100 | }
101 | }
--------------------------------------------------------------------------------
/includes/classes/class-request-subscription.php:
--------------------------------------------------------------------------------
1 | set_module( 'subscription' );
25 | }
26 |
27 | /**
28 | * Create a plan for the customer with their amount and interval.
29 | *
30 | * @return boolean|object
31 | */
32 | public function create_subscription( $body = [] ) {
33 | $sub = false;
34 | if ( empty( $body ) || ! $this->api_ready() ) {
35 | return false;
36 | }
37 | $response = $this->post_request( $body );
38 | if ( isset( $response->status ) && true === $response->status ) {
39 | $sub = $response;
40 | }
41 | return $sub;
42 | }
43 | }
--------------------------------------------------------------------------------
/includes/classes/class-retry-submit.php:
--------------------------------------------------------------------------------
1 | helpers = new Helpers();
76 | $this->new_code = $this->generate_code() . '_2';
77 | $retry_record = $this->helpers->get_db_record( $this->code );
78 | if ( false !== $retry_record ) {
79 | $this->retry_meta = $retry_record;
80 | $this->form_id = $this->retry_meta->post_id;
81 | $this->meta = $this->helpers->parse_meta_values( get_post( $this->form_id ) );
82 | }
83 | }
84 |
85 | /**
86 | * The action for the retry form.
87 | *
88 | * @return void
89 | */
90 | public function retry_action() {
91 | if ( ! isset( $_POST['pf-nonce'] ) || false === wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['pf-nonce'] ) ), 'pff-paystack-retry' ) ) {
92 | $response = array(
93 | 'result' => 'failed',
94 | 'message' => esc_html__( 'Nonce verification is required.', 'pff-paystack' ),
95 | );
96 | // Exit here, for not processing further because of the error.
97 | exit( wp_json_encode( $response ) );
98 | }
99 |
100 | // False positive, we are using isset() to verify it exists before sanitization.
101 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput
102 | if ( isset( $_POST['code'] ) && '' !== trim( wp_unslash( $_POST['code'] ) ) ) {
103 | $this->code = sanitize_text_field( wp_unslash( $_POST['code'] ) );
104 | } else {
105 | $response = array(
106 | 'result' => 'failed',
107 | 'message' => esc_html__( 'Code is required', 'pff-paystack' ),
108 | );
109 | // Exit here, for not processing further because of the error.
110 | exit( wp_json_encode( $response ) );
111 | }
112 | do_action( 'kkd_pff_paystack_before_save' );
113 |
114 | /**
115 | * Setup our data to be processed.
116 | */
117 | $this->setup_data();
118 |
119 | if ( 0 !== $this->form_id ) {
120 | $subaccount = $this->meta['subaccount'];
121 | $txnbearer = $this->meta['txnbearer'];
122 | $transaction_charge = (int) $this->meta['merchantamount'];
123 | $transaction_charge *= 100;
124 | $fixedmetadata = json_decode( $this->retry_meta->metadata );
125 | $quantity = 1;
126 | foreach ( $fixedmetadata as $nkey => $nvalue ) {
127 | if ( 'Quantity' === $nvalue->variable_name ) {
128 | $quantity = $nvalue->value;
129 | }
130 | if ( 'Full_Name' === $nvalue->variable_name ) {
131 | $fullname = $nvalue->value;
132 | }
133 | }
134 | }
135 |
136 | if ( empty( $this->meta['subaccount'] ) ) {
137 | $subaccount = null;
138 | $txnbearer = null;
139 | $transaction_charge = null;
140 | }
141 |
142 | if ( empty( $transaction_charge ) || 0 === $transaction_charge ) {
143 | $transaction_charge = null;
144 | }
145 |
146 | $this->update_retry_code();
147 |
148 | $response = array(
149 | 'result' => 'success',
150 | 'code' => $this->new_code,
151 | 'plan' => $this->retry_meta->plan,
152 | 'quantity' => $quantity,
153 | 'email' => $this->retry_meta->email,
154 | 'name' => $fullname,
155 | 'total' => $this->retry_meta->amount * 100,
156 | 'custom_fields' => $fixedmetadata,
157 | 'currency' => $this->meta['currency'],
158 | 'subaccount' => $subaccount,
159 | 'txnbearer' => $txnbearer,
160 | 'transaction_charge' => $transaction_charge,
161 | );
162 |
163 | // We create 2 nonces here
164 | // 1 incase the payment fails, and the user needs to try again.
165 | // 2 if the payment is successful and the confirmation ajax needs to run.
166 | $response['retryNonce'] = wp_create_nonce( 'pff-paystack-retry' );
167 | $response['confirmNonce'] = wp_create_nonce( 'pff-paystack-confirm' );
168 |
169 | echo wp_json_encode( $response );
170 |
171 | die();
172 | }
173 |
174 | /**
175 | * Generate a unique Paystack code that does not yet exist in the database.
176 | *
177 | * @return string Generated unique code.
178 | */
179 | public function generate_code() {
180 | do {
181 | $code = $this->helpers->generate_new_code();
182 | $check = $this->helpers->check_code( $code );
183 | } while ( $check );
184 |
185 | return $code;
186 | }
187 |
188 | /**
189 | * Updates the DB row with the new transaction code.
190 | *
191 | * @return void
192 | */
193 | protected function update_retry_code() {
194 | global $wpdb;
195 | $return = false;
196 | $table = esc_sql( $wpdb->prefix . PFF_PAYSTACK_TABLE );
197 | // phpcs:ignore WordPress.DB.DirectDatabaseQuery
198 |
199 | $current_version = get_bloginfo('version');
200 | if ( version_compare( '6.2', $current_version, '<=' ) ) {
201 | // phpcs:disable WordPress.DB -- Start ignoring
202 | $return = $wpdb->query(
203 | $wpdb->prepare(
204 | "UPDATE %i SET txn_code_2 = %s WHERE txn_code = %s",
205 | $table,
206 | $this->new_code,
207 | $this->code
208 | )
209 | );
210 | // phpcs:enable -- Stop ignoring
211 | } else {
212 | // phpcs:disable WordPress.DB -- Start ignoring
213 | $return = $wpdb->query(
214 | $wpdb->prepare(
215 | "UPDATE `%s` SET txn_code_2 = '%s' WHERE txn_code = '%s'",
216 | $table,
217 | $this->new_code,
218 | $this->code
219 | )
220 | );
221 | // phpcs:enable -- Stop ignoring
222 | }
223 |
224 |
225 | return $return;
226 | }
227 | }
--------------------------------------------------------------------------------
/includes/classes/class-settings.php:
--------------------------------------------------------------------------------
1 | fields = array(
31 | 'general' => array(
32 | 'mode' => array(
33 | 'title' => esc_html__( 'Mode', 'pff-paystack' ),
34 | 'type' => 'select',
35 | 'default' => 'test',
36 | ),
37 | 'tsk' => array(
38 | 'title' => esc_html__( 'Test Secret Key', 'pff-paystack' ),
39 | 'type' => 'password',
40 | 'default' => '',
41 | ),
42 | 'tpk' => array(
43 | 'title' => esc_html__( 'Test Public Key', 'pff-paystack' ),
44 | 'type' => 'text',
45 | 'default' => '',
46 | ),
47 | 'lsk' => array(
48 | 'title' => esc_html__( 'Live Secret Key', 'pff-paystack' ),
49 | 'type' => 'password',
50 | 'default' => '',
51 | ),
52 | 'lpk' => array(
53 | 'title' => esc_html__( 'Live Public Key', 'pff-paystack' ),
54 | 'type' => 'text',
55 | 'default' => '',
56 | ),
57 | ),
58 | 'fees' => array(
59 | 'prc' => array(
60 | 'title' => esc_html__( 'Percentage', 'pff-paystack' ),
61 | 'type' => 'text',
62 | 'default' => 1.5,
63 | ),
64 | 'ths' => array(
65 | 'title' => wp_kses_post( __( 'Threshold (amount above which Paystack adds the fixed amount below) ', 'pff-paystack' ) ),
66 | 'type' => 'text',
67 | 'default' => 2500,
68 | ),
69 | 'adc' => array(
70 | 'title' => wp_kses_post( __( 'Additional Charge (amount added to percentage fee when transaction amount is above threshold) ', 'pff-paystack' ) ),
71 | 'type' => 'text',
72 | 'default' => 100,
73 | ),
74 | 'cap' => array(
75 | 'title' => wp_kses_post( __( 'Cap (maximum charge paystack can charge on your transactions)', 'pff-paystack' ) ),
76 | 'type' => 'text',
77 | 'default' => 2000,
78 | ),
79 | ),
80 | );
81 | add_action( 'admin_menu', [ $this, 'register_settings_page' ] );
82 | add_action( 'admin_menu', [ $this, 'register_settings_fields' ] );
83 | }
84 |
85 | /**
86 | * Registers our settings sub page under the Paystack Forms menu item.
87 | *
88 | * @return void
89 | */
90 | public function register_settings_page() {
91 | add_submenu_page( 'edit.php?post_type=paystack_form', esc_html__( 'Settings', 'pff-paystack' ), esc_html__( 'Settings', 'pff-paystack' ), 'edit_posts', 'settings', [ $this, 'output_settings_page' ] );
92 | }
93 |
94 | /**
95 | * Registers our Settings fields with the WP API.
96 | *
97 | * @return void
98 | */
99 | public function register_settings_fields() {
100 | $fields = $this->get_settings_fields();
101 | // Run through each group, and the fields in there.
102 | foreach ( $fields as $group => $fields ) {
103 | foreach ( $fields as $field_key => $args ) {
104 | register_setting( 'kkd-pff-paystack-settings-group', $field_key, [ $this, 'sanitise_field' ] );
105 | }
106 | }
107 | }
108 |
109 | public function output_settings_page() {
110 | ?>
111 |
112 |
113 |
114 |
115 |
here', 'pff-paystack' ) ); ?>
116 |
117 |
166 |
167 | fields );
177 | }
178 |
179 | /**
180 | * Checks to see if the curren value is selected.
181 | *
182 | * @param string $value
183 | * @param string $compare
184 | * @return string
185 | */
186 | public function is_option_selected( $value, $compare ) {
187 | if ( $value == $compare ) {
188 | $result = "selected";
189 | } else {
190 | $result = "";
191 | }
192 | return $result;
193 | }
194 |
195 | /**
196 | * Sanitises the field name
197 | *
198 | * @param string $value
199 | * /
200 | *
201 | */
202 | private function sanitise_field( $value ) {
203 | return sanitize_text_field( $value );
204 | }
205 | }
206 |
--------------------------------------------------------------------------------
/includes/classes/class-setup.php:
--------------------------------------------------------------------------------
1 | esc_html__( 'Paystack Forms', 'paystack_form' ),
39 | 'singular_name' => esc_html__( 'Paystack Form', 'paystack_form' ),
40 | 'add_new' => esc_html__( 'Add New', 'paystack_form' ),
41 | 'add_new_item' => esc_html__( 'Add Paystack Form', 'paystack_form' ),
42 | 'edit_item' => esc_html__( 'Edit Paystack Form', 'paystack_form' ),
43 | 'new_item' => esc_html__( 'Paystack Form', 'paystack_form' ),
44 | 'view_item' => esc_html__( 'View Paystack Form', 'paystack_form' ),
45 | 'all_items' => esc_html__( 'All Forms', 'paystack_form' ),
46 | 'search_items' => esc_html__( 'Search Paystack Forms', 'paystack_form' ),
47 | 'not_found' => esc_html__( 'No Paystack Forms found', 'paystack_form' ),
48 | 'not_found_in_trash' => esc_html__( 'No Paystack Forms found in Trash', 'paystack_form' ),
49 | 'parent_item_colon' => esc_html__( 'Parent Paystack Form:', 'paystack_form' ),
50 | 'menu_name' => esc_html__( 'Paystack Forms', 'paystack_form' ),
51 | ];
52 |
53 | $args = [
54 | 'labels' => $labels,
55 | 'hierarchical' => true,
56 | 'description' => esc_html__( 'Paystack Forms filterable by genre', 'paystack_form' ),
57 | 'supports' => array( 'title', 'editor' ),
58 | 'public' => true,
59 | 'show_ui' => true,
60 | 'show_in_menu' => true,
61 | 'show_in_rest' => false,
62 | 'menu_position' => 5,
63 | 'menu_icon' => PFF_PAYSTACK_PLUGIN_URL . '/assets/images/logo.png',
64 | 'show_in_nav_menus' => true,
65 | 'publicly_queryable' => true,
66 | 'exclude_from_search' => false,
67 | 'has_archive' => false,
68 | 'query_var' => true,
69 | 'can_export' => true,
70 | 'rewrite' => false,
71 | 'comments' => false,
72 | 'capability_type' => 'post',
73 | ];
74 | register_post_type( 'paystack_form', $args );
75 | }
76 |
77 | /**
78 | * Load the plugin text domain for translation.
79 | */
80 | public function load_plugin_textdomain() {
81 | load_plugin_textdomain( 'pff-paystack', false, PFF_PAYSTACK_PLUGIN_PATH . '/languages/' );
82 | }
83 |
84 | /**
85 | * Add a link to our settings page in the plugin action links.
86 | */
87 | public function add_action_links( $links ) {
88 | $settings_link = array(
89 | '' . esc_html__( 'Settings', 'pff-paystack' ) . ' ',
90 | );
91 | return array_merge( $settings_link, $links );
92 | }
93 |
94 | /**
95 | * Enqueues our admin css.
96 | *
97 | * @param string $hook
98 | * @return void
99 | */
100 | public function admin_enqueue_styles( $hook ) {
101 | if ( $hook != 'paystack_form_page_submissions' && $hook != 'paystack_form_page_settings' ) {
102 | return;
103 | }
104 | wp_enqueue_style( PFF_PLUGIN_NAME, PFF_PAYSTACK_PLUGIN_URL . '/assets/css/paystack-admin.css', array(), PFF_PAYSTACK_VERSION, 'all' );
105 | }
106 |
107 | /**
108 | * Enqueue the Administration scripts.
109 | *
110 | * @return void
111 | */
112 | public function admin_enqueue_scripts() {
113 | wp_enqueue_script( PFF_PLUGIN_NAME, PFF_PAYSTACK_PLUGIN_URL . '/assets/js/paystack-admin.js', array( 'jquery' ), PFF_PAYSTACK_VERSION, false );
114 | }
115 |
116 | /**
117 | * Enques our frontend styles
118 | *
119 | * @return void
120 | */
121 | public function enqueue_styles() {
122 | wp_enqueue_style( PFF_PLUGIN_NAME . '-style', PFF_PAYSTACK_PLUGIN_URL . '/assets/css/pff-paystack.css', array(), PFF_PAYSTACK_VERSION, 'all' );
123 | wp_enqueue_style( PFF_PLUGIN_NAME . '-font-awesome', PFF_PAYSTACK_PLUGIN_URL . '/assets/css/font-awesome.min.css', array(), PFF_PAYSTACK_VERSION, 'all' );
124 | }
125 |
126 | /**
127 | * Enqueue the frontend scripts.
128 | *
129 | * @return void
130 | */
131 | public function enqueue_scripts() {
132 |
133 | $page_content = get_the_content();
134 | if ( ! has_shortcode( $page_content, 'pff-paystack' ) ) {
135 | return;
136 | }
137 |
138 | wp_enqueue_script( 'blockUI', PFF_PAYSTACK_PLUGIN_URL . '/assets/js/jquery.blockUI.min.js', array( 'jquery', 'jquery-ui-core' ), PFF_PAYSTACK_VERSION, true );
139 |
140 | wp_register_script( 'Paystack', 'https://js.paystack.co/v1/inline.js', false, PFF_PAYSTACK_VERSION, true );
141 | wp_enqueue_script( 'Paystack' );
142 |
143 | wp_enqueue_script( PFF_PLUGIN_NAME . '-public', PFF_PAYSTACK_PLUGIN_URL . '/assets/js/paystack-public.js', array( 'jquery' ), PFF_PAYSTACK_VERSION, true );
144 |
145 | $helpers = new Helpers();
146 | $js_args = [
147 | 'key' => $helpers->get_public_key(),
148 | 'fee' => $helpers->get_fees(),
149 | ];
150 | wp_localize_script( PFF_PLUGIN_NAME . '-public', 'pffSettings', $js_args , PFF_PAYSTACK_VERSION, true );
151 | }
152 | }
153 |
--------------------------------------------------------------------------------
/includes/classes/class-submissions.php:
--------------------------------------------------------------------------------
1 | get_payments_list_table();
53 | $data = $payments_table->prepare_items();
54 | ?>
55 |
56 |
57 |
58 |
59 |
60 |
61 | 0 ) { ?>
62 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | display(); ?>
75 |
76 | get_payments_by_id( $form_id );
128 |
129 | if ( count( $all_data ) > 0 ) {
130 | $header = $all_data[0];
131 |
132 | $csv_output .= "#,";
133 | $csv_output .= "Email,";
134 | $csv_output .= "Amount,";
135 | $csv_output .= "Date Paid,";
136 | $csv_output .= "Reference,";
137 |
138 | $new = json_decode( $header->metadata );
139 | if ( array_key_exists( 0, $new ) ) {
140 | foreach ( $new as $item ) {
141 | $csv_output .= $this->prep_csv_data( $item->display_name ) . ',';
142 | }
143 | } elseif ( count( $new ) > 0 ) {
144 | foreach ( $new as $key => $item ) {
145 | $csv_output .= $this->prep_csv_data( $key ) . ',';
146 | }
147 | }
148 |
149 | $csv_output .= "\n";
150 |
151 | foreach ( $all_data as $key => $dbdata ) {
152 | $newkey = $key + 1;
153 | $txn_code = '' !== $dbdata->txn_code_2 ? $dbdata->txn_code_2 : $dbdata->txn_code;
154 |
155 | $csv_output .= $this->prep_csv_data( $newkey ) . ',';
156 | $csv_output .= $this->prep_csv_data( $dbdata->email ) . ',';
157 | $csv_output .= $this->prep_csv_data( $currency . ' ' . $dbdata->amount ) . ',';
158 | $csv_output .= $this->prep_csv_data( substr( $dbdata->paid_at, 0, 10 ) ) . ',';
159 | $csv_output .= $this->prep_csv_data( $txn_code ) . ',';
160 |
161 | $new = json_decode( $dbdata->metadata );
162 | if ( array_key_exists( 0, $new ) ) {
163 | foreach ( $new as $item ) {
164 | $csv_output .= $this->prep_csv_data( $item->value ) . ',';
165 | }
166 | } elseif ( count( $new ) > 0 ) {
167 | foreach ( $new as $item ) {
168 | $csv_output .= $this->prep_csv_data( $item ) . ',';
169 | }
170 | }
171 |
172 | $csv_output .= "\n";
173 | }
174 |
175 | $filename = $obj->post_title . "_payments_" . gmdate( 'Y-m-d_H-i' );
176 |
177 | header( 'Content-Type: application/vnd.ms-excel' );
178 | header( 'Content-Disposition: attachment; filename="' . $filename . '.csv"' );
179 | echo $csv_output; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- CSV output must not be escaped.
180 | exit;
181 | }
182 | }
183 | }
184 |
--------------------------------------------------------------------------------
/includes/classes/class-tinymce-plugin.php:
--------------------------------------------------------------------------------
1 | post_type ) && 'paystack_form' === $screen->post_type ) {
66 | $this->is_screen = true;
67 | $plugin_array['custom_class'] = PFF_PAYSTACK_PLUGIN_URL . 'assets/css/tinymce-plugin.js';
68 | }
69 | }
70 | return $plugin_array;
71 | }
72 |
73 | /**
74 | * Adds a button to the TinyMCE / Visual Editor which the user can click
75 | * to insert a custom CSS class.
76 | *
77 | * @param array $buttons Array of registered TinyMCE Buttons
78 | * @return array Modified array of registered TinyMCE Buttons
79 | */
80 | function add_tinymce_toolbar_button( $buttons ) {
81 | if ( $this->is_screen ) {
82 | array_push( $buttons, 'custom_class' );
83 | }
84 | return $buttons;
85 | }
86 | }
--------------------------------------------------------------------------------
/includes/classes/class-transaction-fee.php:
--------------------------------------------------------------------------------
1 | percentage = $percentage;
39 | $this->additional_charge = $additional_charge;
40 | $this->crossover_total = $crossover_total;
41 | $this->cap = $cap;
42 | $this->__setup();
43 | }
44 |
45 | /**
46 | * Setup method to initialize calculated values.
47 | */
48 | private function __setup() {
49 | $this->charge_divider = $this->__charge_divider();
50 | $this->crossover = $this->__crossover();
51 | $this->flatline_plus_charge = $this->__flatline_plus_charge();
52 | $this->flatline = $this->__flatline();
53 | }
54 |
55 | /**
56 | * Calculate charge divider.
57 | *
58 | * @return float Charge divider.
59 | */
60 | private function __charge_divider() {
61 | return floatval( 1 - $this->percentage );
62 | }
63 |
64 | /**
65 | * Calculate crossover value.
66 | *
67 | * @return float Crossover value.
68 | */
69 | private function __crossover() {
70 | return ceil( ( $this->crossover_total * $this->charge_divider ) - $this->additional_charge );
71 | }
72 |
73 | /**
74 | * Calculate flatline plus charge.
75 | *
76 | * @return float Flatline plus charge.
77 | */
78 | private function __flatline_plus_charge() {
79 | return floor( ( $this->cap - $this->additional_charge ) / $this->percentage );
80 | }
81 |
82 | /**
83 | * Calculate flatline value.
84 | *
85 | * @return float Flatline value.
86 | */
87 | private function __flatline() {
88 | return $this->flatline_plus_charge - $this->cap;
89 | }
90 |
91 | /**
92 | * Add charge for amount in kobo.
93 | *
94 | * @param int $amountinkobo Amount in kobo.
95 | * @return float Charged amount.
96 | */
97 | public function add_for_kobo( $amountinkobo ) {
98 | if ( $amountinkobo > $this->flatline ) {
99 | return $amountinkobo + $this->cap;
100 | } elseif ( $amountinkobo > $this->crossover ) {
101 | return ceil( ( $amountinkobo + $this->additional_charge ) / $this->charge_divider );
102 | } else {
103 | return ceil( $amountinkobo / $this->charge_divider );
104 | }
105 | }
106 |
107 | /**
108 | * Add charge for amount in NGN.
109 | *
110 | * @param int $amountinngn Amount in NGN.
111 | * @return float Charged amount.
112 | */
113 | public function add_for_ngn( $amountinngn ) {
114 | return $this->add_for_kobo( ceil( $amountinngn * 100 ) ) / 100;
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/includes/classes/class-transaction-verify.php:
--------------------------------------------------------------------------------
1 | set_module( 'transaction/verify' );
25 | }
26 |
27 | /**
28 | * Send a request to Paystack and get the Plan Object.
29 | *
30 | * @return boolean|object
31 | */
32 | public function verify_transaction( $code = '' ) {
33 | $return = false;
34 | if ( '' === $code || ! $this->api_ready() ) {
35 | return false;
36 | }
37 |
38 | $this->set_url_args( $code );
39 | $response = $this->get_request();
40 | $return = $this->verify_response( $response );
41 | return $return;
42 | }
43 |
44 | /**
45 | * Reviews the transaction and returns success or an error and a message.
46 | *
47 | * @param object $response
48 | * @return boolean
49 | */
50 | public function verify_response( $response ) {
51 | $return = $response;
52 | if ( false === $response ) {
53 | $return = [
54 | 'message' => esc_html__( 'Payment Verification Failed', 'pff-paystack' ),
55 | 'result' => 'failed',
56 | ];
57 | } else {
58 | if ( 'success' === $response->data->status ) {
59 | $return = [
60 | 'message' => esc_html__( 'Payment Verification Passed', 'pff-paystack' ),
61 | 'result' => 'success',
62 | 'data' => wp_json_encode( $response->data ),
63 | ];
64 | } else {
65 | $return = [
66 | 'message' => esc_html__( 'Transaction Failed/Invalid Code', 'pff-paystack' ),
67 | 'result' => 'failed',
68 | ];
69 | }
70 | }
71 | return $return;
72 | }
73 | }
--------------------------------------------------------------------------------
/includes/classes/deprecated.php:
--------------------------------------------------------------------------------
1 | \n"
8 | "Language-Team: LANGUAGE \n"
9 | "MIME-Version: 1.0\n"
10 | "Content-Type: text/plain; charset=UTF-8\n"
11 | "Content-Transfer-Encoding: 8bit\n"
12 | "POT-Creation-Date: 2024-10-04T13:52:09+00:00\n"
13 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14 | "X-Generator: WP-CLI 2.8.1\n"
15 | "X-Domain: plugin-payment-forms-for-wordpress\n"
16 |
17 | #. Plugin Name of the plugin
18 | msgid "Payment Forms for Paystack"
19 | msgstr ""
20 |
21 | #. Plugin URI of the plugin
22 | msgid "https://github.com/PaystackHQ/Wordpress-Payment-forms-for-Paystack"
23 | msgstr ""
24 |
25 | #. Description of the plugin
26 | msgid "Payment Forms for Paystack allows you create forms that will be used to bill clients for goods and services via Paystack."
27 | msgstr ""
28 |
29 | #. Author of the plugin
30 | msgid "Paystack"
31 | msgstr ""
32 |
33 | #. Author URI of the plugin
34 | msgid "http://paystack.com"
35 | msgstr ""
36 |
--------------------------------------------------------------------------------
/languages/pff-paystack-en_US.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PaystackOSS/plugin-payment-forms-for-wordpress/4a49ff5d627806c5128c4dead897a0776a5f109b/languages/pff-paystack-en_US.mo
--------------------------------------------------------------------------------
/languages/pff-paystack-en_US.po:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2024 Paystack
2 | # This file is distributed under the GPL-2.0+.
3 | msgid ""
4 | msgstr ""
5 | "Project-Id-Version: Payment Forms for Paystack 4.0.0\n"
6 | "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/plugin-payment-forms-for-wordpress\n"
7 | "Last-Translator: FULL NAME \n"
8 | "Language-Team: LANGUAGE \n"
9 | "MIME-Version: 1.0\n"
10 | "Content-Type: text/plain; charset=UTF-8\n"
11 | "Content-Transfer-Encoding: 8bit\n"
12 | "POT-Creation-Date: 2024-10-04T13:52:09+00:00\n"
13 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14 | "X-Generator: WP-CLI 2.8.1\n"
15 | "X-Domain: plugin-payment-forms-for-wordpress\n"
16 |
17 | #. Plugin Name of the plugin
18 | msgid "Payment Forms for Paystack"
19 | msgstr ""
20 |
21 | #. Plugin URI of the plugin
22 | msgid "https://github.com/PaystackHQ/Wordpress-Payment-forms-for-Paystack"
23 | msgstr ""
24 |
25 | #. Description of the plugin
26 | msgid "Payment Forms for Paystack allows you create forms that will be used to bill clients for goods and services via Paystack."
27 | msgstr ""
28 |
29 | #. Author of the plugin
30 | msgid "Paystack"
31 | msgstr ""
32 |
33 | #. Author URI of the plugin
34 | msgid "http://paystack.com"
35 | msgstr ""
36 |
--------------------------------------------------------------------------------
/languages/pff-paystack.pot:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2024 Paystack
2 | # This file is distributed under the GPL-2.0+.
3 | msgid ""
4 | msgstr ""
5 | "Project-Id-Version: Payment Forms for Paystack 4.0.0\n"
6 | "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/plugin-payment-forms-for-wordpress\n"
7 | "Last-Translator: FULL NAME \n"
8 | "Language-Team: LANGUAGE \n"
9 | "MIME-Version: 1.0\n"
10 | "Content-Type: text/plain; charset=UTF-8\n"
11 | "Content-Transfer-Encoding: 8bit\n"
12 | "POT-Creation-Date: 2024-10-04T13:52:09+00:00\n"
13 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14 | "X-Generator: WP-CLI 2.8.1\n"
15 | "X-Domain: plugin-payment-forms-for-wordpress\n"
16 |
17 | #. Plugin Name of the plugin
18 | msgid "Payment Forms for Paystack"
19 | msgstr ""
20 |
21 | #. Plugin URI of the plugin
22 | msgid "https://github.com/PaystackHQ/Wordpress-Payment-forms-for-Paystack"
23 | msgstr ""
24 |
25 | #. Description of the plugin
26 | msgid "Payment Forms for Paystack allows you create forms that will be used to bill clients for goods and services via Paystack."
27 | msgstr ""
28 |
29 | #. Author of the plugin
30 | msgid "Paystack"
31 | msgstr ""
32 |
33 | #. Author URI of the plugin
34 | msgid "http://paystack.com"
35 | msgstr ""
36 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "pff-paystack",
3 | "version": "4.0.3",
4 | "description": "Paystack Payment forms for WordPress",
5 | "main": "gulpfile.js",
6 | "scripts": {
7 | "build-pot": "wp i18n make-pot . languages/pff-paystack.pot",
8 | "build-mopo": "rm -R languages/pff-paystack-en_EN.mo && cp languages/pff-paystack.pot languages/pff-paystack-en_EN.po && wp i18n make-mo languages",
9 | "translate-US": "cp languages/pff-paystack-en_EN.po languages/pff-paystack-en_US.po && cp languages/pff-paystack-en_EN.mo languages/pff-paystack-en_US.mo"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/paystack-forms.php:
--------------------------------------------------------------------------------
1 |