From 3c564ea81e40bf9ec28468f3af64c978b53802dc Mon Sep 17 00:00:00 2001 From: Dmitry Fedyuk Date: Tue, 18 Apr 2017 04:57:05 +0300 Subject: [PATCH] 0.0.1 --- .editorconfig | 6 + Block/Info.php | 13 + Charge.php | 35 +++ ConfigProvider.php | 4 + Init/Action.php | 14 + Method.php | 13 + README.md | 81 ++++++ Settings.php | 5 + Signer.php | 26 ++ Signer/Request.php | 13 + Signer/Response.php | 13 + composer.json | 30 +++ etc/adminhtml/system.xml | 240 ++++++++++++++++++ etc/config.xml | 22 ++ etc/df.json | 7 + etc/frontend/di.xml | 13 + etc/frontend/routes.xml | 11 + etc/module.xml | 11 + registration.php | 3 + view/frontend/layout/checkout_index_index.xml | 48 ++++ view/frontend/web/loader.js | 1 + view/frontend/web/main.js | 6 + 22 files changed, 615 insertions(+) create mode 100644 .editorconfig create mode 100644 Block/Info.php create mode 100644 Charge.php create mode 100644 ConfigProvider.php create mode 100644 Init/Action.php create mode 100644 Method.php create mode 100644 README.md create mode 100644 Settings.php create mode 100644 Signer.php create mode 100644 Signer/Request.php create mode 100644 Signer/Response.php create mode 100644 composer.json create mode 100644 etc/adminhtml/system.xml create mode 100644 etc/config.xml create mode 100644 etc/df.json create mode 100644 etc/frontend/di.xml create mode 100644 etc/frontend/routes.xml create mode 100644 etc/module.xml create mode 100644 registration.php create mode 100644 view/frontend/layout/checkout_index_index.xml create mode 100644 view/frontend/web/loader.js create mode 100644 view/frontend/web/main.js diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..c5f261a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,6 @@ +# 2017-03-09 +# https://github.com/isaacs/github/issues/170#issuecomment-150489692 +root = true +[*] +indent_size = 4 +indent_style = tab \ No newline at end of file diff --git a/Block/Info.php b/Block/Info.php new file mode 100644 index 0000000..0706412 --- /dev/null +++ b/Block/Info.php @@ -0,0 +1,13 @@ + mixed) + */ + protected function pCharge() {$s = $this->s(); return [];} + + /** + * 2017-04-18 + * @override + * @see \Df\PaypalClone\Charge::k_RequestId() + * @used-by \Df\PaypalClone\Charge::p() + * @return string + */ + protected function k_RequestId() {return '';} + + /** + * 2017-04-18 + * @override + * @see \Df\PaypalClone\Charge::k_Signature() + * @used-by \Df\PaypalClone\Charge::p() + * @return string + */ + protected function k_Signature() {return '';} +} \ No newline at end of file diff --git a/ConfigProvider.php b/ConfigProvider.php new file mode 100644 index 0000000..2b11fb2 --- /dev/null +++ b/ConfigProvider.php @@ -0,0 +1,4 @@ + +rm -rf var/di var/generation && bin/magento setup:di:compile +``` +If you have some problems while executing these commands, then check the [detailed instruction](https://mage2.pro/t/263). + +## Licensing +It is a paid extension, not free. +You can use it for free for the testing puproses only. +Please read the [testing policy](https://mage2.pro/t/topic/2590) before installation. + +## Support +- [The extension's **forum** branch](https://mage2.pro/c/extensions/paypal). +- [Where and how to report a Mage2.PRO extension's issue?](https://mage2.pro/t/2034) +- I also provide a **[generic Magento 2 support](https://mage2.pro/t/topic/755)** and [Magento 2 installation service](https://mage2.pro/t/748). + +## Want to be notified about the extension's updates? +- [Subscribe](https://mage2.pro/t/2540) to the extension's [forum branch](https://mage2.pro/c/extensions/paypal). +- Subscribe to my [Twitter](https://twitter.com/mage2_pro) and [YouTube](https://www.youtube.com/channel/UCvlDAZuj01_b92pzRi69LeQ) channels. + +## Need a new feature? +I provide the [**customization service**](https://mage2.pro/t/2020) for my payment extensions. + +## Need another payment extension for Magento 2? + +- «[**2Checkout**](https://mage2.pro/c/extensions/2checkout)» payment extension. +- «[**歐付寶 allPay**](https://mage2.pro/c/extensions/allpay)» payment extension (Taiwan). +- «[**Checkout.com**](https://mage2.pro/c/extensions/checkout-com)» payment extension. +- «[**Paypal**](https://mage2.pro/c/extensions/paypal)» payment extension (Philippines). +- «[**Ginger Payments**](https://mage2.pro/c/extensions/ginger-payments)» extension (the Netherlands, Belgium). +- «[**iPay88**](https://mage2.pro/c/extensions/ipay88)» payment extension (Malaysia, Indonesia, Philippines, Thailand, Singapore, China). +- «[**iyzico**](https://mage2.pro/c/extensions/iyzico)» payment extension (Turkey). +- «[**Kassa Compleet**](https://mage2.pro/c/extensions/kassa-compleet)» payment extension by ING Bank (the Netherlands). +- «[**Klarna**](https://mage2.pro/c/extensions/klarna)» payment extension (Austria, Denmark, Finland, Germany, Norway, Sweden). +- «[**Moip**](https://mage2.pro/c/extensions/moip)» payment extension (Brazil). +- «[**mPAY24**](https://mage2.pro/c/extensions/mpay24)» payment extension (Austria, Germany). +- «[**Omise**](https://mage2.pro/c/extensions/omise)» payment extension (Thailand, Japan). +- «[**Paymill**](https://mage2.pro/c/extensions/paymill)» payment extension (the European Union). +- «[**PayPal**](https://mage2.pro/c/extensions/paypal)»: an alternative module you can get fast support and customizations for. +- «[**Paystation**](https://mage2.pro/c/extensions/paystation)» payment extension (New Zealand). +- «[**Robokassa**](https://mage2.pro/c/extensions/robokassa)» payment extension (Russia). +- «[**SecurePay**](https://mage2.pro/c/extensions/securepay)» payment extension (Australia). +- «[**Spryng**](https://mage2.pro/c/extensions/spryng)» payment extension (the European Union). +- «[**Square**](https://mage2.pro/c/extensions/square)» payment extension (USA, Canada). +- «[**Stripe**](https://mage2.pro/c/extensions/stripe)» payment extension. +- «[**Yandex.Kassa**](https://mage2.pro/c/extensions/yandex-kassa)» (as known as Yandex.Checkout, Яндекс.Касса) payment extension (Russia, Armenia, Azerbaijan, Belarus, Georgia, Kazakhstan, Kyrgyzstan, Latvia, Moldova, Tajikistan). + +## See also my other Magento 2 extensions: + +- «[**Price Format**](https://mage2.pro/c/extensions/price-format)» (set a custom display format for the prices and other currency values: discounts, taxes, sales amounts). +- «[**Sales Documents Numeration**](https://mage2.pro/c/extensions/sales-documents-numeration)» (use a custom numeration for the sales documents: orders, invoices, shipments, and credit memos). +- «[**Login with Amazon**](https://mage2.pro/c/extensions/amazon-login)» (a single sign-on extension). +- «[**Backend Login with Google Account**](https://mage2.pro/c/extensions/google-backend-login)» (a single sign-on extension for the Magento 2 backend). +- «[**Facebook Login**](https://mage2.pro/c/extensions/facebook-login)» (a single sign-on extension). +- «[**Blackbaud NetCommunity**](https://mage2.pro/c/extensions/blackbaud-netcommunity)» (an integration with an online fundraising software). +- «[**Markdown Editor**](https://mage2.pro/c/extensions/markdown)» (an alternative content editor for the Magento 2 backend). +- «[**Twitter Timeline**](https://mage2.pro/c/extensions/twitter-timeline)» (shows your latest tweets in your store's frontend sidebar). +- «[**Facebook Like & Share**](https://mage2.pro/c/extensions/facebook-like)» (shows the Facebook's «Like» and «Share» buttons on the frontend product pages). +- «[**Salesforce**](https://mage2.pro/c/extensions/salesforce)» (an integration with a CRM software). + +## Need a custom payment extension? +I provide a [custom payment gateway integration service](https://mage2.pro/t/917). + +## Want to get the full rights on my extension? +It is possible: the price depends on a extension and starts from $5.000. +You will get 2 years of support, updates, and free installation service for all your clients. + + diff --git a/Settings.php b/Settings.php new file mode 100644 index 0000000..7cb38d0 --- /dev/null +++ b/Settings.php @@ -0,0 +1,5 @@ +values());} +} \ No newline at end of file diff --git a/Signer/Request.php b/Signer/Request.php new file mode 100644 index 0000000..8966f23 --- /dev/null +++ b/Signer/Request.php @@ -0,0 +1,13 @@ +v(), []);} +} \ No newline at end of file diff --git a/Signer/Response.php b/Signer/Response.php new file mode 100644 index 0000000..5263335 --- /dev/null +++ b/Signer/Response.php @@ -0,0 +1,13 @@ +v(), []);} +} \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..cb053ad --- /dev/null +++ b/composer.json @@ -0,0 +1,30 @@ +{ + "name": "mage2pro/paypal" + ,"version": "0.0.1" + ,"description": "An alternative PayPal module for Magento 2 you can get fast support and customizations for" + ,"type": "magento2-module" + ,"homepage": "https://mage2.pro/c/extensions/paypal" + ,"license": "proprietary" + ,"authors": [{ + "name": "Dmitry Fedyuk", + "email": "admin@mage2.pro", + "homepage": "https://mage2.pro/users/dmitry_fedyuk", + "role": "Developer" + }] + ,"require": {"mage2pro/core": ">=2.5.6"} + ,"autoload": {"files": ["registration.php"], "psr-4": {"Dfe\\Paypal\\": ""}} + ,"keywords": [ + "API" + ,"Bank card" + ,"Credit card" + ,"PayPal" + ,"eCommerce" + ,"Magento" + ,"Magento 2" + ,"Magento extension" + ,"Payment" + ,"Payment authorization" + ,"Payment integration" + ,"Payment gateway" + ] +} \ No newline at end of file diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml new file mode 100644 index 0000000..efe23b2 --- /dev/null +++ b/etc/adminhtml/system.xml @@ -0,0 +1,240 @@ + + + +
+ + + + Dfe_Paypal + Df\Config\Fieldset + + + Df\Config\Backend\Checkbox + PayPal» payment extension?]]> + + + + + 1 + required-entry + + + + Df\Config\Backend\Checkbox + + 1 + + + + How to get it?]]> + + 1 + 1 + + required-entry + + + + How to get it?]]> + Magento\Config\Model\Config\Backend\Encrypted + + 1 + 1 + + required-entry + + + + + + 1 + 0 + + required-entry + + + + + Magento\Config\Model\Config\Backend\Encrypted + + 1 + 0 + + required-entry + + + + Up to 100 characters. +
You can use variables in the description.]]>
+ + required-entry + 1 +
+ + + Df\Config\Backend\Checkbox + checked, Magento will require the billing address. It is the default Magento behaviour.
If unchecked, Magento will not require the billing address, and even will not ask for it.]]>
+ 1 +
+ + + + validate-number validate-greater-than-zero + 1 + + + + + validate-number validate-greater-than-zero + 1 + + + + Df\Config\Source\NoWhiteBlack + 1 + + + + Magento\Directory\Model\Config\Source\Country + 1 + + 1 + + 0 + + + +
+
+
+
\ No newline at end of file diff --git a/etc/config.xml b/etc/config.xml new file mode 100644 index 0000000..f5a85cb --- /dev/null +++ b/etc/config.xml @@ -0,0 +1,22 @@ + + + + + + {store.domain} // {customer.name} // {order.id} + 1 + authorize_capture + PayPal + PayPal + + + + + Dfe\Paypal\Method + + + + \ No newline at end of file diff --git a/etc/df.json b/etc/df.json new file mode 100644 index 0000000..fa74453 --- /dev/null +++ b/etc/df.json @@ -0,0 +1,7 @@ +{ + "sentry": { + "id": 159134 + ,"key1": "9dbcdffd66874437a3a9cdce62a9e588" + ,"key2": "1ef84369f0044135bd61b2557190cc3a" + } +} \ No newline at end of file diff --git a/etc/frontend/di.xml b/etc/frontend/di.xml new file mode 100644 index 0000000..a5e2f94 --- /dev/null +++ b/etc/frontend/di.xml @@ -0,0 +1,13 @@ + + + + + + Dfe\Paypal\ConfigProvider + + + + \ No newline at end of file diff --git a/etc/frontend/routes.xml b/etc/frontend/routes.xml new file mode 100644 index 0000000..20c3cb9 --- /dev/null +++ b/etc/frontend/routes.xml @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/etc/module.xml b/etc/module.xml new file mode 100644 index 0000000..4ddbe61 --- /dev/null +++ b/etc/module.xml @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/registration.php b/registration.php new file mode 100644 index 0000000..f3c9ba8 --- /dev/null +++ b/registration.php @@ -0,0 +1,3 @@ + + + + + + + + + + + + + uiComponent + + + + + + + + Dfe_Paypal/loader + + + true + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/view/frontend/web/loader.js b/view/frontend/web/loader.js new file mode 100644 index 0000000..665c123 --- /dev/null +++ b/view/frontend/web/loader.js @@ -0,0 +1 @@ +define(['Df_Payment/loader'], function(l) {return l('Dfe_Paypal', 'dfe_paypal');}); \ No newline at end of file diff --git a/view/frontend/web/main.js b/view/frontend/web/main.js new file mode 100644 index 0000000..ff51beb --- /dev/null +++ b/view/frontend/web/main.js @@ -0,0 +1,6 @@ +// 2017-04-18 +define([ + 'Df_Payment/custom' +], function(parent) {'use strict'; return parent.extend({ + defaults: {df: {test: {showBackendTitle: false}}} +});}); \ No newline at end of file