Version Notes
- Added Afterpay paymentmethod
- Added Bitcoin paymentmethod
- Changed gateway URL to Curopayments
- Changed Live/Test mode to use Curopayments staging environment
- Changed carditems property for use with all paymentmethods
- Fixed carditems property so VAT will be correct when discount is given
- Added Version configuration-panel
Download this release
Release Info
Developer | Cardgate BV |
Extension | Cardgate_Cgp |
Version | 1.1.4 |
Comparing to | |
See all releases |
Code changes from version 1.1.3 to 1.1.4
- app/code/local/Cardgate/Cgp/Block/Adminhtml/System/Config/Source/Version.php +21 -0
- app/code/local/Cardgate/Cgp/Block/Form/Ideal.php +23 -50
- app/code/local/Cardgate/Cgp/Model/Adminhtml/System/Config/Source/Version.php +18 -0
- app/code/local/Cardgate/Cgp/Model/Base.php +12 -0
- app/code/local/Cardgate/Cgp/Model/Gateway/Abstract.php +110 -199
- app/code/local/Cardgate/Cgp/Model/Gateway/Afterpay.php +17 -0
- app/code/local/Cardgate/Cgp/Model/Gateway/Bitcoin.php +17 -0
- app/code/local/Cardgate/Cgp/etc/config.xml +18 -3
- app/code/local/Cardgate/Cgp/etc/system.xml +198 -3
- app/locale/nl_NL/Cardgate_Cgp.csv +7 -3
- package.xml +11 -6
app/code/local/Cardgate/Cgp/Block/Adminhtml/System/Config/Source/Version.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento CardGate payment extension
|
5 |
+
*
|
6 |
+
* @category Mage
|
7 |
+
* @package Cardgate_Cgp
|
8 |
+
*/
|
9 |
+
class Cardgate_Cgp_Block_Adminhtml_System_Config_Source_Version
|
10 |
+
extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
|
11 |
+
{
|
12 |
+
|
13 |
+
public function render (Varien_Data_Form_Element_Abstract $element)
|
14 |
+
{
|
15 |
+
$base = Mage::getSingleton( 'cgp/base' );
|
16 |
+
$sTestMode = $base->isTest() ? "<span style='color:#F00'>TEST MODE</span><br/>\n" : '';
|
17 |
+
$sTestMode.= !empty( $_SERVER['CGP_GATEWAY_URL'] ) ? "<span style='color:#F00'>FORCED URL : {$_SERVER['CGP_GATEWAY_URL']}</span><br/>\n" : '';
|
18 |
+
return $sTestMode . 'CardGate v' . Mage::getConfig()->getNode( 'modules/Cardgate_Cgp/version' ) . ' / Magento v' . Mage::getVersion();
|
19 |
+
}
|
20 |
+
|
21 |
+
}
|
app/code/local/Cardgate/Cgp/Block/Form/Ideal.php
CHANGED
@@ -10,35 +10,22 @@ class Cardgate_Cgp_Block_Form_Ideal extends Mage_Payment_Block_Form
|
|
10 |
{
|
11 |
|
12 |
protected $_banks = array(
|
13 |
-
'
|
14 |
-
'
|
15 |
-
'
|
16 |
-
'
|
17 |
-
'
|
18 |
-
'
|
19 |
-
'
|
20 |
-
'
|
21 |
-
'
|
22 |
-
'
|
23 |
-
|
24 |
);
|
25 |
|
26 |
protected function _construct ()
|
27 |
{
|
28 |
parent::_construct();
|
29 |
-
|
30 |
-
$client = new Varien_Http_Client('https://gateway.cardgateplus.com/cache/idealDirectory.dat');
|
31 |
-
try{
|
32 |
-
$response = $client->request();
|
33 |
-
if ($response->isSuccessful()) {
|
34 |
-
$aBanks = unserialize( $response->getBody() );
|
35 |
-
if ( is_array( $aBanks ) ) {
|
36 |
-
$this->_banks = $aBanks;
|
37 |
-
}
|
38 |
-
}
|
39 |
-
} catch (Exception $e) {
|
40 |
-
}
|
41 |
-
|
42 |
$this->setTemplate( 'cardgate/cgp/form/ideal.phtml' );
|
43 |
}
|
44 |
|
@@ -88,34 +75,20 @@ class Cardgate_Cgp_Block_Form_Ideal extends Mage_Payment_Block_Form
|
|
88 |
*/
|
89 |
private function getBankOptions ()
|
90 |
{
|
91 |
-
$url = 'https://gateway.cardgateplus.com/cache/idealDirectoryRabobank.dat';
|
92 |
-
if ( ! function_exists( 'file_get_contents' ) ) {
|
93 |
-
$result = false;
|
94 |
-
} else {
|
95 |
-
$result = file_get_contents( $url );
|
96 |
-
}
|
97 |
-
|
98 |
-
$aBanks = array();
|
99 |
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
if ( $
|
106 |
-
$
|
107 |
-
|
|
|
108 |
}
|
109 |
-
|
110 |
-
$aBanks = array_merge( array(
|
111 |
-
'' => Mage::helper( 'cgp' )->__( '--Please select--' )
|
112 |
-
), $aBanks );
|
113 |
-
}
|
114 |
-
if ( count( $aBanks ) < 1 ) {
|
115 |
-
$aBanks = array_merge( array(
|
116 |
-
'' => Mage::helper( 'cgp' )->__( '--Please select--' )
|
117 |
-
), $this->_banks );
|
118 |
}
|
119 |
-
|
|
|
120 |
}
|
121 |
}
|
10 |
{
|
11 |
|
12 |
protected $_banks = array(
|
13 |
+
'' => 'Please select',
|
14 |
+
'RABONL2U' => 'Rabobank',
|
15 |
+
'ABNANL2A' => 'ABN Amro Bank',
|
16 |
+
'INGBNL2A' => 'ING',
|
17 |
+
'SNSBNL2A' => 'SNS Bank',
|
18 |
+
'KNABNL2H' => 'Knab',
|
19 |
+
'FVLBNL22' => 'Van Lanschot Bankiers',
|
20 |
+
'TRIONL2U' => 'Triodos Bank',
|
21 |
+
'ASNBNL21' => 'ASN Bank',
|
22 |
+
'RBRBNL21' => 'RegioBank',
|
23 |
+
'BUNQNL2A' => 'bunq'
|
24 |
);
|
25 |
|
26 |
protected function _construct ()
|
27 |
{
|
28 |
parent::_construct();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
$this->setTemplate( 'cardgate/cgp/form/ideal.phtml' );
|
30 |
}
|
31 |
|
75 |
*/
|
76 |
private function getBankOptions ()
|
77 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
+
$client = new Varien_Http_Client('https://gateway.cardgateplus.com/cache/idealDirectoryCUROPayments.dat');
|
80 |
+
try{
|
81 |
+
$response = $client->request();
|
82 |
+
if ($response->isSuccessful()) {
|
83 |
+
$aBanks = unserialize( $response->getBody() );
|
84 |
+
if ( is_array( $aBanks ) ) {
|
85 |
+
unset($aBanks[0]);
|
86 |
+
$this->_banks = array_merge(array(''=>''),$aBanks);
|
87 |
+
}
|
88 |
}
|
89 |
+
} catch (Exception $e) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
+
$this->_banks[''] = Mage::helper( 'cgp' )->__( '--Please select--' );
|
92 |
+
return $this->_banks;
|
93 |
}
|
94 |
}
|
app/code/local/Cardgate/Cgp/Model/Adminhtml/System/Config/Source/Version.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento CardGate payment extension
|
5 |
+
*
|
6 |
+
* @category Mage
|
7 |
+
* @package Cardgate_Cgp
|
8 |
+
*/
|
9 |
+
class Cardgate_Cgp_Model_Adminhtml_System_Config_Source_Version
|
10 |
+
extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
|
11 |
+
{
|
12 |
+
|
13 |
+
public function render ()
|
14 |
+
{
|
15 |
+
return ( string ) Mage::getConfig()->getNode( 'modules/Cardgate_Cgp/version' );
|
16 |
+
}
|
17 |
+
|
18 |
+
}
|
app/code/local/Cardgate/Cgp/Model/Base.php
CHANGED
@@ -337,6 +337,18 @@ class Cardgate_Cgp_Model_Base extends Varien_Object
|
|
337 |
$this->log( $msg );
|
338 |
die( $msg );
|
339 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
// Update only certain states
|
341 |
$canUpdate = false;
|
342 |
$undoCancel = false;
|
337 |
$this->log( $msg );
|
338 |
die( $msg );
|
339 |
}
|
340 |
+
|
341 |
+
// Adiitional logging for direct-debit
|
342 |
+
if ( $this->getCallbackData( 'recipient_name' ) && $this->getCallbackData( 'recipient_iban' )
|
343 |
+
&& $this->getCallbackData( 'recipient_bic' ) && $this->getCallbackData( 'recipient_reference' )
|
344 |
+
) {
|
345 |
+
$statusMessage.= "<br/>\n" . Mage::helper( 'cgp' )->__( 'Additional information' )." : "
|
346 |
+
. "<br/>\n" . Mage::helper( 'cgp' )->__( 'Benificiary' ) ." : ". $this->getCallbackData( 'recipient_name' )
|
347 |
+
. "<br/>\n" . Mage::helper( 'cgp' )->__( 'Benificiary IBAN' ) ." : ". $this->getCallbackData( 'recipient_iban' )
|
348 |
+
. "<br/>\n" . Mage::helper( 'cgp' )->__( 'Benificiary BIC' ) ." : ". $this->getCallbackData( 'recipient_bic' )
|
349 |
+
. "<br/>\n" . Mage::helper( 'cgp' )->__( 'Reference' ) ." : ". $this->getCallbackData( 'recipient_reference' );
|
350 |
+
}
|
351 |
+
|
352 |
// Update only certain states
|
353 |
$canUpdate = false;
|
354 |
$undoCancel = false;
|
app/code/local/Cardgate/Cgp/Model/Gateway/Abstract.php
CHANGED
@@ -35,7 +35,8 @@ abstract class Cardgate_Cgp_Model_Gateway_Abstract extends Mage_Payment_Model_Me
|
|
35 |
*
|
36 |
* @var string
|
37 |
*/
|
38 |
-
protected $_url = 'https://
|
|
|
39 |
|
40 |
/**
|
41 |
* supported countries
|
@@ -106,7 +107,8 @@ abstract class Cardgate_Cgp_Model_Gateway_Abstract extends Mage_Payment_Model_Me
|
|
106 |
if ( ! empty( $_SERVER['CGP_GATEWAY_URL'] ) ) {
|
107 |
return $_SERVER['CGP_GATEWAY_URL'];
|
108 |
} else {
|
109 |
-
|
|
|
110 |
}
|
111 |
}
|
112 |
|
@@ -247,6 +249,7 @@ abstract class Cardgate_Cgp_Model_Gateway_Abstract extends Mage_Payment_Model_Me
|
|
247 |
$newState = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
|
248 |
$newStatus = $this->getConfigData( 'initialized_status' );
|
249 |
$statusMessage = Mage::helper( 'cgp' )->__( 'Transaction started, waiting for payment.' );
|
|
|
250 |
if ( $order->getState() != Mage_Sales_Model_Order::STATE_PROCESSING ) {
|
251 |
$order->setState( $newState, $newStatus, $statusMessage );
|
252 |
$order->save();
|
@@ -274,6 +277,101 @@ abstract class Cardgate_Cgp_Model_Gateway_Abstract extends Mage_Payment_Model_Me
|
|
274 |
$s_arr = array();
|
275 |
$s_arr['language'] = $this->getConfigData( 'lang' );
|
276 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
switch ( $this->_model ) {
|
278 |
// CreditCards
|
279 |
case 'visa':
|
@@ -330,107 +428,6 @@ abstract class Cardgate_Cgp_Model_Gateway_Abstract extends Mage_Payment_Model_Me
|
|
330 |
$s_arr['language'] = $extra_data['klarna-language'];
|
331 |
$s_arr['account'] = 0;
|
332 |
|
333 |
-
$cartitems = array();
|
334 |
-
|
335 |
-
foreach ( $order->getAllItems() as $itemId => $item ) {
|
336 |
-
// add item
|
337 |
-
if ( $item->getQtyToInvoice() > 0 ) {
|
338 |
-
$cartitem = array();
|
339 |
-
$cartitem['qty'] = $item->getQtyToInvoice();
|
340 |
-
$cartitem['id'] = $item->getSku();
|
341 |
-
$cartitem['name'] = $item->getName();
|
342 |
-
$cartitem['price'] = sprintf( '%01.2f', ( float ) $item->getPriceInclTax() );
|
343 |
-
|
344 |
-
$item_tax = ( float ) $item->getData( 'tax_percent' );
|
345 |
-
$cartitem['vat'] = $item_tax;
|
346 |
-
// $cartitem['discount'] = sprintf( '%01.2f',
|
347 |
-
// $item->getData( 'discount_percent' ) );
|
348 |
-
if ( $item_tax > 0 ) {
|
349 |
-
$cartitem['flags'] = 32;
|
350 |
-
} else {
|
351 |
-
$cartitem['flags'] = 0;
|
352 |
-
}
|
353 |
-
$cartitems[] = $cartitem;
|
354 |
-
}
|
355 |
-
}
|
356 |
-
|
357 |
-
if ( $order->getDiscountAmount() < 0 ) {
|
358 |
-
$amount = $order->getDiscountAmount();
|
359 |
-
$applyAfter = Mage::helper( 'tax' )->applyTaxAfterDiscount( $order->getStoreId() );
|
360 |
-
if ( $applyAfter == true ) {
|
361 |
-
// With this setting active the discount will not have
|
362 |
-
// the correct
|
363 |
-
// value. We need to take each respective products rate
|
364 |
-
// and calculate
|
365 |
-
// a new value.
|
366 |
-
$amount = 0;
|
367 |
-
foreach ( $order->getAllVisibleItems() as $product ) {
|
368 |
-
$rate = $product->getTaxPercent();
|
369 |
-
$newAmount = $product->getDiscountAmount() * ( ( $rate / 100 ) + 1 );
|
370 |
-
$amount -= $newAmount;
|
371 |
-
}
|
372 |
-
// If the discount also extends to shipping
|
373 |
-
$shippingDiscount = $order->getShippingDiscountAmount();
|
374 |
-
if ( $shippingDiscount ) {
|
375 |
-
$taxClass = Mage::getStoreConfig( 'tax/classes/shipping_tax_class' );
|
376 |
-
$rate = $this->getTaxRate( $taxClass );
|
377 |
-
$newAmount = $shippingDiscount * ( ( $rate / 100 ) + 1 );
|
378 |
-
$amount -= $newAmount;
|
379 |
-
}
|
380 |
-
}
|
381 |
-
|
382 |
-
$discount = array();
|
383 |
-
$discount['qty'] = 1;
|
384 |
-
$discount['id'] = '';
|
385 |
-
$discount['name'] = 'Discount total';
|
386 |
-
$discount['price'] = sprintf( '%01.2f', round( $amount, 2 ) );
|
387 |
-
$discount['vat'] = 0;
|
388 |
-
$discount['flags'] = 32;
|
389 |
-
|
390 |
-
$cartitems[] = $discount;
|
391 |
-
}
|
392 |
-
|
393 |
-
$settings = Mage::getStoreConfig( 'cgp/cgp_klarna' );
|
394 |
-
|
395 |
-
// add shipping
|
396 |
-
if ( $order->getShippingAmount() > 0 ) {
|
397 |
-
|
398 |
-
$tax_info = $order->getFullTaxInfo();
|
399 |
-
|
400 |
-
$flags = 8;
|
401 |
-
if ( ! isset( $tax_info[0]['percent'] ) ) {
|
402 |
-
$tax_rate = 0;
|
403 |
-
} else {
|
404 |
-
$tax_rate = $tax_info[0]['percent'];
|
405 |
-
$flags += 32;
|
406 |
-
}
|
407 |
-
|
408 |
-
$price = round( $order->getShippingAmount() * ( 1 + $tax_rate / 100 ), 2 );
|
409 |
-
$shipping = array();
|
410 |
-
$shipping['qty'] = 1;
|
411 |
-
$shipping['id'] = '';
|
412 |
-
$shipping['name'] = 'Shipping fee';
|
413 |
-
$shipping['price'] = sprintf( '%01.2f', $price );
|
414 |
-
|
415 |
-
$shipping['flags'] = $flags;
|
416 |
-
$shipping['vat'] = $tax_rate;
|
417 |
-
|
418 |
-
$cartitems[] = $shipping;
|
419 |
-
}
|
420 |
-
|
421 |
-
// add invoice fee
|
422 |
-
if ( $order->getPayment()->getAdditionalInformation('invoice_fee') > 0 ) {
|
423 |
-
$fee = array();
|
424 |
-
$fee['qty'] = 1;
|
425 |
-
$fee['id'] = '';
|
426 |
-
$fee['name'] = 'Invoice fee';
|
427 |
-
$fee['price'] = sprintf( '%01.2f', $order->getPayment()->getAdditionalInformation('invoice_fee') );
|
428 |
-
$fee['vat'] = $order->getPayment()->getAdditionalInformation('invoice_fee_rate');
|
429 |
-
$fee['flags'] = ( $fee['vat'] > 0 ) ? 32 : 0 ;
|
430 |
-
$cartitems[] = $fee;
|
431 |
-
}
|
432 |
-
|
433 |
-
$s_arr['cartitems'] = serialize( $cartitems );
|
434 |
break;
|
435 |
|
436 |
// Klarna
|
@@ -447,102 +444,6 @@ abstract class Cardgate_Cgp_Model_Gateway_Abstract extends Mage_Payment_Model_Me
|
|
447 |
$s_arr['language'] = $extra_data['klarna-account-language'];
|
448 |
$s_arr['account'] = 1;
|
449 |
|
450 |
-
$cartitems = array();
|
451 |
-
foreach ( $order->getAllItems() as $itemId => $item ) {
|
452 |
-
if ( $item->getQtyToInvoice() > 0 ) {
|
453 |
-
$cartitem = array();
|
454 |
-
$cartitem['qty'] = $item->getQtyToInvoice();
|
455 |
-
$cartitem['id'] = $item->getSku();
|
456 |
-
$cartitem['name'] = $item->getName();
|
457 |
-
|
458 |
-
$cartitem['price'] = sprintf( '%01.2f', ( float ) $item->getPriceInclTax() );
|
459 |
-
|
460 |
-
$item_tax = ( float ) $item->getData( 'tax_percent' );
|
461 |
-
$cartitem['vat'] = $item_tax;
|
462 |
-
if ( $item_tax > 0 ) {
|
463 |
-
$cartitem['flags'] = 32;
|
464 |
-
} else {
|
465 |
-
$cartitem['flags'] = 0;
|
466 |
-
}
|
467 |
-
$cartitems[] = $cartitem;
|
468 |
-
}
|
469 |
-
}
|
470 |
-
|
471 |
-
if ( $order->getDiscountAmount() < 0 ) {
|
472 |
-
$amount = $order->getDiscountAmount();
|
473 |
-
$applyAfter = Mage::helper( 'tax' )->applyTaxAfterDiscount( $order->getStoreId() );
|
474 |
-
if ( $applyAfter == true ) {
|
475 |
-
// With this setting active the discount will not have
|
476 |
-
// the correct
|
477 |
-
// value. We need to take each respective products rate
|
478 |
-
// and calculate
|
479 |
-
// a new value.
|
480 |
-
$amount = 0;
|
481 |
-
foreach ( $order->getAllVisibleItems() as $product ) {
|
482 |
-
$rate = $product->getTaxPercent();
|
483 |
-
$newAmount = $product->getDiscountAmount() * ( ( $rate / 100 ) + 1 );
|
484 |
-
$amount -= $newAmount;
|
485 |
-
}
|
486 |
-
// If the discount also extends to shipping
|
487 |
-
$shippingDiscount = $order->getShippingDiscountAmount();
|
488 |
-
if ( $shippingDiscount ) {
|
489 |
-
$taxClass = Mage::getStoreConfig( 'tax/classes/shipping_tax_class' );
|
490 |
-
$rate = $this->getTaxRate( $taxClass );
|
491 |
-
$newAmount = $shippingDiscount * ( ( $rate / 100 ) + 1 );
|
492 |
-
$amount -= $newAmount;
|
493 |
-
}
|
494 |
-
}
|
495 |
-
|
496 |
-
$discount = array();
|
497 |
-
$discount['qty'] = 1;
|
498 |
-
$discount['id'] = '';
|
499 |
-
$discount['name'] = 'Discount total';
|
500 |
-
$discount['price'] = sprintf( '%01.2f', round( $amount, 2 ) );
|
501 |
-
$discount['vat'] = 0;
|
502 |
-
$discount['flags'] = 32;
|
503 |
-
|
504 |
-
$cartitems[] = $discount;
|
505 |
-
}
|
506 |
-
|
507 |
-
// add shipping
|
508 |
-
if ( $order->getShippingAmount() > 0 ) {
|
509 |
-
|
510 |
-
$tax_info = $order->getFullTaxInfo();
|
511 |
-
|
512 |
-
$flags = 8;
|
513 |
-
if ( ! isset( $tax_info[0]['percent'] ) ) {
|
514 |
-
$tax_rate = 0;
|
515 |
-
} else {
|
516 |
-
$tax_rate = $tax_info[0]['percent'];
|
517 |
-
$flags += 32;
|
518 |
-
}
|
519 |
-
|
520 |
-
$price = round( $order->getShippingAmount() * ( 1 + $tax_rate / 100 ), 2 );
|
521 |
-
$shipping = array();
|
522 |
-
$shipping['qty'] = 1;
|
523 |
-
$shipping['id'] = '';
|
524 |
-
$shipping['name'] = 'Shipping fee';
|
525 |
-
$shipping['price'] = sprintf( '%01.2f', $price );
|
526 |
-
|
527 |
-
$shipping['flags'] = $flags;
|
528 |
-
$shipping['vat'] = $tax_rate;
|
529 |
-
|
530 |
-
$cartitems[] = $shipping;
|
531 |
-
}
|
532 |
-
|
533 |
-
// add invoice fee
|
534 |
-
if ( $order->getPayment()->getAdditionalInformation('invoice_fee') > 0 ) {
|
535 |
-
$fee = array();
|
536 |
-
$fee['qty'] = 1;
|
537 |
-
$fee['id'] = '';
|
538 |
-
$fee['name'] = 'Invoice fee';
|
539 |
-
$fee['price'] = sprintf( '%01.2f', $order->getPayment()->getAdditionalInformation('invoice_fee') );
|
540 |
-
$fee['vat'] = $order->getPayment()->getAdditionalInformation('invoice_fee_rate');
|
541 |
-
$fee['flags'] = ( $fee['vat'] > 0 ) ? 32 : 0 ;
|
542 |
-
$cartitems[] = $fee;
|
543 |
-
}
|
544 |
-
|
545 |
-
$s_arr['cartitems'] = serialize( $cartitems );
|
546 |
break;
|
547 |
|
548 |
// Banktransfer
|
@@ -559,6 +460,16 @@ abstract class Cardgate_Cgp_Model_Gateway_Abstract extends Mage_Payment_Model_Me
|
|
559 |
case 'przelewy24':
|
560 |
$s_arr['option'] = 'przelewy24';
|
561 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
562 |
|
563 |
// Default
|
564 |
default:
|
35 |
*
|
36 |
* @var string
|
37 |
*/
|
38 |
+
protected $_url = 'https://secure.curopayments.net/gateway/cardgate/';
|
39 |
+
protected $_urlStaging = 'https://secure-staging.curopayments.net/gateway/cardgate/';
|
40 |
|
41 |
/**
|
42 |
* supported countries
|
107 |
if ( ! empty( $_SERVER['CGP_GATEWAY_URL'] ) ) {
|
108 |
return $_SERVER['CGP_GATEWAY_URL'];
|
109 |
} else {
|
110 |
+
$base = Mage::getSingleton( 'cgp/base' );
|
111 |
+
return $base->isTest() ? $this->_urlStaging : $this->_url;
|
112 |
}
|
113 |
}
|
114 |
|
249 |
$newState = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
|
250 |
$newStatus = $this->getConfigData( 'initialized_status' );
|
251 |
$statusMessage = Mage::helper( 'cgp' )->__( 'Transaction started, waiting for payment.' );
|
252 |
+
$statusMessage.= "<br/>\n" . Mage::helper( 'cgp' )->__( 'Paymentmethod used' ) . ' : ' . $order->getPayment()->getMethod();
|
253 |
if ( $order->getState() != Mage_Sales_Model_Order::STATE_PROCESSING ) {
|
254 |
$order->setState( $newState, $newStatus, $statusMessage );
|
255 |
$order->save();
|
277 |
$s_arr = array();
|
278 |
$s_arr['language'] = $this->getConfigData( 'lang' );
|
279 |
|
280 |
+
$cartitems = array();
|
281 |
+
foreach ( $order->getAllItems() as $itemId => $item ) {
|
282 |
+
if ( $item->getQtyToInvoice() > 0 ) {
|
283 |
+
$cartitems[] = array(
|
284 |
+
'quantity' => $item->getQtyToInvoice(),
|
285 |
+
'sku' => $item->getSku(),
|
286 |
+
'name' => $item->getName(),
|
287 |
+
'price' => sprintf( '%01.2f', ( float ) $item->getPriceInclTax() ),
|
288 |
+
'vat_amount' => sprintf( '%01.2f', ( float ) $item->getTaxAmount() ),
|
289 |
+
'vat' => ( float ) $item->getData( 'tax_percent' ),
|
290 |
+
'vat_inc' => 1,
|
291 |
+
'type' => 1
|
292 |
+
);
|
293 |
+
}
|
294 |
+
}
|
295 |
+
|
296 |
+
if ( $order->getDiscountAmount() < 0 ) {
|
297 |
+
$amount = $order->getDiscountAmount();
|
298 |
+
$applyAfter = Mage::helper( 'tax' )->applyTaxAfterDiscount( $order->getStoreId() );
|
299 |
+
$priceIncludesTax = Mage::helper( 'tax' )->priceIncludesTax( $order->getStoreId() );
|
300 |
+
|
301 |
+
if ( $applyAfter == true && $priceIncludesTax == false ) {
|
302 |
+
// With this setting active the discount will not have the correct value.
|
303 |
+
// We need to take each respective products rate and calculate a new value.
|
304 |
+
$amount = 0;
|
305 |
+
foreach ( $order->getAllVisibleItems() as $product ) {
|
306 |
+
$rate = $product->getTaxPercent();
|
307 |
+
$newAmount = $product->getDiscountAmount() * ( ( $rate / 100 ) + 1 );
|
308 |
+
$amount -= $newAmount;
|
309 |
+
}
|
310 |
+
// If the discount also extends to shipping
|
311 |
+
$shippingDiscount = $order->getShippingDiscountAmount();
|
312 |
+
if ( $shippingDiscount ) {
|
313 |
+
$taxClass = Mage::getStoreConfig( 'tax/classes/shipping_tax_class' );
|
314 |
+
$rate = $this->getTaxRate( $taxClass );
|
315 |
+
$newAmount = $shippingDiscount * ( ( $rate / 100 ) + 1 );
|
316 |
+
$amount -= $newAmount;
|
317 |
+
}
|
318 |
+
}
|
319 |
+
|
320 |
+
$cartitems[] = array(
|
321 |
+
'quantity' => '1',
|
322 |
+
'sku' => 'discount',
|
323 |
+
'name' => 'Discount',
|
324 |
+
'price' => sprintf( '%01.2f', round( $amount, 2 ) ),
|
325 |
+
'vat_amount' => 0,
|
326 |
+
'vat' => 0,
|
327 |
+
'vat_inc' => 1,
|
328 |
+
'type' => 4
|
329 |
+
);
|
330 |
+
}
|
331 |
+
|
332 |
+
// add shipping
|
333 |
+
if ( $order->getShippingAmount() > 0 ) {
|
334 |
+
|
335 |
+
$tax_info = $order->getFullTaxInfo();
|
336 |
+
|
337 |
+
$flags = 8;
|
338 |
+
if ( ! isset( $tax_info[0]['percent'] ) ) {
|
339 |
+
$tax_rate = 0;
|
340 |
+
} else {
|
341 |
+
$tax_rate = $tax_info[0]['percent'];
|
342 |
+
$flags += 32;
|
343 |
+
}
|
344 |
+
$tax_rate = ( isset( $tax_info[0]['percent'] ) ? $tax_info[0]['percent'] : 0 );
|
345 |
+
$cartitems[] = array(
|
346 |
+
'quantity' => '1',
|
347 |
+
'sku' => 'shipping',
|
348 |
+
'name' => 'Shipping fee',
|
349 |
+
'price' => sprintf( '%01.2f', $order->getShippingInclTax() ),
|
350 |
+
'vat_amount' => sprintf( '%01.2f', $order->getShippingTaxAmount() ),
|
351 |
+
'vat' => $tax_rate,
|
352 |
+
'vat_inc' => 1,
|
353 |
+
'type' => 2
|
354 |
+
);
|
355 |
+
}
|
356 |
+
|
357 |
+
// add invoice fee
|
358 |
+
if ( $order->getPayment()->getAdditionalInformation('invoice_fee') > 0 ) {
|
359 |
+
|
360 |
+
$tax_rate = $order->getPayment()->getAdditionalInformation('invoice_fee_rate');
|
361 |
+
$cartitems[] = array(
|
362 |
+
'quantity' => '1',
|
363 |
+
'sku' => 'invoice',
|
364 |
+
'name' => 'Invoice fee',
|
365 |
+
'price' => sprintf( '%01.2f', $order->getPayment()->getAdditionalInformation('invoice_fee') ),
|
366 |
+
'vat_amount' => ( isset( $tax_info[0]['percent'] ) ? round( $order->getPayment()->getAdditionalInformation('invoice_fee') * ( $tax_rate / 100 ), 2 ) : 0 ),
|
367 |
+
'vat' => $tax_rate,
|
368 |
+
'vat_inc' => 1,
|
369 |
+
'type' => 5
|
370 |
+
);
|
371 |
+
}
|
372 |
+
|
373 |
+
$s_arr['cartitems'] = serialize( $cartitems );
|
374 |
+
|
375 |
switch ( $this->_model ) {
|
376 |
// CreditCards
|
377 |
case 'visa':
|
428 |
$s_arr['language'] = $extra_data['klarna-language'];
|
429 |
$s_arr['account'] = 0;
|
430 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
break;
|
432 |
|
433 |
// Klarna
|
444 |
$s_arr['language'] = $extra_data['klarna-account-language'];
|
445 |
$s_arr['account'] = 1;
|
446 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
447 |
break;
|
448 |
|
449 |
// Banktransfer
|
460 |
case 'przelewy24':
|
461 |
$s_arr['option'] = 'przelewy24';
|
462 |
break;
|
463 |
+
|
464 |
+
// Afterpay
|
465 |
+
case 'afterpay':
|
466 |
+
$s_arr['option'] = 'afterpay';
|
467 |
+
break;
|
468 |
+
|
469 |
+
// Bitcoin
|
470 |
+
case 'bitcoin':
|
471 |
+
$s_arr['option'] = 'bitcoin';
|
472 |
+
break;
|
473 |
|
474 |
// Default
|
475 |
default:
|
app/code/local/Cardgate/Cgp/Model/Gateway/Afterpay.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento CardGate payment extension
|
5 |
+
*
|
6 |
+
* @category Mage
|
7 |
+
* @package Cardgate_Cgp
|
8 |
+
*/
|
9 |
+
class Cardgate_Cgp_Model_Gateway_Afterpay extends Cardgate_Cgp_Model_Gateway_Abstract
|
10 |
+
{
|
11 |
+
|
12 |
+
protected $_code = 'cgp_afterpay';
|
13 |
+
|
14 |
+
protected $_model = 'afterpay';
|
15 |
+
|
16 |
+
protected $_canUseInternal = true;
|
17 |
+
}
|
app/code/local/Cardgate/Cgp/Model/Gateway/Bitcoin.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento CardGate payment extension
|
5 |
+
*
|
6 |
+
* @category Mage
|
7 |
+
* @package Cardgate_Cgp
|
8 |
+
*/
|
9 |
+
class Cardgate_Cgp_Model_Gateway_Bitcoin extends Cardgate_Cgp_Model_Gateway_Abstract
|
10 |
+
{
|
11 |
+
|
12 |
+
protected $_code = 'cgp_bitcoin';
|
13 |
+
|
14 |
+
protected $_model = 'bitcoin';
|
15 |
+
|
16 |
+
protected $_canUseInternal = true;
|
17 |
+
}
|
app/code/local/Cardgate/Cgp/etc/config.xml
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
<config>
|
11 |
<modules>
|
12 |
<Cardgate_Cgp>
|
13 |
-
<version>1.1.
|
14 |
</Cardgate_Cgp>
|
15 |
</modules>
|
16 |
|
@@ -333,7 +333,17 @@
|
|
333 |
<active>1</active>
|
334 |
<model>cgp/gateway_przelewy24</model>
|
335 |
<title>CGP Przelewy24</title>
|
336 |
-
</cgp_przelewy24>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
337 |
</payment>
|
338 |
|
339 |
<cgp>
|
@@ -444,7 +454,12 @@
|
|
444 |
<active>0</active>
|
445 |
<model>cgp/gateway_przelewy24</model>
|
446 |
<title>Przelewy24</title>
|
447 |
-
</cgp_przelewy24>
|
|
|
|
|
|
|
|
|
|
|
448 |
</cgp>
|
449 |
</default>
|
450 |
|
10 |
<config>
|
11 |
<modules>
|
12 |
<Cardgate_Cgp>
|
13 |
+
<version>1.1.4</version>
|
14 |
</Cardgate_Cgp>
|
15 |
</modules>
|
16 |
|
333 |
<active>1</active>
|
334 |
<model>cgp/gateway_przelewy24</model>
|
335 |
<title>CGP Przelewy24</title>
|
336 |
+
</cgp_przelewy24>
|
337 |
+
<cgp_afterpay>
|
338 |
+
<active>1</active>
|
339 |
+
<model>cgp/gateway_afterpay</model>
|
340 |
+
<title>CGP Afterpay</title>
|
341 |
+
</cgp_afterpay>
|
342 |
+
<cgp_bitcoin>
|
343 |
+
<active>1</active>
|
344 |
+
<model>cgp/gateway_bitcoin</model>
|
345 |
+
<title>CGP Bitcoin</title>
|
346 |
+
</cgp_bitcoin>
|
347 |
</payment>
|
348 |
|
349 |
<cgp>
|
454 |
<active>0</active>
|
455 |
<model>cgp/gateway_przelewy24</model>
|
456 |
<title>Przelewy24</title>
|
457 |
+
</cgp_przelewy24>
|
458 |
+
<cgp_afterpay translate="title" module="cgp">
|
459 |
+
<active>0</active>
|
460 |
+
<model>cgp/gateway_afterpay</model>
|
461 |
+
<title>Afterpay</title>
|
462 |
+
</cgp_afterpay>
|
463 |
</cgp>
|
464 |
</default>
|
465 |
|
app/code/local/Cardgate/Cgp/etc/system.xml
CHANGED
@@ -20,6 +20,23 @@
|
|
20 |
<show_in_website>1</show_in_website>
|
21 |
<show_in_store>1</show_in_store>
|
22 |
<groups>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
<settings translate="comment">
|
24 |
<label>Settings</label>
|
25 |
<comment><![CDATA[<strong>Note:</strong> Don't forget to set-up in the <a href='https://my.cardgate.com/' target='_blank'>Merchant Backoffice</a> a Control URL to 'http://www.yourdomain.com/cgp/standard/control/'.]]></comment>
|
@@ -357,7 +374,7 @@
|
|
357 |
<show_in_website>1</show_in_website>
|
358 |
<show_in_store>1</show_in_store>
|
359 |
</sort_order>
|
360 |
-
|
361 |
<label>Payment fee</label>
|
362 |
<sort_order>110</sort_order>
|
363 |
<show_in_default>1</show_in_default>
|
@@ -1806,7 +1823,185 @@
|
|
1806 |
<show_in_website>1</show_in_website>
|
1807 |
<show_in_store>1</show_in_store>
|
1808 |
</sort_order>
|
1809 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1810 |
<label>Payment fee</label>
|
1811 |
<sort_order>110</sort_order>
|
1812 |
<show_in_default>1</show_in_default>
|
@@ -1843,7 +2038,7 @@
|
|
1843 |
<comment>Short description which is shown on orders/invoices</comment>
|
1844 |
</payment_fee_label>
|
1845 |
</fields>
|
1846 |
-
</
|
1847 |
|
1848 |
</groups>
|
1849 |
</cgp>
|
20 |
<show_in_website>1</show_in_website>
|
21 |
<show_in_store>1</show_in_store>
|
22 |
<groups>
|
23 |
+
<version translate="label" module="cgp">
|
24 |
+
<label>Version</label>
|
25 |
+
<sort_order>0</sort_order>
|
26 |
+
<show_in_default>1</show_in_default>
|
27 |
+
<show_in_website>1</show_in_website>
|
28 |
+
<show_in_store>1</show_in_store>
|
29 |
+
<fields>
|
30 |
+
<test_mode translate="label comment">
|
31 |
+
<label>Version</label>
|
32 |
+
<frontend_model>cgp/adminhtml_system_config_source_version</frontend_model>
|
33 |
+
<sort_order>0</sort_order>
|
34 |
+
<show_in_default>1</show_in_default>
|
35 |
+
<show_in_website>1</show_in_website>
|
36 |
+
<show_in_store>1</show_in_store>
|
37 |
+
</test_mode>
|
38 |
+
</fields>
|
39 |
+
</version>
|
40 |
<settings translate="comment">
|
41 |
<label>Settings</label>
|
42 |
<comment><![CDATA[<strong>Note:</strong> Don't forget to set-up in the <a href='https://my.cardgate.com/' target='_blank'>Merchant Backoffice</a> a Control URL to 'http://www.yourdomain.com/cgp/standard/control/'.]]></comment>
|
374 |
<show_in_website>1</show_in_website>
|
375 |
<show_in_store>1</show_in_store>
|
376 |
</sort_order>
|
377 |
+
<payment_fee translate="label">
|
378 |
<label>Payment fee</label>
|
379 |
<sort_order>110</sort_order>
|
380 |
<show_in_default>1</show_in_default>
|
1823 |
<show_in_website>1</show_in_website>
|
1824 |
<show_in_store>1</show_in_store>
|
1825 |
</sort_order>
|
1826 |
+
<payment_fee translate="label">
|
1827 |
+
<label>Payment fee</label>
|
1828 |
+
<sort_order>110</sort_order>
|
1829 |
+
<show_in_default>1</show_in_default>
|
1830 |
+
<show_in_website>1</show_in_website>
|
1831 |
+
<show_in_store>1</show_in_store>
|
1832 |
+
<comment>Payment fee amount (eg 0.35 or 1)</comment>
|
1833 |
+
</payment_fee>
|
1834 |
+
<payment_fee_tax translate="label">
|
1835 |
+
<label>Payment fee tax class</label>
|
1836 |
+
<frontend_type>select</frontend_type>
|
1837 |
+
<source_model>adminhtml/system_config_source_shipping_taxclass</source_model>
|
1838 |
+
<sort_order>120</sort_order>
|
1839 |
+
<show_in_default>1</show_in_default>
|
1840 |
+
<show_in_store>1</show_in_store>
|
1841 |
+
<show_in_website>1</show_in_website>
|
1842 |
+
<comment>Choose the fee's tax class</comment>
|
1843 |
+
</payment_fee_tax>
|
1844 |
+
<payment_fee_inc_ex translate="label">
|
1845 |
+
<label>Including/Excluding Tax</label>
|
1846 |
+
<frontend_type>select</frontend_type>
|
1847 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
1848 |
+
<sort_order>130</sort_order>
|
1849 |
+
<show_in_default>1</show_in_default>
|
1850 |
+
<show_in_website>1</show_in_website>
|
1851 |
+
<show_in_store>1</show_in_store>
|
1852 |
+
<comment>Yes = fee entered including tax / No = fee entered excluding tax</comment>
|
1853 |
+
</payment_fee_inc_ex>
|
1854 |
+
<payment_fee_label translate="label,comment">
|
1855 |
+
<label>Payment fee label</label>
|
1856 |
+
<sort_order>140</sort_order>
|
1857 |
+
<show_in_default>1</show_in_default>
|
1858 |
+
<show_in_website>1</show_in_website>
|
1859 |
+
<show_in_store>1</show_in_store>
|
1860 |
+
<comment>Short description which is shown on orders/invoices</comment>
|
1861 |
+
</payment_fee_label>
|
1862 |
+
</fields>
|
1863 |
+
</cgp_przelewy24>
|
1864 |
+
|
1865 |
+
<cgp_afterpay translate="label" module="cgp">
|
1866 |
+
<label>Afterpay</label>
|
1867 |
+
<sort_order>380</sort_order>
|
1868 |
+
<show_in_default>1</show_in_default>
|
1869 |
+
<show_in_website>1</show_in_website>
|
1870 |
+
<show_in_store>1</show_in_store>
|
1871 |
+
<fields>
|
1872 |
+
<active translate="label">
|
1873 |
+
<label>Enabled</label>
|
1874 |
+
<frontend_type>select</frontend_type>
|
1875 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
1876 |
+
<sort_order>1</sort_order>
|
1877 |
+
<show_in_default>1</show_in_default>
|
1878 |
+
<show_in_website>1</show_in_website>
|
1879 |
+
<show_in_store>1</show_in_store>
|
1880 |
+
</active>
|
1881 |
+
<title translate="label">
|
1882 |
+
<label>Title</label>
|
1883 |
+
<frontend_type>text</frontend_type>
|
1884 |
+
<sort_order>10</sort_order>
|
1885 |
+
<show_in_default>1</show_in_default>
|
1886 |
+
<show_in_website>1</show_in_website>
|
1887 |
+
<show_in_store>1</show_in_store>
|
1888 |
+
</title>
|
1889 |
+
<allowspecific translate="label">
|
1890 |
+
<label>Payment from applicable countries</label>
|
1891 |
+
<frontend_type>allowspecific</frontend_type>
|
1892 |
+
<sort_order>20</sort_order>
|
1893 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
1894 |
+
<show_in_default>1</show_in_default>
|
1895 |
+
<show_in_website>1</show_in_website>
|
1896 |
+
<show_in_store>1</show_in_store>
|
1897 |
+
</allowspecific>
|
1898 |
+
<specificcountry translate="label">
|
1899 |
+
<label>Payment from Specific countries</label>
|
1900 |
+
<frontend_type>multiselect</frontend_type>
|
1901 |
+
<sort_order>30</sort_order>
|
1902 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
1903 |
+
<show_in_default>1</show_in_default>
|
1904 |
+
<show_in_website>1</show_in_website>
|
1905 |
+
<show_in_store>1</show_in_store>
|
1906 |
+
</specificcountry>
|
1907 |
+
<sort_order translate="label">
|
1908 |
+
<label>Sort order</label>
|
1909 |
+
<frontend_type>text</frontend_type>
|
1910 |
+
<sort_order>100</sort_order>
|
1911 |
+
<show_in_default>1</show_in_default>
|
1912 |
+
<show_in_website>1</show_in_website>
|
1913 |
+
<show_in_store>1</show_in_store>
|
1914 |
+
</sort_order>
|
1915 |
+
<payment_fee translate="label">
|
1916 |
+
<label>Payment fee</label>
|
1917 |
+
<sort_order>110</sort_order>
|
1918 |
+
<show_in_default>1</show_in_default>
|
1919 |
+
<show_in_website>1</show_in_website>
|
1920 |
+
<show_in_store>1</show_in_store>
|
1921 |
+
<comment>Payment fee amount (eg 0.35 or 1)</comment>
|
1922 |
+
</payment_fee>
|
1923 |
+
<payment_fee_tax translate="label">
|
1924 |
+
<label>Payment fee tax class</label>
|
1925 |
+
<frontend_type>select</frontend_type>
|
1926 |
+
<source_model>adminhtml/system_config_source_shipping_taxclass</source_model>
|
1927 |
+
<sort_order>120</sort_order>
|
1928 |
+
<show_in_default>1</show_in_default>
|
1929 |
+
<show_in_store>1</show_in_store>
|
1930 |
+
<show_in_website>1</show_in_website>
|
1931 |
+
<comment>Choose the fee's tax class</comment>
|
1932 |
+
</payment_fee_tax>
|
1933 |
+
<payment_fee_inc_ex translate="label">
|
1934 |
+
<label>Including/Excluding Tax</label>
|
1935 |
+
<frontend_type>select</frontend_type>
|
1936 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
1937 |
+
<sort_order>130</sort_order>
|
1938 |
+
<show_in_default>1</show_in_default>
|
1939 |
+
<show_in_website>1</show_in_website>
|
1940 |
+
<show_in_store>1</show_in_store>
|
1941 |
+
<comment>Yes = fee entered including tax / No = fee entered excluding tax</comment>
|
1942 |
+
</payment_fee_inc_ex>
|
1943 |
+
<payment_fee_label translate="label,comment">
|
1944 |
+
<label>Payment fee label</label>
|
1945 |
+
<sort_order>140</sort_order>
|
1946 |
+
<show_in_default>1</show_in_default>
|
1947 |
+
<show_in_website>1</show_in_website>
|
1948 |
+
<show_in_store>1</show_in_store>
|
1949 |
+
<comment>Short description which is shown on orders/invoices</comment>
|
1950 |
+
</payment_fee_label>
|
1951 |
+
</fields>
|
1952 |
+
</cgp_afterpay>
|
1953 |
+
|
1954 |
+
<cgp_bitcoin translate="label" module="cgp">
|
1955 |
+
<label>Bitcoin</label>
|
1956 |
+
<sort_order>390</sort_order>
|
1957 |
+
<show_in_default>1</show_in_default>
|
1958 |
+
<show_in_website>1</show_in_website>
|
1959 |
+
<show_in_store>1</show_in_store>
|
1960 |
+
<fields>
|
1961 |
+
<active translate="label">
|
1962 |
+
<label>Enabled</label>
|
1963 |
+
<frontend_type>select</frontend_type>
|
1964 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
1965 |
+
<sort_order>1</sort_order>
|
1966 |
+
<show_in_default>1</show_in_default>
|
1967 |
+
<show_in_website>1</show_in_website>
|
1968 |
+
<show_in_store>1</show_in_store>
|
1969 |
+
</active>
|
1970 |
+
<title translate="label">
|
1971 |
+
<label>Title</label>
|
1972 |
+
<frontend_type>text</frontend_type>
|
1973 |
+
<sort_order>10</sort_order>
|
1974 |
+
<show_in_default>1</show_in_default>
|
1975 |
+
<show_in_website>1</show_in_website>
|
1976 |
+
<show_in_store>1</show_in_store>
|
1977 |
+
</title>
|
1978 |
+
<allowspecific translate="label">
|
1979 |
+
<label>Payment from applicable countries</label>
|
1980 |
+
<frontend_type>allowspecific</frontend_type>
|
1981 |
+
<sort_order>20</sort_order>
|
1982 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
1983 |
+
<show_in_default>1</show_in_default>
|
1984 |
+
<show_in_website>1</show_in_website>
|
1985 |
+
<show_in_store>1</show_in_store>
|
1986 |
+
</allowspecific>
|
1987 |
+
<specificcountry translate="label">
|
1988 |
+
<label>Payment from Specific countries</label>
|
1989 |
+
<frontend_type>multiselect</frontend_type>
|
1990 |
+
<sort_order>30</sort_order>
|
1991 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
1992 |
+
<show_in_default>1</show_in_default>
|
1993 |
+
<show_in_website>1</show_in_website>
|
1994 |
+
<show_in_store>1</show_in_store>
|
1995 |
+
</specificcountry>
|
1996 |
+
<sort_order translate="label">
|
1997 |
+
<label>Sort order</label>
|
1998 |
+
<frontend_type>text</frontend_type>
|
1999 |
+
<sort_order>100</sort_order>
|
2000 |
+
<show_in_default>1</show_in_default>
|
2001 |
+
<show_in_website>1</show_in_website>
|
2002 |
+
<show_in_store>1</show_in_store>
|
2003 |
+
</sort_order>
|
2004 |
+
<payment_fee translate="label">
|
2005 |
<label>Payment fee</label>
|
2006 |
<sort_order>110</sort_order>
|
2007 |
<show_in_default>1</show_in_default>
|
2038 |
<comment>Short description which is shown on orders/invoices</comment>
|
2039 |
</payment_fee_label>
|
2040 |
</fields>
|
2041 |
+
</cgp_bitcoin>
|
2042 |
|
2043 |
</groups>
|
2044 |
</cgp>
|
app/locale/nl_NL/Cardgate_Cgp.csv
CHANGED
@@ -42,6 +42,8 @@
|
|
42 |
"Selected currency code ","Geselecteerde valuta code "
|
43 |
" is not compatible with Card Gate Plus"," wordt niet ondersteund door Card Gate Plus"
|
44 |
"Transaction started, waiting for payment.","Transactie gestart, wacht op betaling"
|
|
|
|
|
45 |
"--Please select--","--Maak uw keuze--"
|
46 |
"------ Additional Banks ------","----- Overige Banken -----"
|
47 |
"Select your bank","Selecteer uw bank"
|
@@ -79,8 +81,6 @@
|
|
79 |
"Yes = fee entered including tax / No = fee entered excluding tax","Ja = opgegeven tarief is incl BTW / Nee = opgegeven tarief is excl BTW"
|
80 |
"Payment fee label","Betaaltoeslag beschrijving"
|
81 |
"Short description which is shown on orders/invoices","Korte omschrijving welke zichtbaar is op orders/facturen"
|
82 |
-
|
83 |
-
|
84 |
"Send Order Email only at payment","Verstuur bestelling Email pas bij betaling"
|
85 |
"Send Order Email only after payment completion.","Verstuur de bestelling Email pas als de betaling afgerond is."
|
86 |
"Instructions","Instructies"
|
@@ -89,4 +89,8 @@
|
|
89 |
"Payment canceled by user.","Betaling geannuleerd door gebruiker."
|
90 |
"Transaction pending: Waiting for customer action.", "Betaling pending: Wacht op actie van klant."
|
91 |
"Transaction pending: Waiting for confirmation.","Betaling pending: Wacht op bevestiging."
|
92 |
-
|
|
|
|
|
|
|
|
42 |
"Selected currency code ","Geselecteerde valuta code "
|
43 |
" is not compatible with Card Gate Plus"," wordt niet ondersteund door Card Gate Plus"
|
44 |
"Transaction started, waiting for payment.","Transactie gestart, wacht op betaling"
|
45 |
+
"Paymentmethod used","Gebruikte betaalmethode"
|
46 |
+
"Additional information","Extra informatie"
|
47 |
"--Please select--","--Maak uw keuze--"
|
48 |
"------ Additional Banks ------","----- Overige Banken -----"
|
49 |
"Select your bank","Selecteer uw bank"
|
81 |
"Yes = fee entered including tax / No = fee entered excluding tax","Ja = opgegeven tarief is incl BTW / Nee = opgegeven tarief is excl BTW"
|
82 |
"Payment fee label","Betaaltoeslag beschrijving"
|
83 |
"Short description which is shown on orders/invoices","Korte omschrijving welke zichtbaar is op orders/facturen"
|
|
|
|
|
84 |
"Send Order Email only at payment","Verstuur bestelling Email pas bij betaling"
|
85 |
"Send Order Email only after payment completion.","Verstuur de bestelling Email pas als de betaling afgerond is."
|
86 |
"Instructions","Instructies"
|
89 |
"Payment canceled by user.","Betaling geannuleerd door gebruiker."
|
90 |
"Transaction pending: Waiting for customer action.", "Betaling pending: Wacht op actie van klant."
|
91 |
"Transaction pending: Waiting for confirmation.","Betaling pending: Wacht op bevestiging."
|
92 |
+
"Version","Versie"
|
93 |
+
"Benificiary","Begunstidge"
|
94 |
+
"Benificiary IBAN","Begunstidge IBAN"
|
95 |
+
"Benificiary BIC","Begunstidge BIC"
|
96 |
+
"Reference","Referentie"
|
package.xml
CHANGED
@@ -1,19 +1,24 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Cardgate_Cgp</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Card Gate Payment Module</summary>
|
10 |
<description>Card Gate is a Payment Service Provider from the Netherlands. We offer various payment methods against competitive rates.</description>
|
11 |
-
<notes>- Added
|
12 |
-
-
|
|
|
|
|
|
|
|
|
|
|
13 |
<authors><author><name>Cardgate BV</name><user>cardgateplus</user><email>support@cardgate.com</email></author></authors>
|
14 |
-
<date>
|
15 |
-
<time>
|
16 |
-
<contents><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><file name="cardgate_cgp.css" hash="bebfc13fca1b36867c17864ae70fdabd"/><dir name="images"><dir name="cardgate"><file name="cardgate_cgp.png" hash="b97b15baba0b27042733c8ea4b4fb6bc"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="nl_NL"><file name="Cardgate_Cgp.csv" hash="
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.4.0</min><max>6.0.0</max></php></required></dependencies>
|
19 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Cardgate_Cgp</name>
|
4 |
+
<version>1.1.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Card Gate Payment Module</summary>
|
10 |
<description>Card Gate is a Payment Service Provider from the Netherlands. We offer various payment methods against competitive rates.</description>
|
11 |
+
<notes>- Added Afterpay paymentmethod
|
12 |
+
- Added Bitcoin paymentmethod
|
13 |
+
- Changed gateway URL to Curopayments
|
14 |
+
- Changed Live/Test mode to use Curopayments staging environment
|
15 |
+
- Changed carditems property for use with all paymentmethods
|
16 |
+
- Fixed carditems property so VAT will be correct when discount is given
|
17 |
+
- Added Version configuration-panel</notes>
|
18 |
<authors><author><name>Cardgate BV</name><user>cardgateplus</user><email>support@cardgate.com</email></author></authors>
|
19 |
+
<date>2016-02-10</date>
|
20 |
+
<time>13:56:18</time>
|
21 |
+
<contents><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><file name="cardgate_cgp.css" hash="bebfc13fca1b36867c17864ae70fdabd"/><dir name="images"><dir name="cardgate"><file name="cardgate_cgp.png" hash="b97b15baba0b27042733c8ea4b4fb6bc"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="nl_NL"><file name="Cardgate_Cgp.csv" hash="51e395dce79d3c6f8c908a12091a5085"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="ZzCardgate_Cgp.xml" hash="c7a72af045f4b737b50cc6c360d4300d"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="cardgate"><dir name="cgp"><dir name="checkout"><file name="fee.phtml" hash="79362bab3963195ad6727d077fe87b11"/></dir><dir name="form"><file name="banktransfer.phtml" hash="ff7a2a827a7b7a5ed9bcb5d484c30c68"/><file name="ideal.phtml" hash="42fdfee86ba3a098f5f73e9240332581"/><file name="klarna.phtml" hash="e2876171abf8e94d7b77a47ce9279561"/><file name="klarnaaccount.phtml" hash="419f88941703c8562369844bb6a1d692"/></dir><file name="redirect.phtml" hash="ecb2b0a854cd6358adeba535f8889046"/></dir></dir></dir></dir></dir></dir></target><target name="magelocal"><dir name="Cardgate"><dir name="Cgp"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Version.php" hash="73d6f00aa532e14d021c6a142ba549fd"/></dir></dir></dir></dir><dir name="Form"><file name="Banktransfer.php" hash="be49e1b58910ee33b329badaa9fc85ce"/><file name="Ideal.php" hash="868520be00ae55a3f4958a48f0d152cc"/><file name="Klarna.php" hash="c66cbcc135151dcc4337d22fc0552a46"/><file name="Klarnaaccount.php" hash="77e35328922bfb232f93896b77367c1e"/></dir><dir name="Paymentfee"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="Totals.php" hash="7f4fb8293923e064ecbd77451c52afd9"/></dir></dir></dir><dir name="Checkout"><file name="Fee.php" hash="07e72679dc8ddd5f7e2db9e24bb76aa6"/></dir><dir name="Creditmemo"><file name="Totals.php" hash="87021e3b682c1abf1ae95e173730023a"/></dir><dir name="Invoice"><dir name="Totals"><file name="Fee.php" hash="40c399761dccfd494d7cfb439447c5e3"/></dir></dir><dir name="Order"><dir name="Totals"><file name="Fee.php" hash="0cde857c2b7f33cdb5927143a98f0958"/></dir></dir></dir><file name="Redirect.php" hash="2f854d58133eebad7f128a08d799f7ef"/></dir><dir name="Helper"><file name="Data.php" hash="ed47b3c61a5e701e1683a7717c6b8ef1"/><file name="Paymentfee.php" hash="6ae85c5606efc68ecd188c3513826f3a"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Languages.php" hash="fb24871559fa1ce2613438ad5613a196"/><file name="Modes.php" hash="678a822a7f0c0665fc696c44937825be"/><file name="Orderstatus.php" hash="610ca9cedb01e329d821f4e407e5bfc8"/><file name="Version.php" hash="818a7ae5f4126fbb0c8fc76376e03c65"/></dir></dir></dir></dir><file name="Base.php" hash="9787365a4ce8be6e7742ece7d437bac3"/><dir name="Gateway"><file name="Abstract.php" hash="2044da519f4ef12fdb7c73d1d4b9d50a"/><file name="Afterpay.php" hash="054b525c972119fd330291776c2550ac"/><file name="Americanexpress.php" hash="705926d7a69fb889f54185743f4cac9f"/><file name="Banktransfer.php" hash="d4d5712ab327c418ee2d949e49faee01"/><file name="Bitcoin.php" hash="001420be0c8d665d905bcc79275e989e"/><file name="Cartebancaire.php" hash="451bff78fa26e4bae883d0c18ca1f844"/><file name="Cartebleue.php" hash="b7974f8f8e655daaf50a899d15cc15fd"/><file name="Default.php" hash="dd934ee60d32000773f26be805d46925"/><file name="Directdebit.php" hash="7890209183bab5f47edcca60a19cd007"/><file name="Giropay.php" hash="ea35629ddfd08cd341128af6d95c8911"/><file name="Ideal.php" hash="1b5b6318c3e544659f465fdbc463fa51"/><file name="Klarna.php" hash="901891d606ea469296e75251fc7abe14"/><file name="Klarnaaccount.php" hash="4d85440b0df2df05ec001c6a5d7416dd"/><file name="Maestro.php" hash="c29f0bd00282c992017a2487d12d8bda"/><file name="Mastercard.php" hash="3febe4f0ee3cc630cd959e8ce086d2ee"/><file name="Mistercash.php" hash="d618b6ab14ffa5d9810cf65232b6d2a3"/><file name="Paypal.php" hash="ad4600fdc877a84a6a4f8647ae2587df"/><file name="Przelewy24.php" hash="f49bfa8354fa2bce2add3221a04843cf"/><file name="Sofortbanking.php" hash="544531b74c8fd34e7ccd48a32210d81f"/><file name="Visa.php" hash="50cbf582c2b5192923d290fcbec35870"/><file name="Vpay.php" hash="acf7d286f343b4e663a55a8540bf45d2"/><file name="Webmoney.php" hash="72a36f0854db4c02e0477208b47faccf"/></dir><file name="Observer.php" hash="72363edbe183cfa833e276f0e3cda200"/><dir name="Paymentfee"><dir name="Creditmemo"><file name="Total.php" hash="5191056c5dae3862c2a468acd3e5cbac"/></dir><dir name="Invoice"><dir name="Pdf"><file name="Total.php" hash="314df1d94874fcb856af2e0be4019782"/></dir><file name="Tax.php" hash="dc485fa37d31e13e20f578cb58075486"/><file name="Total.php" hash="f26e4dc51d0e510eb1c2c65750dec92b"/></dir><dir name="Quote"><file name="Quote.php" hash="d09d4d5c4b55770b0a50f80f0a5fa643"/><file name="TaxTotal.php" hash="a1f53b6ed1988364aa396b3bd7afa1e0"/><file name="Total.php" hash="95febaa23124a4732b0855b04318e245"/></dir></dir></dir><dir name="controllers"><file name="StandardController.php" hash="793d913a16fc5a6ad56f6c4f306af793"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f14dc99c26f44cc53b4a5974dd9cdd2d"/><file name="config.xml" hash="ac888a9243e56d0653bd698513eda4a5"/><file name="system.xml" hash="62a60d9877b6fdd4338a7a23c5016bab"/></dir></dir></dir></target></contents>
|
22 |
<compatible/>
|
23 |
<dependencies><required><php><min>5.4.0</min><max>6.0.0</max></php></required></dependencies>
|
24 |
</package>
|