Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dercoder/omnipay-webmoney
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.0
Choose a base ref
...
head repository: dercoder/omnipay-webmoney
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Oct 2, 2020

  1. Upgraded to Omnipay v3

    SilverFire committed Oct 2, 2020
    Copy the full SHA
    09a799b View commit details
  2. Merge pull request #6 from SilverFire/master

    Upgrade to Omnipay v3
    dercoder authored Oct 2, 2020
    Copy the full SHA
    c3353f6 View commit details
  3. Issues fixed

    dercoder committed Oct 2, 2020
    Copy the full SHA
    6735dee View commit details
  4. Issues fixed

    dercoder committed Oct 2, 2020
    Copy the full SHA
    8b09512 View commit details
  5. Copy the full SHA
    19f4888 View commit details

Commits on Oct 19, 2021

  1. Removed PHP 5.6 support

    Added custom fields for purchase request
    dercoder committed Oct 19, 2021
    Copy the full SHA
    8df8d0f View commit details
  2. Removed PHP 5.6 support

    Added custom fields for purchase request
    dercoder committed Oct 19, 2021
    Copy the full SHA
    af3fd47 View commit details
  3. Remove PHP 7.3+ from testing

    dercoder committed Oct 19, 2021
    Copy the full SHA
    7e74b7f View commit details
  4. Update travis page

    dercoder committed Oct 19, 2021
    Copy the full SHA
    f948d83 View commit details

Commits on Mar 25, 2022

  1. Upgrade to support PHP 8.1

    SilverFire committed Mar 25, 2022
    Copy the full SHA
    3afe770 View commit details
  2. Copy the full SHA
    547d4bd View commit details

Commits on Apr 18, 2022

  1. Merge pull request #8 from SilverFire/php81

    Upgrade to support PHP 8.1
    dercoder authored Apr 18, 2022
    Copy the full SHA
    94d4281 View commit details

Commits on Apr 20, 2022

  1. Copy the full SHA
    f8904ee View commit details

Commits on Dec 27, 2024

  1. Merge pull request #9 from SilverFire/patch-1

    Suggest using newer version
    dercoder authored Dec 27, 2024
    Copy the full SHA
    b8ec2c0 View commit details
  2. Copy the full SHA
    5e37af3 View commit details
  3. Added WMT test case

    SilverFire authored Dec 27, 2024
    Copy the full SHA
    38c987a View commit details
  4. Use USDT for T purses

    SilverFire authored Dec 27, 2024
    Copy the full SHA
    769cd70 View commit details
  5. Copy the full SHA
    92b6676 View commit details

Commits on Dec 28, 2024

  1. Merge pull request #12 from SilverFire/patch-2

    Added WMT currency support
    dercoder authored Dec 28, 2024
    Copy the full SHA
    73e650f View commit details
  2. Merge pull request #13 from SilverFire/patch-3

    Added PHP 8.2, 8.3 to the build matrix
    dercoder authored Dec 28, 2024
    Copy the full SHA
    954a32a View commit details
  3. Update README.md

    dercoder authored Dec 28, 2024
    Copy the full SHA
    545b68a View commit details
14 changes: 8 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
language: php

php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- hhvm
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1
- 8.2
- 8.3

before_script:
- composer install -n --dev --prefer-source

script: vendor/bin/phpcs --standard=PSR2 src && vendor/bin/phpunit --coverage-text

after_script: vendor/bin/coveralls -v
after_script: vendor/bin/coveralls -v
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,16 +2,15 @@

**WebMoney driver for the Omnipay PHP payment processing library**

