Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
v1.0.1
  • Loading branch information
mateuszpy committed Sep 4, 2015
1 parent a5180fd commit a37b893
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 15 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# drupalcommerce
drupalcommerce
DrupalCommerce Dotpay payment module
=====================

*English version below*

####Wtyczka dla DrupalCommerce dodająca bramkę płatności Dotpay####

### Instrukcja: ###
1. Pobierz wtyczkę dotpay.zip (https://github.com/dotpay/drupalcommerce/releases/latest)
2. Zaloguj się od panelu Drupal i przejdź do Ustawienia witryny -> Moduły -> Instalacja nowego modułu
3. Wskaż na pobrany plik dotpay.zip i kliknij Instaluj
4. Konfigurację zmienisz w sekcji Ustawienia sklepu -> Metody płatności

---------------------------------------

####DrupalCommerce plugin adding Dotpay payment gateway####

### Instructions: ###
1. Download the plugin dotpay.zip (https://github.com/dotpay/drupalcommerce/releases/latest)
2. Login to the Drupal panel and go to Site settings -> Modules -> Install new module
3. Select downloaded dotpay.zip file and click Install
4. You can change module configuration in Store settings -> Payment methods
16 changes: 13 additions & 3 deletions commerce_dotpay.module
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
<?php
/**
* @package Dotpay Payment Plugin module for Drupal Commerce
* @version $1.0.1: commerce_dotpay.module.php 2015-08-27 for Dotpay 2.0
* @author Dotpay SA < tech@dotpay.pl >
* @copyright (C) 2015 - Dotpay SA
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
* tested on:Drupal core 7.39 + Commerce Kickstart 7.x-2.28
**/


DEFINE('DOTPAY_PAYMENT_TYPE', '0');
DEFINE('DOTPAY_API_VERSION', 'dev');
Expand Down Expand Up @@ -104,7 +113,7 @@ function commerce_dotpay_form_commerce_checkout_form_alter(&$form, &$form_state)
*/
function commerce_dotpay_icon(){
$iconParameters = array(
'path' => drupal_get_path('module', 'commerce_dotpay') . '/images/dotpay.jpeg',
'path' => drupal_get_path('module', 'commerce_dotpay') . '/images/dotpay.png',
'title' => 'dotpay icon',
'alt' => 'dotpay icon',
'attributes' => array(
Expand Down Expand Up @@ -214,7 +223,7 @@ function commerce_dotpay_callback($payment_method) {
case 'rejected':
$transaction->status = COMMERCE_PAYMENT_STATUS_FAILURE;
$transaction->message = t("Rejected payment");
echo 'Rejected payment';
echo 'OK';
break;
case 'completed':
$transaction->status = COMMERCE_PAYMENT_STATUS_SUCCESS;
Expand Down Expand Up @@ -348,6 +357,7 @@ function commerce_dotpay_order_form($form, $form_state, $order, $payment_method)

foreach ($data as $name => $value) {
$form[$name] = array(
//'#type' => 'textfield',
'#type' => 'hidden',
'#value' => $value,
);
Expand Down Expand Up @@ -402,7 +412,7 @@ function commerce_dotpay_create_payment_transaction( $order,$payment_method, $am
* Validate language of drupal commerce
*
* If language is allowed in dotpay it return ISO Name of language, otherwise
* it retrun 'en'
* it return 'en'
*/
function commerce_dotpay_get_and_validateLanguage(){
global $language;
Expand Down
Binary file added images/dotpay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions translations/pl.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# $Id$
#
# Polish translation of Drupal (general)
# Copyright YEAR NAME <EMAIL@ADDRESS>
# Copyright 2015 Dotpay SA <tech@dotpay.pl>
# Generated from files:
# commerce_dotpay.module: n/a
# commerce_dotpay.info: n/a
Expand All @@ -24,24 +24,24 @@ msgid "Dotpay payment solution"
msgstr "Dotpay płatności"

#: commerce_dotpay.module:17
msgid "Pay with a dotpay"
msgstr "Zapłać przy użyciu dotpay"
msgid "Pay with a Dotpay"
msgstr "Zapłać przy użyciu Dotpay"

#: commerce_dotpay.module:51
msgid "identifier"
msgstr "Id"

#: commerce_dotpay.module:52
msgid "description identifier"
msgstr "Id z panelu dotpay"
msgstr "Id z panelu Dotpay"

#: commerce_dotpay.module:59
msgid "pin"
msgstr "pin"

#: commerce_dotpay.module:60
msgid "description pin"
msgstr "Pin z panelu dotpay"
msgstr "Pin z panelu Dotpay"

#: commerce_dotpay.module:67
msgid "Dotpay test / production"
Expand All @@ -57,7 +57,7 @@ msgstr "produkcja"

#: commerce_dotpay.module:124
msgid "Integrate dotpay payment method"
msgstr "Integracja płatności dotpay"
msgstr "Integracja płatności Dotpay"

#: commerce_dotpay.module:190
msgid "Prices doesn't match"
Expand Down Expand Up @@ -89,15 +89,15 @@ msgstr "Dotpay nie został skonfigurowany poprawnie, wprowadź PIN"

#: commerce_dotpay.module:317
msgid "Dotpay is not configured for this currency."
msgstr "dotpay nie obsługuje wybranej waluty"
msgstr "Dotpay nie obsługuje wybranej waluty"

#: commerce_dotpay.module:332
msgid "Order @order_number at @store"
msgstr "Zamówienie nr @order_number w @store"

#: commerce_dotpay.module:358
msgid "Redirect to Dotpay platform"
msgstr "Przekierowanie do dotpay"
msgstr "Przekierowanie do Dotpay"

#: commerce_dotpay.module:422
msgid "Polish"
Expand Down Expand Up @@ -152,8 +152,8 @@ msgid "Commerce Dotpay"
msgstr "Dotpay"

#: commerce_dotpay.info:0
msgid "Implements dotpay payment services for use with Drupal Commerce."
msgstr "Implementacja płatności dotpAY"
msgid "Implements Dotpay payment services for use with Drupal Commerce."
msgstr "Implementacja płatności Dotpay"

#: commerce_dotpay.info:0
msgid "Commerce (payment)"
Expand Down

0 comments on commit a37b893

Please sign in to comment.