You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-42Lines changed: 43 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,33 +1,34 @@
1
-
# Ogone PHP library #
1
+
# PostFinance PHP library #
2
2
3
-
This library allows you to easily implement an [Ogone](http://ogone.com) integration into your project.
4
-
It provides the necessary components to complete a correct payment flow with the [Ogone](http://ogone.com) platform.
This library allows you to easily implement an [PostFinance](https://www.postfinance.ch/) integration into your project.
4
+
It provides the necessary components to complete a correct payment flow with the [PostFinance](https://www.postfinance.ch/) platform.
8
5
9
6
Requirements:
10
7
11
8
- PHP 5.3
12
-
- network connection between your webserver and the Ogone platform
9
+
- network connection between your webserver and the PostFinance platform
13
10
14
11
As always, this is work in progress. Please feel free to fork this project and let them pull requests coming!
15
12
16
-
## Overview ##
13
+
Installation:
14
+
-------------
15
+
The library is [PSR-0 compliant](http://www.php-fig.org/psr/psr-0/fr/)
16
+
and the simplest way to install it is via composer
17
17
18
-
The library complies to the [PSR-0 standard](http://groups.google.com/group/php-standards/web/psr-0-final-proposal),
19
-
so it can be autoloaded using PSR-0 classloaders like the one in Symfony2. See autoload.php for an example.
18
+
composer require wysow/postfinance
19
+
20
+
## Overview ##
20
21
21
-
- Create an EcommercePaymentRequest or CreateAliasRequest, containing all the info needed by Ogone.
22
+
- Create an EcommercePaymentRequest or CreateAliasRequest, containing all the info needed by PostFinance.
22
23
- Generate a form
23
-
- Submit it to Ogone (client side)
24
-
- Receive a PaymentResponse back from Ogone (as a HTTP Request)
24
+
- Submit it to PostFinance (client side)
25
+
- Receive a PaymentResponse back from PostFinance (as a HTTP Request)
25
26
26
27
Both EcommercePaymentRequest, CreateAliasRequest and PaymentResponse are authenticated by comparing the SHA sign, which is a hash of the parameters and a secret passphrase. You can create the hash using a ShaComposer.
27
28
28
29
# SHA Composers #
29
30
30
-
Ogone provides 2 methods to generate a SHA sign:
31
+
PostFinance provides 2 methods to generate a SHA sign:
31
32
32
33
- "Main parameters only"
33
34
@@ -37,7 +38,7 @@ Ogone provides 2 methods to generate a SHA sign:
37
38
38
39
```php
39
40
<?php
40
-
use Ogone\ShaComposer\LegacyShaComposer;
41
+
use PostFinance\ShaComposer\LegacyShaComposer;
41
42
$shaComposer = new LegacyShaComposer($passphrase);
42
43
```
43
44
@@ -49,7 +50,7 @@ Ogone provides 2 methods to generate a SHA sign:
49
50
50
51
```php
51
52
<?php
52
-
use Ogone\ShaComposer\AllParametersShaComposer;
53
+
use PostFinance\ShaComposer\AllParametersShaComposer;
53
54
$shaComposer = new AllParametersShaComposer($passphrase);
54
55
```
55
56
@@ -59,19 +60,19 @@ This library currently supports both the legacy method "Main parameters only" an
59
60
60
61
```php
61
62
<?php
62
-
use Ogone\Passphrase;
63
-
use Ogone\Ecommerce\EcommercePaymentRequest;
64
-
use Ogone\ShaComposer\AllParametersShaComposer;
65
-
use Ogone\FormGenerator;
63
+
use PostFinance\Passphrase;
64
+
use PostFinance\Ecommerce\EcommercePaymentRequest;
65
+
use PostFinance\ShaComposer\AllParametersShaComposer;
66
+
use PostFinance\FormGenerator;
66
67
67
68
$passphrase = new Passphrase('my-sha-in-passphrase-defined-in-ogone-interface');
68
69
$shaComposer = new AllParametersShaComposer($passphrase);
0 commit comments