Skip to content

Commit

Permalink
Merge pull request #6 from oleksandr-gribiennikov-paysera/bring_libra…
Browse files Browse the repository at this point in the history
…ry_code_up_to_php_7.4_standards

Remove demo_shop; update the `README.md`
  • Loading branch information
oleksandr-gribiennikov-paysera authored May 2, 2024
2 parents 5b9478c + dd09d03 commit 5d662c3
Show file tree
Hide file tree
Showing 17 changed files with 17 additions and 408 deletions.
31 changes: 17 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ Example:
<?php

require_once('WebToPay.php');

// Your code goes here
```
Alternatively, you can use files in the "src" folder.
Either set-up autoloader or include file "includes.php" in "src" directory.
Expand All @@ -27,26 +25,31 @@ Example:
<?php

require_once('libwebtopay/src/includes.php');

// Your code goes here
```
Another way to install library is using composer:
```
// to install the latest version
"composer require webtopay/libwebtopay
// to install the oldest supported version (in some projects)
"composer require webtopay/libwebtopay "^1.6"
// to install version with new interface
"composer require webtopay/libwebtopay "^2.0"
```

Testing
=======
And then:
```php
<?php

$ phpunit
use WebToPay;
```

Demo
===============
Pay attention that the ^3.0 version has the same interface as the ^2.0 but newest one is brought up to
PHP 7.4 standards and code style like `strict_types`, type hints etc

demo_shop is a simple example how you can integrate library to your project.
It also shows how to get payment methods available for your project and specific amount.
Testing
=======

Demo needs write permissions to folder /var to function properly.
If you want to test demo online, also change parameters in includes/config.php file to your project's.
If you are testing offline, demos will still work, but paysera.com will be unable to send callback to your site -
you can login to your account and copy-and-paste the callback link in your browser in that case.
$ bash runt_tests.sh
16 changes: 0 additions & 16 deletions demo_shop/buy.php

This file was deleted.

28 changes: 0 additions & 28 deletions demo_shop/includes/config.php

This file was deleted.

51 changes: 0 additions & 51 deletions demo_shop/includes/helpers.php

This file was deleted.

9 changes: 0 additions & 9 deletions demo_shop/index.php

This file was deleted.

11 changes: 0 additions & 11 deletions demo_shop/orders.php

This file was deleted.

25 changes: 0 additions & 25 deletions demo_shop/paymentMethod.php

This file was deleted.

33 changes: 0 additions & 33 deletions demo_shop/request.php

This file was deleted.

66 changes: 0 additions & 66 deletions demo_shop/response.php

This file was deleted.

20 changes: 0 additions & 20 deletions demo_shop/sms.php

This file was deleted.

33 changes: 0 additions & 33 deletions demo_shop/style.css

This file was deleted.

12 changes: 0 additions & 12 deletions demo_shop/templates/base.html.php

This file was deleted.

16 changes: 0 additions & 16 deletions demo_shop/templates/buy.html.php

This file was deleted.

7 changes: 0 additions & 7 deletions demo_shop/templates/list.html.php

This file was deleted.

Loading

0 comments on commit 5d662c3

Please sign in to comment.