[![Build Status](https://travis-ci.org/dercoder/omnipay-webmoney.svg?branch=master)](https://travis-ci.org/dercoder/omnipay-webmoney)
[![Build Status](https://app.travis-ci.com/dercoder/omnipay-webmoney.svg?branch=master)](https://app.travis-ci.com/github/dercoder/omnipay-webmoney)
[![Coverage Status](https://coveralls.io/repos/dercoder/omnipay-webmoney/badge.svg?branch=master&service=github)](https://coveralls.io/github/dercoder/omnipay-webmoney?branch=master)

[![Latest Stable Version](https://poser.pugx.org/dercoder/omnipay-webmoney/v/stable.png)](https://packagist.org/packages/dercoder/omnipay-webmoney)
[![Total Downloads](https://poser.pugx.org/dercoder/omnipay-webmoney/downloads.png)](https://packagist.org/packages/dercoder/omnipay-webmoney)
[![Latest Unstable Version](https://poser.pugx.org/dercoder/omnipay-webmoney/v/unstable.png)](https://packagist.org/packages/dercoder/omnipay-webmoney)
[![License](https://poser.pugx.org/dercoder/omnipay-webmoney/license.png)](https://packagist.org/packages/dercoder/omnipay-webmoney)
[![Latest Stable Version](https://img.shields.io/packagist/v/dercoder/omnipay-webmoney)](https://packagist.org/packages/dercoder/omnipay-webmoney)
[![Total Downloads](https://img.shields.io/packagist/dt/dercoder/omnipay-webmoney)](https://packagist.org/packages/dercoder/omnipay-webmoney)
[![License](https://img.shields.io/packagist/l/dercoder/omnipay-webmoney)](https://packagist.org/packages/dercoder/omnipay-webmoney)

[Omnipay](https://github.com/omnipay/omnipay) is a framework agnostic, multi-gateway payment
processing library for PHP 5.3+. This package implements [WebMoney](https://www.webmoney.az) support for Omnipay.
processing library for PHP 7.0+. This package implements [WebMoney](https://www.webmoney.az) support for Omnipay.

## Installation

@@ -21,7 +20,7 @@ to your `composer.json` file:
```json
{
"require": {
"dercoder/omnipay-webmoney": "~1.0"
"dercoder/omnipay-webmoney": "^5.0"
}
}
```
@@ -51,4 +50,4 @@ or ask more detailed questions, there is also a [mailing list](https://groups.go
you can subscribe to.

If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/dercoder/omnipay-webmoney/issues),
or better yet, fork the library and submit a pull request.
or better yet, fork the library and submit a pull request.
67 changes: 38 additions & 29 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,41 @@
{
"name": "dercoder/omnipay-webmoney",
"type": "library",
"description": "WebMoney driver for the Omnipay payment processing library",
"keywords": [
"webmoney",
"gateway",
"merchant",
"omnipay",
"pay",
"payment"
],
"homepage": "https://github.com/dercoder/omnipay-webmoney",
"license": "MIT",
"autoload": {
"psr-4": {
"Omnipay\\WebMoney\\": "src/"
}
},
"require": {
"omnipay/common": "~2.3"
},
"require-dev": {
"omnipay/tests": "~2.0",
"satooshi/php-coveralls": "1.0.0"
},
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
"name": "dercoder/omnipay-webmoney",
"type": "library",
"description": "WebMoney driver for the Omnipay payment processing library",
"keywords": [
"webmoney",
"gateway",
"merchant",
"omnipay",
"pay",
"payment"
],
"homepage": "https://github.com/dercoder/omnipay-webmoney",
"license": "MIT",
"autoload": {
"psr-4": {
"Omnipay\\WebMoney\\": "src/"
}
},
"require": {
"php": "^7.0|^8.0",
"ext-simplexml": "*",
"ext-dom": "*",
"omnipay/common": "^3.2"
},
"require-dev": {
"omnipay/tests": "^4.1",
"satooshi/php-coveralls": "1.0.0",
"guzzlehttp/guzzle": "^6.5.5",
"squizlabs/php_codesniffer": "3.*"
},
"suggest": {
"guzzlehttp/guzzle": "To handle WebMoney payouts",
"ext-curl": "To handle WebMoney payouts"
},
"extra": {
"branch-alias": {
"dev-master": "4.0.x-dev"
}
}
}
8 changes: 4 additions & 4 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -9,6 +9,9 @@
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false">
<php>
<ini name="error_reporting" value="E_ALL &amp; ~E_DEPRECATED"/>
</php>
<testsuites>
<testsuite name="WebMoney Test Suite">
<directory>./tests/</directory>
@@ -22,7 +25,4 @@
<directory>./src</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-clover" target="./clover.xml" />
</logging>
</phpunit>
</phpunit>
75 changes: 36 additions & 39 deletions src/Certificate/WMUsedRootCAs.crt
Original file line number Diff line number Diff line change
@@ -1,4 +1,40 @@
-----BEGIN CERTIFICATE-----
MIIGRzCCBC+gAwIBAgIKNl4/iwAAAAnF+TANBgkqhkiG9w0BAQsFADBrMSswKQYD
VQQLEyJXTSBUcmFuc2ZlciBDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzMRgwFgYDVQQK
Ew9XTSBUcmFuc2ZlciBMdGQxIjAgBgNVBAMTGVdlYk1v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yBQcmlt
YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do
lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc
AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k
-----END CERTIFICATE-----
8 changes: 5 additions & 3 deletions src/Message/AbstractRequest.php
Original file line number Diff line number Diff line change
@@ -154,13 +154,13 @@ public function setCancelMethod($value)
/**
* Redirect method conversion table.
*/
private static $methodsTable = array(
private static $methodsTable = [
'1' => '1',
'2' => '2',
'GET' => '0',
'POST' => '1',
'LINK' => '2',
);
];

/**
* Converts redirect method to WebMoney code: 0, 1 or 2.
@@ -171,7 +171,7 @@ public function setCancelMethod($value)
*/
public function formatMethod($method)
{
$method = strtoupper((string) $method);
$method = strtoupper((string)$method);
return isset(self::$methodsTable[$method]) ? self::$methodsTable[$method] : '0';
}

@@ -251,6 +251,8 @@ public function getCurrencyByPurse($purse)
return 'BYR';
case 'X':
return 'BTC';
case 'T':
return 'USDT';
default:
return null;
}
56 changes: 28 additions & 28 deletions src/Message/CompletePurchaseRequest.php
Original file line number Diff line number Diff line change
@@ -23,35 +23,35 @@ public function getData()
'secretKey'
);

return array(
'LMI_PAYEE_PURSE' => $this->httpRequest->request->get('LMI_PAYEE_PURSE'),
'LMI_PAYMENT_AMOUNT' => $this->httpRequest->request->get('LMI_PAYMENT_AMOUNT'),
'LMI_PAYMENT_NO' => $this->httpRequest->request->get('LMI_PAYMENT_NO'),
'LMI_MODE' => $this->httpRequest->request->get('LMI_MODE'),
'LMI_SYS_INVS_NO' => $this->httpRequest->request->get('LMI_SYS_INVS_NO'),
'LMI_SYS_TRANS_NO' => $this->httpRequest->request->get('LMI_SYS_TRANS_NO'),
'LMI_PAYER_PURSE' => $this->httpRequest->request->get('LMI_PAYER_PURSE'),
'LMI_PAYER_WM' => $this->httpRequest->request->get('LMI_PAYER_WM'),
'LMI_CAPITALLER_WMID' => $this->httpRequest->request->get('LMI_CAPITALLER_WMID'),
'LMI_PAYMER_NUMBER' => $this->httpRequest->request->get('LMI_PAYMER_NUMBER'),
'LMI_PAYMER_EMAIL' => $this->httpRequest->request->get('LMI_PAYMER_EMAIL'),
'LMI_EURONOTE_NUMBER' => $this->httpRequest->request->get('LMI_EURONOTE_NUMBER'),
'LMI_EURONOTE_EMAIL' => $this->httpRequest->request->get('LMI_EURONOTE_EMAIL'),
'LMI_WMCHECK_NUMBER' => $this->httpRequest->request->get('LMI_WMCHECK_NUMBER'),
return [
'LMI_PAYEE_PURSE' => $this->httpRequest->request->get('LMI_PAYEE_PURSE'),
'LMI_PAYMENT_AMOUNT' => $this->httpRequest->request->get('LMI_PAYMENT_AMOUNT'),
'LMI_PAYMENT_NO' => $this->httpRequest->request->get('LMI_PAYMENT_NO'),
'LMI_MODE' => $this->httpRequest->request->get('LMI_MODE'),
'LMI_SYS_INVS_NO' => $this->httpRequest->request->get('LMI_SYS_INVS_NO'),
'LMI_SYS_TRANS_NO' => $this->httpRequest->request->get('LMI_SYS_TRANS_NO'),
'LMI_PAYER_PURSE' => $this->httpRequest->request->get('LMI_PAYER_PURSE'),
'LMI_PAYER_WM' => $this->httpRequest->request->get('LMI_PAYER_WM'),
'LMI_CAPITALLER_WMID' => $this->httpRequest->request->get('LMI_CAPITALLER_WMID'),
'LMI_PAYMER_NUMBER' => $this->httpRequest->request->get('LMI_PAYMER_NUMBER'),
'LMI_PAYMER_EMAIL' => $this->httpRequest->request->get('LMI_PAYMER_EMAIL'),
'LMI_EURONOTE_NUMBER' => $this->httpRequest->request->get('LMI_EURONOTE_NUMBER'),
'LMI_EURONOTE_EMAIL' => $this->httpRequest->request->get('LMI_EURONOTE_EMAIL'),
'LMI_WMCHECK_NUMBER' => $this->httpRequest->request->get('LMI_WMCHECK_NUMBER'),
'LMI_TELEPAT_PHONENUMBER' => $this->httpRequest->request->get('LMI_TELEPAT_PHONENUMBER'),
'LMI_TELEPAT_ORDERID' => $this->httpRequest->request->get('LMI_TELEPAT_ORDERID'),
'LMI_PAYMENT_CREDITDAYS' => $this->httpRequest->request->get('LMI_PAYMENT_CREDITDAYS'),
'LMI_HASH' => $this->httpRequest->request->get('LMI_HASH'),
'LMI_SYS_TRANS_DATE' => $this->httpRequest->request->get('LMI_SYS_TRANS_DATE'),
'LMI_SECRET_KEY' => $this->httpRequest->request->get('LMI_SECRET_KEY'),
'LMI_SDP_TYPE' => $this->httpRequest->request->get('LMI_SDP_TYPE'),
'LMI_PAYMENT_DESC' => $this->httpRequest->request->get('LMI_PAYMENT_DESC'),
'LMI_PAYER_COUNTRYID' => $this->httpRequest->request->get('LMI_PAYER_COUNTRYID'),
'LMI_PAYER_PCOUNTRYID' => $this->httpRequest->request->get('LMI_PAYER_PCOUNTRYID'),
'LMI_PAYER_IP' => $this->httpRequest->request->get('LMI_PAYER_IP'),
'LMI_LANG' => $this->httpRequest->request->get('LMI_LANG'),
'LMI_DBLCHK' => $this->httpRequest->request->get('LMI_DBLCHK'),
);
'LMI_TELEPAT_ORDERID' => $this->httpRequest->request->get('LMI_TELEPAT_ORDERID'),
'LMI_PAYMENT_CREDITDAYS' => $this->httpRequest->request->get('LMI_PAYMENT_CREDITDAYS'),
'LMI_HASH' => $this->httpRequest->request->get('LMI_HASH'),
'LMI_SYS_TRANS_DATE' => $this->httpRequest->request->get('LMI_SYS_TRANS_DATE'),
'LMI_SECRET_KEY' => $this->httpRequest->request->get('LMI_SECRET_KEY'),
'LMI_SDP_TYPE' => $this->httpRequest->request->get('LMI_SDP_TYPE'),
'LMI_PAYMENT_DESC' => $this->httpRequest->request->get('LMI_PAYMENT_DESC'),
'LMI_PAYER_COUNTRYID' => $this->httpRequest->request->get('LMI_PAYER_COUNTRYID'),
'LMI_PAYER_PCOUNTRYID' => $this->httpRequest->request->get('LMI_PAYER_PCOUNTRYID'),
'LMI_PAYER_IP' => $this->httpRequest->request->get('LMI_PAYER_IP'),
'LMI_LANG' => $this->httpRequest->request->get('LMI_LANG'),
'LMI_DBLCHK' => $this->httpRequest->request->get('LMI_DBLCHK'),
];
}

/**
30 changes: 16 additions & 14 deletions src/Message/CompletePurchaseResponse.php
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ public function getCurrency()

public function getTestMode()
{
return (bool) $this->getMode();
return (bool)$this->getMode();
}

public function getMode()
@@ -114,18 +114,20 @@ private function calculateHash()
throw new InvalidResponseException('Invalid signature type');
}

return strtoupper(hash(
$hashType,
$this->data['LMI_PAYEE_PURSE'].
$this->data['LMI_PAYMENT_AMOUNT'].
$this->data['LMI_PAYMENT_NO'].
$this->data['LMI_MODE'].
$this->data['LMI_SYS_INVS_NO'].
$this->data['LMI_SYS_TRANS_NO'].
$this->data['LMI_SYS_TRANS_DATE'].
$this->request->getSecretkey().
$this->data['LMI_PAYER_PURSE'].
$this->data['LMI_PAYER_WM']
));
return strtoupper(
hash(
$hashType,
$this->data['LMI_PAYEE_PURSE'] .
$this->data['LMI_PAYMENT_AMOUNT'] .
$this->data['LMI_PAYMENT_NO'] .
$this->data['LMI_MODE'] .
$this->data['LMI_SYS_INVS_NO'] .
$this->data['LMI_SYS_TRANS_NO'] .
$this->data['LMI_SYS_TRANS_DATE'] .
$this->request->getSecretkey() .
$this->data['LMI_PAYER_PURSE'] .
$this->data['LMI_PAYER_WM']
)
);
}
}
Loading