Skip to content

Commit

Permalink
Release 1.0.53
Browse files Browse the repository at this point in the history
  • Loading branch information
sbossert committed Nov 20, 2019
1 parent 77e4531 commit 0781764
Show file tree
Hide file tree
Showing 446 changed files with 139,846 additions and 81,036 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This repository contains the Magento 1 extension that enables to process payment

## Documentation

* [Documentation](https://plugin-documentation.wallee.com/wallee-payment/magento-1/1.0.52/docs/en/documentation.html)
* [Documentation](https://plugin-documentation.wallee.com/wallee-payment/magento-1/1.0.53/docs/en/documentation.html)

## Supported One-Step Checkouts

Expand All @@ -30,4 +30,4 @@ For Magento 1.6.x you need to install the [Magento compatibility module](https:/

## License

Please see the [license file](https://github.com/wallee-payment/magento-1/blob/1.0.52/LICENSE) for more information.
Please see the [license file](https://github.com/wallee-payment/magento-1/blob/1.0.53/LICENSE) for more information.
62 changes: 53 additions & 9 deletions app/code/community/Wallee/Payment/Model/Service/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,64 @@ class Wallee_Payment_Model_Service_Transaction extends Wallee_Payment_Model_Serv
* @var \Wallee\Sdk\Service\TransactionService
*/
protected $_transactionService;


/**
* The transaction invoice API service.
*
* @var \Wallee\Sdk\Service\TransactionInvoiceService
*/
protected $_transactionPaymentPageService;

/**
* The transaction iframe API service.
*
* @var \Wallee\Sdk\Service\TransactionIframeService
*/
protected $_transactionIframeService;

/**
* Returns the transaction API service.
*
* @return \Wallee\Sdk\Service\TransactionService
*/
protected function getTransactionService()
{
if ($this->_transactionService == null) {
$this->_transactionService = new \Wallee\Sdk\Service\TransactionService(
$this->getHelper()->getApiClient());
}

return $this->_transactionService;
if ($this->_transactionService == null) {
$this->_transactionService = new \Wallee\Sdk\Service\TransactionService(
$this->getHelper()->getApiClient());
}

return $this->_transactionService;
}

/**
* Returns the transaction API service.
*
* @return \Wallee\Sdk\Service\TransactionPaymentPageService
*/
protected function getTransactionPaymentPageService()
{
if ($this->_transactionPaymentPageService == null) {
$this->_transactionPaymentPageService = new \Wallee\Sdk\Service\TransactionPaymentPageService(
$this->getHelper()->getApiClient());
}

return $this->_transactionPaymentPageService;
}

/**
* Returns the transaction API service.
*
* @return \Wallee\Sdk\Service\TransactionIframeService
*/
protected function getTransactionIframeService()
{
if ($this->_transactionIframeService == null) {
$this->_transactionIframeService = new \Wallee\Sdk\Service\TransactionIframeService(
$this->getHelper()->getApiClient());
}

return $this->_transactionIframeService;
}

/**
Expand Down Expand Up @@ -103,7 +147,7 @@ public function getJavaScriptUrl(Mage_Sales_Model_Quote $quote)
{
if (! isset(self::$_javascriptUrlCache[$quote->getId()]) || self::$_javascriptUrlCache[$quote->getId()] == null) {
$transaction = $this->getTransactionByQuote($quote);
self::$_javascriptUrlCache[$quote->getId()] = $this->getTransactionService()->buildJavaScriptUrl(
self::$_javascriptUrlCache[$quote->getId()] = $this->getTransactionIframeService()->javascriptUrl(
$transaction->getLinkedSpaceId(), $transaction->getId());
}
return self::$_javascriptUrlCache[$quote->getId()];
Expand All @@ -119,7 +163,7 @@ public function getPaymentPageUrl(Mage_Sales_Model_Quote $quote)
{
if (! isset(self::$_paymentPageUrlCache[$quote->getId()]) || self::$_paymentPageUrlCache[$quote->getId()] == null) {
$transaction = $this->getTransactionByQuote($quote);
self::$_paymentPageUrlCache[$quote->getId()] = $this->getTransactionService()->buildPaymentPageUrl(
self::$_paymentPageUrlCache[$quote->getId()] = $this->getTransactionPaymentPageService()->paymentPageUrl(
$transaction->getLinkedSpaceId(), $transaction->getId());
}
return self::$_paymentPageUrlCache[$quote->getId()];
Expand Down
6 changes: 3 additions & 3 deletions app/code/community/Wallee/Payment/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<config>
<modules>
<Wallee_Payment>
<version>1.0.52</version>
<version>1.0.53</version>
</Wallee_Payment>
</modules>
<global>
Expand Down Expand Up @@ -357,8 +357,8 @@
<default>
<wallee_payment>
<information>
<version>1.0.52</version>
<sdk_version>1.1.15</sdk_version>
<version>1.0.53</version>
<sdk_version>2.0.5</sdk_version>
</information>
<general>
<base_gateway_url>https://app-wallee.com/</base_gateway_url>
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Wallee/Payment/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment><![CDATA[If you need help setting up the wallee extension, check out the <a href="https://plugin-documentation.wallee.com/wallee-payment/magento-1/1.0.52/docs/en/documentation.html" target="_blank">documentation</a>.]]></comment>
<comment><![CDATA[If you need help setting up the wallee extension, check out the <a href="https://plugin-documentation.wallee.com/wallee-payment/magento-1/1.0.53/docs/en/documentation.html" target="_blank">documentation</a>.]]></comment>
<fields>
<version translate="label">
<label>Module Version</label>
Expand Down
2 changes: 1 addition & 1 deletion app/locale/de_DE/Wallee_Payment.csv
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"Giftcard (%s)","Geschenkkarte (%s)"
"Giftcard","Geschenkkarte"
"Hold Delivery","Lieferung halten"
"If you need help setting up the wallee extension, check out the <a href=""https://plugin-documentation.wallee.com/wallee-payment/magento-1/1.0.52/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Falls Sie Hilfe benötigen beim Einrichten der wallee-Erweiterung, sehen Sie sich die <a href=""https://plugin-documentation.wallee.com/wallee-payment/magento-1/1.0.52/docs/en/documentation.html"" target=""_blank"">Dokumentation</a> an."
"If you need help setting up the wallee extension, check out the <a href=""https://plugin-documentation.wallee.com/wallee-payment/magento-1/1.0.53/docs/en/documentation.html"" target=""_blank"">documentation</a>.","Falls Sie Hilfe benötigen beim Einrichten der wallee-Erweiterung, sehen Sie sich die <a href=""https://plugin-documentation.wallee.com/wallee-payment/magento-1/1.0.53/docs/en/documentation.html"" target=""_blank"">Dokumentation</a> an."
"Inactive","Inaktiv"
"Information","Informationen"
"Line Items","Positionen"
Expand Down
2 changes: 1 addition & 1 deletion app/locale/en_US/Wallee_Payment.csv
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"Giftcard (%s)","Giftcard (%s)"
"Giftcard","Giftcard"
"Hold Delivery","Hold Delivery"
"If you need help setting up the wallee extension, check out the <a href=""https://plugin-documentation.wallee.com/wallee-payment/magento-1/1.0.52/docs/en/documentation.html"" target=""_blank"">documentation</a>.","If you need help setting up the wallee extension, check out the <a href=""https://plugin-documentation.wallee.com/wallee-payment/magento-1/1.0.52/docs/en/documentation.html"" target=""_blank"">documentation</a>."
"If you need help setting up the wallee extension, check out the <a href=""https://plugin-documentation.wallee.com/wallee-payment/magento-1/1.0.53/docs/en/documentation.html"" target=""_blank"">documentation</a>.","If you need help setting up the wallee extension, check out the <a href=""https://plugin-documentation.wallee.com/wallee-payment/magento-1/1.0.53/docs/en/documentation.html"" target=""_blank"">documentation</a>."
"Inactive","Inactive"
"Information","Information"
"Line Items","Line Items"
Expand Down
4 changes: 2 additions & 2 deletions docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/wallee-payment/magento-1/releases/tag/1.0.52/">
<a href="https://github.com/wallee-payment/magento-1/releases/tag/1.0.53/">
Source
</a>
</li>
Expand Down Expand Up @@ -50,7 +50,7 @@ <h1>
<div class="olist arabic">
<ol class="arabic">
<li>
<p><a href="https://github.com/wallee-payment/magento-1/releases/tag/1.0.52/">Download</a> the extension.</p>
<p><a href="https://github.com/wallee-payment/magento-1/releases/tag/1.0.53/">Download</a> the extension.</p>
</li>
<li>
<p>Extract the files and upload them to the root directory of your store using FTP/SSH.</p>
Expand Down
Binary file modified docs/en/resource/application-user-configuration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/en/resource/payment-method-configuration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/en/resource/space-configuration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions lib/Wallee/Sdk/.php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

return PhpCsFixer\Config::create()
->setUsingCache(true)
->setRules([
'@PSR2' => true,
'ordered_imports' => true,
'phpdoc_order' => true,
'array_syntax' => [ 'syntax' => 'short' ],
'strict_comparison' => true,
'strict_param' => true,
'no_trailing_whitespace' => false,
'no_trailing_whitespace_in_comment' => false,
'braces' => false,
'single_blank_line_at_eof' => false,
'blank_line_after_namespace' => false,
])
->setFinder(
PhpCsFixer\Finder::create()
->exclude('test')
->exclude('tests')
->in(__DIR__)
);
5 changes: 1 addition & 4 deletions lib/Wallee/Sdk/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
language: php
sudo: false
php:
- 5.4
- 5.6
- 7.0
- 7.1
before_install: "composer install"
script: "phpunit --bootstrap autoload.php test/"
script: "phpunit --bootstrap autoload.php test/"
4 changes: 2 additions & 2 deletions lib/Wallee/Sdk/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright {yyyy} {name of copyright owner}
Copyright 2019 customweb GmbH

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
70 changes: 58 additions & 12 deletions lib/Wallee/Sdk/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
[![Build Status](https://travis-ci.org/wallee-payment/php-sdk.svg?branch=master)](https://travis-ci.org/wallee-payment/php-sdk)

# wallee SDK for PHP
# wallee PHP Library

This repository contains the open source PHP SDK that allows you to access wallee from your PHP app.
The wallee PHP library wraps around the wallee API. This library facilitates your interaction with various services such as transactions, accounts, and subscriptions.

## Requirements

* [PHP 5.6.0 and later](http://www.php.net/)

## Documentation

https://app-wallee.com/doc/api/web-service
[wallee Web Service API](https://app-wallee.com/doc/api/web-service)

## Requirements

- PHP 5.6.0 and above

## Installation

Expand Down Expand Up @@ -39,24 +40,44 @@ require_once '/path/to/php-sdk/autoload.php';
```

## Usage
The library needs to be configured with your account's space id, user id, and secret key which are available in your [wallee
account dashboard](https://app-wallee.com/account/select). Set `space_id`, `user_id`, and `api_secret` to their values.

### Basic Example
### Configuring a Service

```php
<?php
require_once(__DIR__ . '/autoload.php');

// Configuration
$spaceId = 405;
$userId = 512;
$secret = 'FKrO76r5VwJtBrqZawBspljbBNOxp5veKQQkOnZxucQ=';

// Setup API client
$client = new \Wallee\Sdk\ApiClient($userId, $secret);

// Create API service instance
$transactionService = new \Wallee\Sdk\Service\TransactionService($client);
$transactionPaymentPageService = new \Wallee\Sdk\Service\TransactionPaymentPageService($client);

```

To get started with sending transactions, please review the example below:

```php
require_once(__DIR__ . '/autoload.php');

// Configuration
$spaceId = 405;
$userId = 512;
$secret = "FKrO76r5VwJtBrqZawBspljbBNOxp5veKQQkOnZxucQ=";
$secret = 'FKrO76r5VwJtBrqZawBspljbBNOxp5veKQQkOnZxucQ=';

// Setup API client
$client = new \Wallee\Sdk\ApiClient($userId, $secret);

// Create API service instance
$transactionService = new \Wallee\Sdk\Service\TransactionService($client);
$transactionPaymentPageService = new \Wallee\Sdk\Service\TransactionPaymentPageService($client);

// Create transaction
$lineItem = new \Wallee\Sdk\Model\LineItemCreate();
Expand All @@ -69,19 +90,44 @@ $lineItem->setType(\Wallee\Sdk\Model\LineItemType::PRODUCT);


$transaction = new \Wallee\Sdk\Model\TransactionCreate();
$transaction->setCurrency("EUR");
$transaction->setCurrency('EUR');
$transaction->setLineItems(array($lineItem));
$transaction->setAutoConfirmationEnabled(true);

$createdTransaction = $transactionService->create($spaceId, $transaction);

// Create Payment Page URL:
$redirectionUrl = $transactionService->buildPaymentPageUrl($spaceId, $createdTransaction->getId());
$redirectionUrl = $transactionPaymentPageService->paymentPageUrl($spaceId, $createdTransaction->getId());

header('Location: ' . $redirectionUrl);

```
### HTTP Client
You can either use `php curl` or `php socket` extentions. It is recommend you install the necessary extentions and enable them on your system.

You have to ways two specify which HTTP client you prefer.

```php
$userId = 512;
$secret = 'FKrO76r5VwJtBrqZawBspljbBNOxp5veKQQkOnZxucQ=';

// Setup API client
$client = new \Wallee\Sdk\Sdk\ApiClient($userId, $secret);

$httpClientType = \Wallee\Sdk\Sdk\Http\HttpClientFactory::TYPE_CURL; // or \Wallee\Sdk\Sdk\Http\HttpClientFactory::TYPE_SOCKET

$client->setHttpClientType($httpClientType);
```

You can also specify the HTTP client via the `WLE_HTTP_CLIENT` environment variable. The possible string values are `curl` or `socket`.


```php
<?php
putenv('WLE_HTTP_CLIENT=curl');
?>
```

## License

Please see the [license file](LICENSE) for more information.
Please see the [license file](https://github.com/wallee-payment/php-sdk/blob/master/LICENSE) for more information.
9 changes: 5 additions & 4 deletions lib/Wallee/Sdk/autoload.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php
/**
* wallee SDK
* SDK
*
* This library allows to interact with the wallee payment service.
* wallee SDK: 1.0.0
*
* This library allows to interact with the payment service.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,9 +17,12 @@
* limitations under the License.
*/


/**
* Autoload function.
*
* @author customweb GmbH
* After registering this autoload function with SPL, the following line
* would cause the function to attempt to load the \Wallee\Sdk\Baz\Qux class
* from /path/to/project/lib/Baz/Qux.php:
Expand Down
Loading

0 comments on commit 0781764

Please sign in to comment.