Changeset 2795745
- Timestamp:
- 10/07/2022 04:41:25 PM (3 years ago)
- Location:
- girocheckout/trunk
- Files:
-
- 1 added
- 49 edited
-
girocheckout.php (modified) (1 diff)
-
img/gc_ideal.png (added)
-
library/GiroCheckout_SDK.php (modified) (1 diff)
-
library/GiroCheckout_SDK_Notify.php (modified) (1 diff)
-
library/GiroCheckout_SDK_Request.php (modified) (1 diff)
-
library/GiroCheckout_SDK_Tools.php (modified) (1 diff)
-
library/GiroCheckout_Utility.php (modified) (1 diff)
-
library/api/GiroCheckout_SDK_AbstractApi.php (modified) (3 diffs)
-
library/api/GiroCheckout_SDK_InterfaceApi.php (modified) (1 diff)
-
library/api/bluecode/GiroCheckout_SDK_BlueCodeRefund.php (modified) (2 diffs)
-
library/api/bluecode/GiroCheckout_SDK_BlueCodeTransaction.php (modified) (1 diff)
-
library/api/creditcard/GiroCheckout_SDK_CreditCardCapture.php (modified) (2 diffs)
-
library/api/creditcard/GiroCheckout_SDK_CreditCardInitform.php (modified) (1 diff)
-
library/api/creditcard/GiroCheckout_SDK_CreditCardRecurringTransaction.php (modified) (2 diffs)
-
library/api/creditcard/GiroCheckout_SDK_CreditCardRefund.php (modified) (1 diff)
-
library/api/creditcard/GiroCheckout_SDK_CreditCardTransaction.php (modified) (1 diff)
-
library/api/creditcard/GiroCheckout_SDK_CreditCardVoid.php (modified) (1 diff)
-
library/api/directdebit/GiroCheckout_SDK_DirectDebitCapture.php (modified) (2 diffs)
-
library/api/directdebit/GiroCheckout_SDK_DirectDebitRefund.php (modified) (1 diff)
-
library/api/directdebit/GiroCheckout_SDK_DirectDebitTransaction.php (modified) (2 diffs)
-
library/api/directdebit/GiroCheckout_SDK_DirectDebitTransactionWithPaymentPage.php (modified) (2 diffs)
-
library/api/directdebit/GiroCheckout_SDK_DirectDebitVoid.php (modified) (1 diff)
-
library/api/eps/GiroCheckout_SDK_EpsTransaction.php (modified) (1 diff)
-
library/api/giropay/GiroCheckout_SDK_GiropayBankstatus.php (modified) (1 diff)
-
library/api/giropay/GiroCheckout_SDK_GiropayIDCheck.php (modified) (1 diff)
-
library/api/giropay/GiroCheckout_SDK_GiropayTransaction.php (modified) (3 diffs)
-
library/api/giropay/GiroCheckout_SDK_GiropayTransactionWithGiropayID.php (modified) (1 diff)
-
library/api/ideal/GiroCheckout_SDK_IdealIssuerList.php (modified) (1 diff)
-
library/api/ideal/GiroCheckout_SDK_IdealPayment.php (modified) (2 diffs)
-
library/api/ideal/GiroCheckout_SDK_IdealPaymentRefund.php (modified) (1 diff)
-
library/api/maestro/GiroCheckout_SDK_MaestroCapture.php (modified) (2 diffs)
-
library/api/maestro/GiroCheckout_SDK_MaestroRefund.php (modified) (1 diff)
-
library/api/maestro/GiroCheckout_SDK_MaestroTransaction.php (modified) (1 diff)
-
library/api/paydirekt/GiroCheckout_SDK_PaydirektCapture.php (modified) (2 diffs)
-
library/api/paydirekt/GiroCheckout_SDK_PaydirektRefund.php (modified) (1 diff)
-
library/api/paydirekt/GiroCheckout_SDK_PaydirektTransaction.php (modified) (1 diff)
-
library/api/paydirekt/GiroCheckout_SDK_PaydirektVoid.php (modified) (1 diff)
-
library/api/paypage/GiroCheckout_SDK_PaypageDonationcert.php (modified) (1 diff)
-
library/api/paypage/GiroCheckout_SDK_PaypageProjects.php (modified) (1 diff)
-
library/api/paypage/GiroCheckout_SDK_PaypageTransaction.php (modified) (2 diffs)
-
library/api/paypal/GiroCheckout_SDK_PaypalTransaction.php (modified) (2 diffs)
-
library/api/sofortuw/GiroCheckout_SDK_SofortUwTransaction.php (modified) (1 diff)
-
library/api/tools/GiroCheckout_SDK_Tools_GetTransaction.php (modified) (2 diffs)
-
library/helper/GiroCheckout_SDK_Curl_helper.php (modified) (1 diff)
-
library/helper/GiroCheckout_SDK_Hash_helper.php (modified) (1 diff)
-
library/helper/GiroCheckout_SDK_ResponseCode_helper.php (modified) (3 diffs)
-
library/helper/GiroCheckout_SDK_TransactionType_helper.php (modified) (11 diffs)
-
payments/gc_giropay.php (modified) (21 diffs)
-
payments/gc_ideal.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
girocheckout/trunk/girocheckout.php
r2699192 r2795745 10 10 * Plugin Name: GiroCheckout 11 11 * Description: Plugin to integrate the GiroCheckout payment methods into WooCommerce. 12 * Version: 4.1. 512 * Version: 4.1.7 13 13 * Author: S-Public Services GmbH 14 14 * Author URI: https://s-publicservices.de -
girocheckout/trunk/library/GiroCheckout_SDK.php
r2457199 r2795745 7 7 * 8 8 * @package GiroCheckout 9 * @version $Revision : 321 $ / $Date: 2020-12-11 14:09:33 -0300 (Fri, 11 Dec 2020)$9 * @version $Revision$ / $Date$ 10 10 */ 11 define('__GIROCHECKOUT_SDK_VERSION__', '2.3. 1.4');11 define('__GIROCHECKOUT_SDK_VERSION__', '2.3.8'); 12 12 13 13 if( version_compare( phpversion(), '5.3.0', '<' ) ) { -
girocheckout/trunk/library/GiroCheckout_SDK_Notify.php
r2082698 r2795745 13 13 * 14 14 * @package GiroCheckout 15 * @version $Revision : 253 $ / $Date: 2019-02-20 17:41:56 -0300 (Wed, 20 Feb 2019)$15 * @version $Revision$ / $Date$ 16 16 */ 17 17 -
girocheckout/trunk/library/GiroCheckout_SDK_Request.php
r2457199 r2795745 10 10 * 11 11 * @package GiroCheckout 12 * @version $Revision : 320 $ / $Date: 2020-11-24 12:58:51 -0300 (Tue, 24 Nov 2020)$12 * @version $Revision$ / $Date$ 13 13 */ 14 14 class GiroCheckout_SDK_Request -
girocheckout/trunk/library/GiroCheckout_SDK_Tools.php
r2457199 r2795745 83 83 return "Logo_paypal_{$p_iSize}_px.png"; 84 84 case GiroCheckout_SDK_Config::FTG_SERVICES_PAYMENT_METHOD_PAYDIREKT: 85 return "Logo_paydirekt_{$p_iSize}_px. jpg";85 return "Logo_paydirekt_{$p_iSize}_px.png"; 86 86 case GiroCheckout_SDK_Config::FTG_SERVICES_PAYMENT_METHOD_BLUECODE: 87 87 return "Logo_bluecode_{$p_iSize}_px.png"; -
girocheckout/trunk/library/GiroCheckout_Utility.php
r2699192 r2795745 19 19 */ 20 20 public static function getVersion() { 21 return '4.1. 5';21 return '4.1.7'; 22 22 } 23 23 -
girocheckout/trunk/library/api/GiroCheckout_SDK_AbstractApi.php
r2457199 r2795745 6 6 * 7 7 * @package GiroCheckout 8 * @version $Revision : 318 $ / $Date: 2020-11-18 19:18:48 -0300 (Wed, 18 Nov 2020)$8 * @version $Revision$ / $Date$ 9 9 */ 10 10 class GiroCheckout_SDK_AbstractApi implements GiroCheckout_SDK_InterfaceApi … … 76 76 $submitParams[$k] = $params[$k]; 77 77 } 78 elseif ((!isset($params[$k]) || strlen($params[$k]) == 0) && $mandatory ) {78 elseif ((!isset($params[$k]) || strlen($params[$k]) == 0) && $mandatory === TRUE) { 79 79 throw new Exception('mandatory field ' . $k . ' is unset or empty'); 80 80 } … … 287 287 return "Logo_paypal_{$p_iSize}_px.png"; 288 288 case GiroCheckout_SDK_Config::FTG_SERVICES_PAYMENT_METHOD_PAYDIREKT: 289 return "Logo_paydirekt_{$p_iSize}_px. jpg";289 return "Logo_paydirekt_{$p_iSize}_px.png"; 290 290 case GiroCheckout_SDK_Config::FTG_SERVICES_PAYMENT_METHOD_BLUECODE: 291 291 return "Logo_bluecode_{$p_iSize}_px.png"; -
girocheckout/trunk/library/api/GiroCheckout_SDK_InterfaceApi.php
r1801157 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 174 $ / $Date: 2016-11-09 16:44:31 -0300 (Wed, 09 Nov 2016)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 -
girocheckout/trunk/library/api/bluecode/GiroCheckout_SDK_BlueCodeRefund.php
r2346265 r2795745 20 20 'projectId' => TRUE, 21 21 'merchantTxId' => TRUE, 22 'amount' => FALSE,23 'currency' => FALSE,22 'amount' => TRUE, 23 'currency' => TRUE, 24 24 'purpose' => FALSE, 25 25 'reference' => TRUE, … … 32 32 'rc'=> TRUE, 33 33 'msg' => TRUE, 34 'reference' => TRUE34 'reference' => FALSE 35 35 ); 36 36 -
girocheckout/trunk/library/api/bluecode/GiroCheckout_SDK_BlueCodeTransaction.php
r2346265 r2795745 25 25 'urlRedirect' => TRUE, 26 26 'urlNotify' => TRUE, 27 'kassenzeichen' => FALSE, 27 28 'pptoken' => FALSE, 28 29 ); -
girocheckout/trunk/library/api/creditcard/GiroCheckout_SDK_CreditCardCapture.php
r2346265 r2795745 21 21 'amount' => TRUE, 22 22 'currency' => TRUE, 23 'purpose' => FALSE, 23 24 'reference' => TRUE, 25 'kassenzeichen' => FALSE, 24 26 ); 25 27 … … 30 32 'rc'=> TRUE, 31 33 'msg' => TRUE, 32 'reference' => TRUE,33 'referenceParent' => TRUE,34 'merchantTxId' => TRUE,35 'backendTxId' => TRUE,36 'amount' => TRUE,37 'currency' => TRUE,38 'resultPayment' => TRUE,34 'reference' => FALSE, 35 'referenceParent' => FALSE, 36 'merchantTxId' => FALSE, 37 'backendTxId' => FALSE, 38 'amount' => FALSE, 39 'currency' => FALSE, 40 'resultPayment' => FALSE, 39 41 ); 40 42 -
girocheckout/trunk/library/api/creditcard/GiroCheckout_SDK_CreditCardInitform.php
r2457199 r2795745 33 33 'tds2Country' => FALSE, 34 34 'tds2Optional' => FALSE, 35 'kassenzeichen' => FALSE, 35 36 'pptoken' => FALSE, 36 37 ); -
girocheckout/trunk/library/api/creditcard/GiroCheckout_SDK_CreditCardRecurringTransaction.php
r2346265 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 274 $ / $Date: 2019-09-06 14:04:44 -0400 (Fri, 06 Sep 2019)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 … … 26 26 'recurring' => TRUE, 27 27 'urlNotify' => FALSE, 28 'kassenzeichen' => FALSE, 28 29 ); 29 30 -
girocheckout/trunk/library/api/creditcard/GiroCheckout_SDK_CreditCardRefund.php
r2346265 r2795745 31 31 'rc'=> TRUE, 32 32 'msg' => TRUE, 33 'reference' => TRUE,33 'reference' => FALSE, 34 34 'referenceParent' => FALSE, 35 'merchantTxId' => TRUE,36 'backendTxId' => TRUE,37 'amount' => TRUE,38 'currency' => TRUE,39 'resultPayment' => TRUE,35 'merchantTxId' => FALSE, 36 'backendTxId' => FALSE, 37 'amount' => FALSE, 38 'currency' => FALSE, 39 'resultPayment' => FALSE, 40 40 ); 41 41 -
girocheckout/trunk/library/api/creditcard/GiroCheckout_SDK_CreditCardTransaction.php
r2457199 r2795745 35 35 'tds2Country' => FALSE, 36 36 'tds2Optional' => FALSE, 37 'kassenzeichen' => FALSE, 37 38 'pptoken' => FALSE, 38 39 ); -
girocheckout/trunk/library/api/creditcard/GiroCheckout_SDK_CreditCardVoid.php
r2346265 r2795745 28 28 'rc'=> TRUE, 29 29 'msg' => TRUE, 30 'reference' => TRUE,30 'reference' => FALSE, 31 31 'referenceParent' => FALSE, 32 'merchantTxId' => TRUE,33 'backendTxId' => TRUE,34 'amount' => TRUE,35 'currency' => TRUE,36 'resultPayment' => TRUE,32 'merchantTxId' => FALSE, 33 'backendTxId' => FALSE, 34 'amount' => FALSE, 35 'currency' => FALSE, 36 'resultPayment' => FALSE, 37 37 ); 38 38 -
girocheckout/trunk/library/api/directdebit/GiroCheckout_SDK_DirectDebitCapture.php
r2346265 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 274 $ / $Date: 2019-09-06 14:04:44 -0400 (Fri, 06 Sep 2019)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 … … 22 22 'amount' => TRUE, 23 23 'currency' => TRUE, 24 'reference' => TRUE 24 'reference' => TRUE, 25 'kassenzeichen' => FALSE, 25 26 ); 26 27 -
girocheckout/trunk/library/api/directdebit/GiroCheckout_SDK_DirectDebitRefund.php
r2346265 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 274 $ / $Date: 2019-09-06 14:04:44 -0400 (Fri, 06 Sep 2019)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 -
girocheckout/trunk/library/api/directdebit/GiroCheckout_SDK_DirectDebitTransaction.php
r2457199 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 303 $ / $Date: 2020-04-02 14:13:33 -0300 (Thu, 02 Apr 2020)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 … … 35 35 'urlRedirect' => FALSE, 36 36 'urlNotify' => FALSE, 37 'kassenzeichen' => FALSE, 37 38 'pptoken' => FALSE, 39 // optional fields for donation certificate: 40 'company' => FALSE, 41 'lastname' => FALSE, 42 'firstname' => FALSE, 43 'address' => FALSE, 44 'zip' => FALSE, 45 'city' => FALSE, 46 'country' => FALSE, 47 'email' => FALSE, 38 48 ); 39 49 -
girocheckout/trunk/library/api/directdebit/GiroCheckout_SDK_DirectDebitTransactionWithPaymentPage.php
r2346265 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 274 $ / $Date: 2019-09-06 14:04:44 -0400 (Fri, 06 Sep 2019)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 … … 33 33 'urlRedirect' => TRUE, 34 34 'urlNotify' => TRUE, 35 'kassenzeichen' => FALSE, 35 36 'pptoken' => FALSE, 36 37 ); -
girocheckout/trunk/library/api/directdebit/GiroCheckout_SDK_DirectDebitVoid.php
r2346265 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 274 $ / $Date: 2019-09-06 14:04:44 -0400 (Fri, 06 Sep 2019)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 -
girocheckout/trunk/library/api/eps/GiroCheckout_SDK_EpsTransaction.php
r2346265 r2795745 26 26 'urlRedirect' => TRUE, 27 27 'urlNotify' => TRUE, 28 'kassenzeichen' => FALSE, 28 29 'pptoken' => FALSE, 29 30 ); -
girocheckout/trunk/library/api/giropay/GiroCheckout_SDK_GiropayBankstatus.php
r2346265 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 274 $ / $Date: 2019-09-06 14:04:44 -0400 (Fri, 06 Sep 2019)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 -
girocheckout/trunk/library/api/giropay/GiroCheckout_SDK_GiropayIDCheck.php
r2457199 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 315 $ / $Date: 2020-11-10 01:20:46 -0300 (Tue, 10 Nov 2020)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 -
girocheckout/trunk/library/api/giropay/GiroCheckout_SDK_GiropayTransaction.php
r2346265 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 274 $ / $Date: 2019-09-06 14:04:44 -0400 (Fri, 06 Sep 2019)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 … … 24 24 'currency' => TRUE, 25 25 'purpose' => TRUE, 26 'shoppingCartType' => FALSE, 27 'shippingAddresseFirstName' => FALSE, // nur bei PHYSICAL, MIXED und DIGITAL Pflicht 28 'shippingAddresseLastName' => FALSE, // nur bei PHYSICAL, MIXED und DIGITAL Pflicht 29 'shippingCompany' => FALSE, 30 'shippingAdditionalAddressInformation' => FALSE, 31 'shippingStreet' => FALSE, 32 'shippingStreetNumber' => FALSE, 33 'shippingZipCode' => FALSE, // nur bei PHYSICAL und MIXED Pflicht 34 'shippingCity' => FALSE, // nur bei PHYSICAL und MIXED Pflicht 35 'shippingCountry' => FALSE, // nur bei PHYSICAL und MIXED Pflicht 36 'shippingEmail' => FALSE, // nur bei DIGITAL Pflicht 37 'merchantReconciliationReferenceNumber'=> FALSE, 38 'cart' => FALSE, 39 'deliveryType' => FALSE, 26 40 'bic' => FALSE, 27 41 'iban' => FALSE, … … 38 52 'urlRedirect' => TRUE, 39 53 'urlNotify' => TRUE, 54 'kassenzeichen' => FALSE, 40 55 'pptoken' => FALSE, 41 56 ); -
girocheckout/trunk/library/api/giropay/GiroCheckout_SDK_GiropayTransactionWithGiropayID.php
r2346265 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 274 $ / $Date: 2019-09-06 14:04:44 -0400 (Fri, 06 Sep 2019)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 -
girocheckout/trunk/library/api/ideal/GiroCheckout_SDK_IdealIssuerList.php
r2346265 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 274 $ / $Date: 2019-09-06 14:04:44 -0400 (Fri, 06 Sep 2019)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 class GiroCheckout_SDK_IdealIssuerList extends GiroCheckout_SDK_AbstractApi{ -
girocheckout/trunk/library/api/ideal/GiroCheckout_SDK_IdealPayment.php
r2346265 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 274 $ / $Date: 2019-09-06 14:04:44 -0400 (Fri, 06 Sep 2019)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 class GiroCheckout_SDK_IdealPayment extends GiroCheckout_SDK_AbstractApi{ … … 24 24 'urlRedirect' => TRUE, 25 25 'urlNotify' => TRUE, 26 'kassenzeichen' => FALSE, 26 27 'pptoken' => FALSE, 27 28 ); -
girocheckout/trunk/library/api/ideal/GiroCheckout_SDK_IdealPaymentRefund.php
r2346265 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 274 $ / $Date: 2019-09-06 14:04:44 -0400 (Fri, 06 Sep 2019)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 class GiroCheckout_SDK_IdealPaymentRefund extends GiroCheckout_SDK_AbstractApi{ -
girocheckout/trunk/library/api/maestro/GiroCheckout_SDK_MaestroCapture.php
r2346265 r2795745 22 22 'currency' => TRUE, 23 23 'reference' => TRUE, 24 'kassenzeichen' => FALSE, 24 25 ); 25 26 … … 30 31 'rc'=> TRUE, 31 32 'msg' => TRUE, 32 'reference' => TRUE,33 'referenceParent' => TRUE,34 'merchantTxId' => TRUE,35 'backendTxId' => TRUE,36 'amount' => TRUE,37 'currency' => TRUE,38 'resultPayment' => TRUE,33 'reference' => FALSE, 34 'referenceParent' => FALSE, 35 'merchantTxId' => FALSE, 36 'backendTxId' => FALSE, 37 'amount' => FALSE, 38 'currency' => FALSE, 39 'resultPayment' => FALSE, 39 40 ); 40 41 -
girocheckout/trunk/library/api/maestro/GiroCheckout_SDK_MaestroRefund.php
r2346265 r2795745 31 31 'rc'=> TRUE, 32 32 'msg' => TRUE, 33 'reference' => TRUE,33 'reference' => FALSE, 34 34 'referenceParent' => FALSE, 35 'merchantTxId' => TRUE,36 'backendTxId' => TRUE,37 'amount' => TRUE,38 'currency' => TRUE,39 'resultPayment' => TRUE,35 'merchantTxId' => FALSE, 36 'backendTxId' => FALSE, 37 'amount' => FALSE, 38 'currency' => FALSE, 39 'resultPayment' => FALSE, 40 40 ); 41 41 -
girocheckout/trunk/library/api/maestro/GiroCheckout_SDK_MaestroTransaction.php
r2346265 r2795745 29 29 'urlRedirect' => TRUE, 30 30 'urlNotify' => TRUE, 31 'kassenzeichen' => FALSE, 31 32 'pptoken' => FALSE, 32 33 ); -
girocheckout/trunk/library/api/paydirekt/GiroCheckout_SDK_PaydirektCapture.php
r2346265 r2795745 25 25 'reference' => TRUE, 26 26 'merchantReconciliationReferenceNumber' => FALSE, 27 'final' => FALSE 27 'final' => FALSE, 28 'kassenzeichen' => FALSE, 28 29 ); 29 30 … … 34 35 'rc'=> TRUE, 35 36 'msg' => TRUE, 36 'reference' => TRUE37 'reference' => FALSE 37 38 ); 38 39 -
girocheckout/trunk/library/api/paydirekt/GiroCheckout_SDK_PaydirektRefund.php
r2346265 r2795745 33 33 'rc'=> TRUE, 34 34 'msg' => TRUE, 35 'reference' => TRUE35 'reference' => FALSE 36 36 ); 37 37 -
girocheckout/trunk/library/api/paydirekt/GiroCheckout_SDK_PaydirektTransaction.php
r2346265 r2795745 48 48 'urlRedirect' => TRUE, 49 49 'urlNotify' => TRUE, 50 'kassenzeichen' => FALSE, 50 51 'pptoken' => FALSE, 51 52 ); -
girocheckout/trunk/library/api/paydirekt/GiroCheckout_SDK_PaydirektVoid.php
r2346265 r2795745 29 29 'rc'=> TRUE, 30 30 'msg' => TRUE, 31 'reference' => TRUE31 'reference' => FALSE 32 32 ); 33 33 -
girocheckout/trunk/library/api/paypage/GiroCheckout_SDK_PaypageDonationcert.php
r2457199 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 274 $ / $Date: 2019-09-06 14:04:44 -0400 (Fri, 06 Sep 2019)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 class GiroCheckout_SDK_PaypageDonationcert extends GiroCheckout_SDK_AbstractApi implements GiroCheckout_SDK_InterfaceApi { -
girocheckout/trunk/library/api/paypage/GiroCheckout_SDK_PaypageProjects.php
r2346265 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 274 $ / $Date: 2019-09-06 14:04:44 -0400 (Fri, 06 Sep 2019)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 class GiroCheckout_SDK_PaypageProjects extends GiroCheckout_SDK_AbstractApi implements GiroCheckout_SDK_InterfaceApi { -
girocheckout/trunk/library/api/paypage/GiroCheckout_SDK_PaypageTransaction.php
r2457199 r2795745 43 43 'certdata' => FALSE, 44 44 'otherpayments' => FALSE, 45 'paydirektShoppingCartType' => FALSE, 45 46 'paydirektShippingFirstName' => FALSE, 46 47 'paydirektShippingLastName' => FALSE, 48 'paydirektShippingCompany' => FALSE, 49 'paydirektShippingAdditionalAddressInformation' => FALSE, 50 'paydirektShippingStreet' => FALSE, 51 'paydirektShippingStreetNumber' => FALSE, 47 52 'paydirektShippingZipCode' => FALSE, 48 53 'paydirektShippingCity' => FALSE, 49 54 'paydirektShippingCountry' => FALSE, 55 'paydirektShippingEmail' => FALSE, 56 'paydirektMerchantReconciliationReferenceNumber'=> FALSE, 57 'paydirektCart' => FALSE, 58 'paydirektDeliveryType' => FALSE, 50 59 'successUrl' => FALSE, 51 60 'backUrl' => FALSE, … … 57 66 'tds2Country' => FALSE, 58 67 'tds2Optional' => FALSE, 68 'mandateReference' => FALSE, 69 'mandateSignedOn' => FALSE, 70 'mandateReceiverName' => FALSE, 71 'mandateSequence' => FALSE, 72 'informationText' => FALSE, 73 'kassenzeichen' => FALSE, 74 'giropayAllowMissingFields' => FALSE, 59 75 ); 60 76 -
girocheckout/trunk/library/api/paypal/GiroCheckout_SDK_PaypalTransaction.php
r2346265 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 274 $ / $Date: 2019-09-06 14:04:44 -0400 (Fri, 06 Sep 2019)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 class GiroCheckout_SDK_PaypalTransaction extends GiroCheckout_SDK_AbstractApi{ … … 15 15 * For further information use the API documentation. 16 16 */ 17 protected $paramFields = array( 'merchantId'=> TRUE, 18 'projectId' => TRUE, 19 'merchantTxId' => TRUE, 20 'amount' => TRUE, 21 'currency' => TRUE, 22 'purpose' => TRUE, 23 'urlRedirect' => TRUE, 24 'urlNotify' => TRUE, 25 'pptoken' => FALSE, 26 ); 17 protected $paramFields = array( 18 'merchantId'=> TRUE, 19 'projectId' => TRUE, 20 'merchantTxId' => TRUE, 21 'amount' => TRUE, 22 'currency' => TRUE, 23 'purpose' => TRUE, 24 'type' => 'SALE', 25 'urlRedirect' => TRUE, 26 'urlNotify' => TRUE, 27 'kassenzeichen' => FALSE, 28 'pptoken' => FALSE, 29 ); 27 30 28 31 /* -
girocheckout/trunk/library/api/sofortuw/GiroCheckout_SDK_SofortUwTransaction.php
r2346265 r2795745 25 25 'urlRedirect' => TRUE, 26 26 'urlNotify' => TRUE, 27 'kassenzeichen' => FALSE, 27 28 'pptoken' => FALSE, 28 29 ); -
girocheckout/trunk/library/api/tools/GiroCheckout_SDK_Tools_GetTransaction.php
r2346265 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 274 $ / $Date: 2019-09-06 14:04:44 -0400 (Fri, 06 Sep 2019)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 … … 20 20 'projectId' => TRUE, 21 21 'reference' => TRUE, 22 'txreference' => FALSE, 22 23 ); 23 24 -
girocheckout/trunk/library/helper/GiroCheckout_SDK_Curl_helper.php
r1801157 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 204 $ / $Date: 2017-04-11 11:23:52 -0300 (Tue, 11 Apr 2017)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 -
girocheckout/trunk/library/helper/GiroCheckout_SDK_Hash_helper.php
r2082698 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 69 $ / $Date: 2014-10-01 11:57:27 -0300 (Wed, 01 Oct 2014)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 -
girocheckout/trunk/library/helper/GiroCheckout_SDK_ResponseCode_helper.php
r2457199 r2795745 5 5 * 6 6 * @package GiroCheckout 7 * @version $Revision : 321 $ / $Date: 2020-12-11 14:09:33 -0300 (Fri, 11 Dec 2020)$7 * @version $Revision$ / $Date$ 8 8 */ 9 9 class GiroCheckout_SDK_ResponseCode_helper { … … 127 127 5111 => 'TDS20: Geben Sie bitte mindestens alle Felder außer Optional an', 128 128 5112 => 'TDS20: Sie müssen zu Optional auch die anderen Felder angeben', 129 5113 => 'Paypage: Ungültiges Format des Hinweistextes (API-Beschreibung beachten)', 130 5114 => 'Referenz muss Payment Page Transaktion sein', 129 131 5200 => 'Transaktion nicht akzeptiert', 130 132 5201 => 'giropay Bank offline', … … 263 265 5111 => 'TDS20: Please provide at least all fields except Optional', 264 266 5112 => 'TDS20: You must provide the other fields along with Optional', 267 5113 => 'Paypage: invalid format of the notification text (see API documentation)', 268 5114 => 'Reference must be payment page transaction', 265 269 5200 => 'not accepted transaction', 266 270 5201 => 'giropay bank offline', -
girocheckout/trunk/library/helper/GiroCheckout_SDK_TransactionType_helper.php
r2457199 r2795745 4 4 * 5 5 * @package GiroCheckout 6 * @version $Revision : 281 $ / $Date: 2019-10-18 12:19:18 +0200 (Fri, 18 Oct 2019)$6 * @version $Revision$ / $Date$ 7 7 */ 8 8 class GiroCheckout_SDK_TransactionType_helper { … … 16 16 const TRANS_TYPE_CREDITCARD_INITFORM = "creditCardInitform"; 17 17 const TRANS_TYPE_CREDITCARD_FINALIZEFORM = "creditCardFinalizeform"; 18 const TRANS_TYPE_CREDITCARD_SENDERINFO = "creditCardSenderInfo"; 18 19 19 20 const TRANS_TYPE_DIRECTDEBIT_TRANSACTION = "directDebitTransaction"; … … 23 24 const TRANS_TYPE_DIRECTDEBIT_REFUND = "directDebitRefund"; 24 25 const TRANS_TYPE_DIRECTDEBIT_VOID = "directDebitVoid"; 26 const TRANS_TYPE_DIRECTDEBIT_SENDERINFO = "directDebitSenderInfo"; 25 27 26 28 const TRANS_TYPE_GIROPAY_BANKSTATUS = "giropayBankstatus"; … … 28 30 const TRANS_TYPE_GIROPAY_TRANSACTION = "giropayTransaction"; 29 31 const TRANS_TYPE_GIROPAY_ISSUERLIST = "giropayIssuerList"; 32 const TRANS_TYPE_GIROPAY_SENDERINFO = "giropaySenderInfo"; 30 33 31 34 const TRANS_TYPE_IDEAL_ISSUERLIST = "idealIssuerList"; 32 35 const TRANS_TYPE_IDEAL_PAYMENT = "idealPayment"; 33 36 const TRANS_TYPE_IDEAL_REFUND = "idealRefund"; 37 const TRANS_TYPE_IDEAL_SENDERINFO = "idealSenderInfo"; 34 38 35 39 const TRANS_TYPE_PAYPAL_TRANSACTION = "paypalTransaction"; 40 const TRANS_TYPE_PAYPAL_REFUND = "paypalRefund"; 41 const TRANS_TYPE_PAYPAL_CAPTURE = "paypalCapture"; 36 42 37 43 const TRANS_TYPE_EPS_BANKSTATUS = "epsBankstatus"; 38 44 const TRANS_TYPE_EPS_TRANSACTION = "epsTransaction"; 39 45 const TRANS_TYPE_EPS_ISSUERLIST = "epsIssuerList"; 46 const TRANS_TYPE_EPS_SENDERINFO = "epsSenderInfo"; 40 47 41 48 const TRANS_TYPE_GET_TRANSACTIONTOOL = "getTransactionTool"; … … 58 65 const TRANS_TYPE_PAYPAGE_PROJECTS = "paypageProjects"; 59 66 const TRANS_TYPE_PAYPAGE_DONATIONCERT = "paypageDonationCert"; 67 const TRANS_TYPE_PAYPAGE_REFUND = "paypageRefund"; 68 const TRANS_TYPE_PAYPAGE_CAPTURE = "paypageCapture"; 60 69 61 70 const TRANS_TYPE_MAESTRO_TRANSACTION = "maestroTransaction"; … … 88 97 case self::TRANS_TYPE_CREDITCARD_FINALIZEFORM: 89 98 return new GiroCheckout_SDK_CreditCardFinalizeform(); 99 case self::TRANS_TYPE_CREDITCARD_SENDERINFO: 100 return new GiroCheckout_SDK_CreditCardSenderInfo(); 90 101 91 102 //direct debit apis … … 102 113 case self::TRANS_TYPE_DIRECTDEBIT_VOID: 103 114 return new GiroCheckout_SDK_DirectDebitVoid(); 115 case self::TRANS_TYPE_DIRECTDEBIT_SENDERINFO: 116 return new GiroCheckout_SDK_DirectDebitSenderInfo(); 104 117 105 118 //giropay apis … … 112 125 case self::TRANS_TYPE_GIROPAY_ISSUERLIST: 113 126 return new GiroCheckout_SDK_GiropayIssuerList(); 127 case self::TRANS_TYPE_GIROPAY_SENDERINFO: 128 return new GiroCheckout_SDK_GiropaySenderInfo(); 114 129 115 130 //iDEAL apis … … 120 135 case self::TRANS_TYPE_IDEAL_REFUND: 121 136 return new GiroCheckout_SDK_IdealPaymentRefund(); 137 case self::TRANS_TYPE_IDEAL_SENDERINFO: 138 return new GiroCheckout_SDK_IdealSenderInfo(); 122 139 123 140 //PayPal apis 124 141 case self::TRANS_TYPE_PAYPAL_TRANSACTION: 125 142 return new GiroCheckout_SDK_PaypalTransaction(); 143 case self::TRANS_TYPE_PAYPAL_CAPTURE: 144 return new GiroCheckout_SDK_PaypalCapture(); 145 case self::TRANS_TYPE_PAYPAL_REFUND: 146 return new GiroCheckout_SDK_PaypalRefund(); 126 147 127 148 //eps apis … … 132 153 case self::TRANS_TYPE_EPS_ISSUERLIST: 133 154 return new GiroCheckout_SDK_EpsIssuerList(); 155 case self::TRANS_TYPE_EPS_SENDERINFO: 156 return new GiroCheckout_SDK_EpsSenderInfo(); 134 157 135 158 //tools apis … … 172 195 case self::TRANS_TYPE_PAYPAGE_DONATIONCERT: 173 196 return new GiroCheckout_SDK_PaypageDonationcert(); 197 case self::TRANS_TYPE_PAYPAGE_REFUND: 198 return new GiroCheckout_SDK_PaypageRefund(); 199 case self::TRANS_TYPE_PAYPAGE_CAPTURE: 200 return new GiroCheckout_SDK_PaypageCapture(); 174 201 175 202 //Maestro apis -
girocheckout/trunk/payments/gc_giropay.php
r2435416 r2795745 1 1 <?php 2 class gc_giropay extends WC_Payment_Gateway { 3 4 /** @var string */ 2 3 class gc_giropay extends WC_Payment_Gateway 4 { 5 6 /** @var string */ 5 7 public $merchantid; 6 8 7 /** @var string */9 /** @var string */ 8 10 public $projectid; 9 11 10 /** @var string */12 /** @var string */ 11 13 public $password; 12 14 13 /** @var string */15 /** @var string */ 14 16 public $lang; 15 17 16 /** @var string */18 /** @var string */ 17 19 public $purpose; 18 20 … … 20 22 public $alternativenumorders; 21 23 22 /** 24 const CART_TYPE_PHYSICAL = "PHYSICAL"; 25 const CART_TYPE_DIGITAL = "DIGITAL"; 26 const CART_TYPE_MIXED = "MIXED"; 27 28 /** 23 29 * Constructor for the gateway. 24 30 * … … 77 83 $strLang = substr(get_bloginfo("language"), 0, 2); 78 84 79 if ($strLang == 'de' || $strLang == 'en') 85 if ($strLang == 'de' || $strLang == 'en') { 80 86 $this->lang = $strLang; 81 else 87 } 88 else { 82 89 $this->lang = $language; 90 } 83 91 } 84 92 … … 94 102 public function init_form_fields() { 95 103 $this->form_fields = array( 96 'configuration' => array( 97 'title' => __('Set-up configuration', 'girocheckout'), 98 'type' => 'title' 99 ), 100 'enabled' => array( 101 'title' => __('Enable/Disable', 'girocheckout'), 102 'type' => 'checkbox', 103 'label' => __('Enable giropay - online bank transfer', 'girocheckout'), 104 'default' => 'no', 105 ), 106 'title' => array( 107 'title' => __('Title', 'girocheckout'), 108 'type' => 'text', 109 'description' => __('Payment method title that the customer will see on your website.', 'girocheckout'), 110 'default' => __('giropay - online bank transfer', 'girocheckout'), 111 'desc_tip' => true, 112 ), 113 'merchantid' => array( 114 'title' => __('Merchant ID', 'girocheckout'), 115 'type' => 'text', 116 'description' => __('Merchant ID from GiroCockpit', 'girocheckout'), 117 'default' => '', 118 'desc_tip' => true, 119 ), 120 'projectid' => array( 121 'title' => __('Project ID', 'girocheckout'), 122 'type' => 'text', 123 'description' => __('Project ID from GiroCockpit', 'girocheckout'), 124 'default' => '', 125 'desc_tip' => true, 126 ), 127 'password' => array( 128 'title' => __('Project password', 'girocheckout'), 129 'type' => 'text', 130 'description' => __('Project password from GiroCockpit', 'girocheckout'), 131 'default' => '', 132 'desc_tip' => true, 133 ), 134 'purpose' => array( 135 'title' => __('Purpose', 'girocheckout'), 136 'type' => 'text', 137 'description' => __("You can define your own purpose using these placeholders:\n". 138 "{ORDERID}: Bestellnummer\n". 139 "{CUSTOMERID}: Kundennummer\n". 140 "{SHOPNAME}: Shop Name\n". 141 "{CUSTOMERNAME}: Kundenname\n". 142 "{CUSTOMERFIRSTNAME}: Kunde Vorname\n". 143 "{CUSTOMERLASTNAME}: Kunde Nachname\n". 144 "For example: If your purpose is \"Best. {ORDERID}, {SHOPNAME}\" then the submitted purpose must be \"Best. 55342, TestShop\"\n". 145 "The maximum length of the purpose is 27 characters.", 'girocheckout'), 146 'default' => 'Best. {ORDERID}, {SHOPNAME}', 147 'desc_tip' => true, 148 ), 149 'alternativenumorders' => array( 104 'configuration' => array( 105 'title' => __('Set-up configuration', 'girocheckout'), 106 'type' => 'title' 107 ), 108 'enabled' => array( 109 'title' => __('Enable/Disable', 'girocheckout'), 110 'type' => 'checkbox', 111 'label' => __('Enable giropay - online bank transfer', 'girocheckout'), 112 'default' => 'no', 113 ), 114 'title' => array( 115 'title' => __('Title', 'girocheckout'), 116 'type' => 'text', 117 'description' => __('Payment method title that the customer will see on your website.', 'girocheckout'), 118 'default' => __('giropay - online bank transfer', 'girocheckout'), 119 'desc_tip' => true, 120 ), 121 'merchantid' => array( 122 'title' => __('Merchant ID', 'girocheckout'), 123 'type' => 'text', 124 'description' => __('Merchant ID from GiroCockpit', 'girocheckout'), 125 'default' => '', 126 'desc_tip' => true, 127 ), 128 'projectid' => array( 129 'title' => __('Project ID', 'girocheckout'), 130 'type' => 'text', 131 'description' => __('Project ID from GiroCockpit', 'girocheckout'), 132 'default' => '', 133 'desc_tip' => true, 134 ), 135 'password' => array( 136 'title' => __('Project password', 'girocheckout'), 137 'type' => 'text', 138 'description' => __('Project password from GiroCockpit', 'girocheckout'), 139 'default' => '', 140 'desc_tip' => true, 141 ), 142 'purpose' => array( 143 'title' => __('Purpose', 'girocheckout'), 144 'type' => 'text', 145 'description' => __("You can define your own purpose using these placeholders:\n" . 146 "{ORDERID}: Bestellnummer\n" . 147 "{CUSTOMERID}: Kundennummer\n" . 148 "{SHOPNAME}: Shop Name\n" . 149 "{CUSTOMERNAME}: Kundenname\n" . 150 "{CUSTOMERFIRSTNAME}: Kunde Vorname\n" . 151 "{CUSTOMERLASTNAME}: Kunde Nachname\n" . 152 "For example: If your purpose is \"Best.{ORDERID},{SHOPNAME}\" then the submitted purpose must be \"Best.55342,TestShop\"\n" . 153 "It may only contain these characters: A-Z a-z 0-9 + ? / - : ( ) . , \' (NO Blanks!).\n" . 154 "Purpose field may now only be max. 20 characters long.", 'girocheckout'), 155 'default' => 'Best.{ORDERID},{SHOPNAME}', 156 'desc_tip' => true, 157 ), 158 'alternativenumorders' => array( 150 159 'title' => __('Enable/Disable', 'girocheckout'), 151 160 'type' => 'checkbox', 152 161 'label' => __('Support alternative order numbers', 'girocheckout'), 153 162 'default' => 'no', 154 )163 ) 155 164 ); 156 165 } … … 184 193 public function admin_options() { 185 194 ?> 186 <h3><?php _e('giropay - online bank transfer', 'girocheckout'); ?></h3>187 <p><?php _e('GiroCheckout giropay payment', 'girocheckout'); ?></p>188 <table class="form-table">189 <?php190 // Generate the HTML for the settings form.191 $this->generate_settings_html();192 ?>193 </table><!--/.form-table-->195 <h3><?php _e('giropay - online bank transfer', 'girocheckout'); ?></h3> 196 <p><?php _e('GiroCheckout giropay payment', 'girocheckout'); ?></p> 197 <table class="form-table"> 198 <?php 199 // Generate the HTML for the settings form. 200 $this->generate_settings_html(); 201 ?> 202 </table><!--/.form-table--> 194 203 <?php 195 204 } … … 233 242 if ($this->alternativenumorders) { 234 243 $transaction_id = $order->get_order_number(); 235 } else { 244 } 245 else { 236 246 $transaction_id = $orderID; 237 247 } 248 $aShippData = self::getShippingData($order); 238 249 239 250 $urlRedirect = add_query_arg('type', 'redirect', add_query_arg('wc-api', $this->id, home_url('/'))); … … 244 255 $reqPayment->setSecret($password); 245 256 $reqPayment->addParam('merchantId', $merchantId) 246 ->addParam('projectId', $projectId) 247 ->addParam('merchantTxId', $transaction_id) 248 ->addParam('amount', round($amount * 100)) 249 ->addParam('currency', $currency) 250 ->addParam('purpose', GiroCheckout_Utility::getPurpose($this->purpose, $order)) 251 ->addParam('urlRedirect', $urlRedirect) 252 ->addParam('urlNotify', $urlNotify) 253 ->addParam('sourceId', GiroCheckout_Utility::getGcSource()) 254 ->addParam('orderId', $transaction_id) 255 ->addParam('customerId', get_current_user_id()) 256 ->submit(); 257 ->addParam('projectId', $projectId) 258 ->addParam('merchantTxId', $transaction_id) 259 ->addParam('amount', round($amount * 100)) 260 ->addParam('currency', $currency) 261 ->addParam('purpose', self::getPurpose($this->purpose, $order)) 262 ->addParam('urlRedirect', $urlRedirect) 263 ->addParam('urlNotify', $urlNotify) 264 ->addParam('sourceId', GiroCheckout_Utility::getGcSource()) 265 ->addParam('orderId', $transaction_id) 266 ->addParam('customerId', get_current_user_id()) 267 ->addParam('shippingAddresseFirstName', GiroCheckout_Utility::formatText($aShippData["shippingAddresseFirstName"])) 268 ->addParam('shippingAddresseLastName', $aShippData["shippingAddresseLastName"]) 269 ->addParam('shippingCompany', $aShippData["shippingCompany"]) 270 ->addParam('shippingAdditionalAddressInformation', $aShippData["shippingAdditionalAddressInformation"]) 271 ->addParam('shippingStreet', $aShippData["shippingStreet"]) 272 ->addParam('shippingZipCode', $aShippData["shippingZipCode"]) 273 ->addParam('shippingCity', $aShippData["shippingCity"]) 274 ->addParam('shippingCountry', $aShippData["shippingCountry"]) 275 ->addParam('shippingEmail', $aShippData["shippingEmail"]) 276 ->addParam('cart', $aShippData["oCart"]) 277 ->addParam('shoppingCartType', $aShippData["cartType"]) 278 ->submit(); 257 279 258 280 if ($reqPayment->requestHasSucceeded()) { … … 261 283 if ($statusNotificationOrder == GiroCheckout_Utility::getOrderStatusZero()) { 262 284 GiroCheckout_Utility::registerOrderStatus($transaction_id, GiroCheckout_Utility::getOrderStatusInitial()); 263 } else { 285 } 286 else { 264 287 GiroCheckout_Utility::updateOrderStatus($transaction_id, GiroCheckout_Utility::getOrderStatusInitial()); 265 288 } … … 270 293 } 271 294 $strUrlRedirect = $reqPayment->getResponseParam('redirect'); 272 } else { 295 } 296 else { 273 297 wc_add_notice(GiroCheckout_SDK_ResponseCode_helper::getMessage($reqPayment->getResponseParam('rc'), $this->lang), 'error'); 274 298 return; 275 299 } 276 } catch (Exception $e) { 277 wc_add_notice(__('The plugin configuration data is incorrect', 'girocheckout') . ' ('.$e->getMessage().')', 'error'); 300 } 301 catch (Exception $e) { 302 wc_add_notice(__('The plugin configuration data is incorrect', 'girocheckout') . ' (' . $e->getMessage() . ')', 'error'); 278 303 return; 279 304 } 280 305 281 306 return array( 282 'result' => 'success',283 'redirect' => $strUrlRedirect,307 'result' => 'success', 308 'redirect' => $strUrlRedirect, 284 309 ); 285 310 } … … 298 323 if (!empty($_GET) && $_GET["type"] == 'redirect') { 299 324 do_action("valid_redirect_" . $this->id); 300 } else { 325 } 326 else { 301 327 do_action("valid_notify_" . $this->id); 302 328 } … … 318 344 try { 319 345 $notify = new GiroCheckout_SDK_Notify('giropayTransaction'); 320 $notify->setSecret(trim((string) $password));346 $notify->setSecret(trim((string)$password)); 321 347 $notify->parseNotification($_GET); 322 348 323 349 if ($this->alternativenumorders) { 324 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 325 } else { 350 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number($notify->getResponseParam('gcMerchantTxId')); 351 } 352 else { 326 353 $iOrderId = $notify->getResponseParam('gcMerchantTxId'); 327 354 } 328 355 329 $order = new WC_Order( $iOrderId);356 $order = new WC_Order($iOrderId); 330 357 $bPaymentSuccess = $notify->paymentSuccessful(); 331 358 … … 334 361 $iReturnCodeAVS = $notify->getResponseParam('gcResultAVS'); 335 362 336 if ( !empty($iReturnCodeAVS) && $iReturnCodeAVS != $iReturnCodeTrx) {363 if (!empty($iReturnCodeAVS) && $iReturnCodeAVS != $iReturnCodeTrx) { 337 364 $paymentMsg .= ", " . $notify->getResponseMessage($iReturnCodeAVS, $this->lang); 338 365 } … … 346 373 if ($statusNotificationOrder == GiroCheckout_Utility::getOrderStatusZero()) { 347 374 GiroCheckout_Utility::registerOrderStatus($notify->getResponseParam('gcMerchantTxId'), GiroCheckout_Utility::getOrderStatusRedirect()); 348 } else { 375 } 376 else { 349 377 GiroCheckout_Utility::updateOrderStatus($notify->getResponseParam('gcMerchantTxId'), GiroCheckout_Utility::getOrderStatusRedirect()); 350 378 } … … 352 380 353 381 if ($order->get_status() != 'completed' && $order->get_status() != 'processing' && 354 $statusNotificationOrder <= GiroCheckout_Utility::getOrderStatusInitial()) { 382 $statusNotificationOrder <= GiroCheckout_Utility::getOrderStatusInitial() 383 ) { 355 384 356 385 // Checks if the payment was successful and redirects the user 357 386 $order->add_order_note($paymentMsg); 358 387 359 if ( $bPaymentSuccess) {388 if ($bPaymentSuccess) { 360 389 $order->payment_complete(); 361 390 // Remove cart … … 366 395 $order->update_status('failed'); 367 396 368 if (method_exists($order, 'get_cancel_order_url_raw')) {369 $urlRedirect = esc_url_raw( $order->get_cancel_order_url_raw());397 if (method_exists($order, 'get_cancel_order_url_raw')) { 398 $urlRedirect = esc_url_raw($order->get_cancel_order_url_raw()); 370 399 } 371 400 } 372 } else { 401 } 402 else { 373 403 if (!$bPaymentSuccess) { 374 404 if ($order->get_status() == 'processing') { … … 391 421 $order->update_status('failed'); 392 422 } 393 423 394 424 wp_redirect($urlRedirect); 395 425 } … … 411 441 try { 412 442 $notify = new GiroCheckout_SDK_Notify('giropayTransaction'); 413 $notify->setSecret(trim((string) $password));443 $notify->setSecret(trim((string)$password)); 414 444 $notify->parseNotification($_GET); 415 445 416 446 if ($this->alternativenumorders) { 417 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 418 } else { 447 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number($notify->getResponseParam('gcMerchantTxId')); 448 } 449 else { 419 450 $iOrderId = $notify->getResponseParam('gcMerchantTxId'); 420 451 } 421 452 422 $order = new WC_Order( $iOrderId);453 $order = new WC_Order($iOrderId); 423 454 $statusNotificationOrder = GiroCheckout_Utility::readOrderStatus($notify->getResponseParam('gcMerchantTxId')); 424 455 … … 428 459 if ($statusNotificationOrder == GiroCheckout_Utility::getOrderStatusZero()) { 429 460 GiroCheckout_Utility::registerOrderStatus($notify->getResponseParam('gcMerchantTxId'), GiroCheckout_Utility::getOrderStatusNotify()); 430 } else { 461 } 462 else { 431 463 GiroCheckout_Utility::updateOrderStatus($notify->getResponseParam('gcMerchantTxId'), GiroCheckout_Utility::getOrderStatusNotify()); 432 464 } … … 444 476 // Order already processed? 445 477 if (($order->get_status() == 'processing' || $order->get_status() == 'completed') && 446 $statusNotificationOrder <= GiroCheckout_Utility::getOrderStatusInitial()) { 478 $statusNotificationOrder <= GiroCheckout_Utility::getOrderStatusInitial() 479 ) { 447 480 $notify->sendOkStatus(); 448 481 $notify->setNotifyResponseParam('Result', 'ERROR'); 449 $notify->setNotifyResponseParam('ErrorMessage', "Order $iOrderId already had state=" .$order->get_status());482 $notify->setNotifyResponseParam('ErrorMessage', "Order $iOrderId already had state=" . $order->get_status()); 450 483 $notify->setNotifyResponseParam('MailSent', ''); 451 484 $notify->setNotifyResponseParam('OrderId', $iOrderId); … … 471 504 echo $notify->getNotifyResponseStringJson(); 472 505 exit; 473 } else { 506 } 507 else { 474 508 if (($order->get_status() != 'processing' && $order->get_status() != 'completed') && 475 $statusNotificationOrder <= GiroCheckout_Utility::getOrderStatusInitial()) { 509 $statusNotificationOrder <= GiroCheckout_Utility::getOrderStatusInitial() 510 ) { 476 511 $order->update_status('failed'); 477 512 } … … 493 528 } 494 529 } 530 531 /** 532 * Get the payment purpose for giropay payment. 533 * 534 * @author S-Public Services GmbH 535 * @package GiroCheckout 536 * @copyright Copyright (c) 2022, S-Public Services GmbH 537 * @return string The purpose format 538 */ 539 public function getPurpose($p_strPurpose, $p_oOrder) { 540 if (empty($p_strPurpose)) { 541 $strPurpose = "Best.{ORDERID},{CUSTOMERNAME}"; 542 } 543 else { 544 $strPurpose = $p_strPurpose; 545 } 546 547 $strName = ""; 548 $strLastName = ""; 549 $strFirstName = ""; 550 $strShopName = get_bloginfo('name'); 551 552 // For registered user 553 if (is_user_logged_in()) { 554 $user_info = get_userdata(get_current_user_id()); 555 $strName = $user_info->user_login; 556 $strFirstName = $user_info->first_name; 557 $strLastName = $user_info->last_name; 558 } 559 else { 560 // For visitor 561 $strFirstName = $p_oOrder->get_billing_first_name(); 562 $strLastName = $p_oOrder->get_billing_last_name(); 563 $strName = $strFirstName . " " . $strLastName; 564 } 565 566 if (method_exists($p_oOrder, 'get_id')) { 567 $iOrderId = $p_oOrder->get_id(); 568 } 569 else { 570 $iOrderId = $p_oOrder->id; 571 } 572 573 $transaction_id = (string)apply_filters('woocommerce_order_number', $iOrderId, $p_oOrder); 574 if (!empty($transaction_id)) { 575 $iOrderId = $transaction_id; 576 } 577 578 $strPurpose = str_replace("{ORDERID}", $iOrderId, $strPurpose); 579 $strPurpose = str_replace("{CUSTOMERID}", get_current_user_id(), $strPurpose); 580 $strPurpose = str_replace("{SHOPNAME}", $strShopName, $strPurpose); 581 $strPurpose = str_replace("{CUSTOMERNAME}", $strName, $strPurpose); 582 $strPurpose = str_replace("{CUSTOMERFIRSTNAME}", $strFirstName, $strPurpose); 583 $strPurpose = str_replace("{CUSTOMERLASTNAME}", $strLastName, $strPurpose); 584 585 $bValidPurpose = self::validatePurpose($strPurpose); 586 587 if (!$bValidPurpose) { 588 $strPurposeFormat = preg_replace("([^[A-Za-z0-9\+\?\-\:\(\)\.\,\'\/\s])", '', $strPurpose); 589 } 590 else { 591 $strPurposeFormat = $strPurpose; 592 } 593 594 $strPurposeFormat = mb_substr(Normalizer::normalize($strPurposeFormat, Normalizer::FORM_C), 0, 27); 595 596 return $strPurposeFormat; 597 } 598 599 /** 600 * Validate the payment purpose for giropay payment. 601 * 602 * @author S-Public Services GmbH 603 * @package GiroCheckout 604 * @copyright Copyright (c) 2022, S-Public Services GmbH 605 * @return array 606 */ 607 public function validatePurpose($purpose) { 608 $strPurpose = $purpose; 609 610 if (!empty($strPurpose)) { 611 if (preg_match("/^[A-Za-z0-9\+\?\-\:\(\)\.\,\'\/\s]+$/", $strPurpose)) { 612 return true; 613 } 614 else { 615 return false; 616 } 617 } 618 619 return true; 620 } 621 622 /** 623 * Get shipping information for giropay. 624 * 625 * @author S-Public Services GmbH 626 * @package GiroCheckout 627 * @copyright Copyright (c) 2016, S-Public Services GmbH 628 * @return array 629 */ 630 public function getShippingData($order) { 631 $aReturn = array(); 632 633 try { 634 $iNumProdVirtual = 0; 635 $iNumProdPhysical = 0; 636 $strCartType = self::CART_TYPE_PHYSICAL; 637 $oCart = new GiroCheckout_SDK_Request_Cart(); 638 639 $aProducts = $order->get_items(); 640 641 if (!empty($aProducts)) { 642 foreach ($aProducts as $aProduct) { 643 $item_id = $aProduct['product_id']; 644 $product = new WC_Product($item_id); 645 646 $iPrice = $product->get_price(); 647 $oCart->addItem($aProduct['name'], $aProduct['qty'], $iPrice * 100, $product->get_sku()); 648 649 if ($product->is_downloadable() || $product->is_virtual()) { 650 $iNumProdVirtual++; 651 } 652 else { 653 $iNumProdPhysical++; 654 } 655 } 656 } 657 658 // Set the shopping cart type 659 if ($iNumProdVirtual > 0 && $iNumProdPhysical == 0) { 660 $strCartType = self::CART_TYPE_DIGITAL; 661 662 } 663 elseif ($iNumProdVirtual > 0 && $iNumProdPhysical > 0) { 664 $strCartType = self::CART_TYPE_MIXED; 665 } 666 667 $aReturn["oCart"] = $oCart; 668 $aReturn["cartType"] = $strCartType; 669 670 if (method_exists($order, 'get_billing_first_name')) { 671 $strFirstName = $order->get_billing_first_name(); 672 } 673 else { 674 $strFirstName = $order->billing_first_name; 675 } 676 677 if (method_exists($order, 'get_billing_last_name')) { 678 $strLastName = $order->get_billing_last_name(); 679 } 680 else { 681 $strLastName = $order->billing_last_name; 682 } 683 684 if (method_exists($order, 'get_billing_company')) { 685 $strCompany = $order->get_billing_company(); 686 } 687 else { 688 $strCompany = $order->billing_company; 689 } 690 691 if (method_exists($order, 'get_billing_address_2')) { 692 $strAddress2 = $order->get_billing_address_2(); 693 } 694 else { 695 $strAddress2 = $order->billing_address_2; 696 } 697 698 if (method_exists($order, 'get_billing_address_1')) { 699 $strAddress1 = $order->get_billing_address_1(); 700 } 701 else { 702 $strAddress1 = $order->billing_address_1; 703 } 704 705 if (method_exists($order, 'get_billing_postcode')) { 706 $strPostCode = $order->get_billing_postcode(); 707 } 708 else { 709 $strPostCode = $order->billing_postcode; 710 } 711 712 if (method_exists($order, 'get_billing_city')) { 713 $strCity = $order->get_billing_city(); 714 } 715 else { 716 $strCity = $order->billing_city; 717 } 718 719 if (method_exists($order, 'get_billing_country')) { 720 $strCountry = $order->get_billing_country(); 721 } 722 else { 723 $strCountry = $order->billing_country; 724 } 725 726 if (method_exists($order, 'get_billing_email')) { 727 $strEmail = $order->get_billing_email(); 728 } 729 else { 730 $strEmail = $order->billing_email; 731 } 732 733 $aReturn["shippingAddresseFirstName"] = $strFirstName; 734 $aReturn["shippingAddresseLastName"] = $strLastName; 735 $aReturn["shippingCompany"] = $strCompany; 736 $aReturn["shippingAdditionalAddressInformation"] = $strAddress2; 737 $aReturn["shippingStreet"] = $strAddress1; 738 $aReturn["shippingZipCode"] = $strPostCode; 739 $aReturn["shippingCity"] = $strCity; 740 $aReturn["shippingCountry"] = $strCountry; 741 $aReturn["shippingEmail"] = $strEmail; 742 } 743 catch (Exception $exception) { 744 } 745 746 return $aReturn; 747 } 495 748 } -
girocheckout/trunk/payments/gc_ideal.php
r2435416 r2795745 40 40 $this->id = 'gc_ideal'; 41 41 $this->method_title = __('iDEAL - online bank transfer (NL)', 'girocheckout'); 42 $this->icon = plugins_url('img/gc_ideal. jpg', dirname(__FILE__));42 $this->icon = plugins_url('img/gc_ideal.png', dirname(__FILE__)); 43 43 $this->title = __('iDEAL - online bank transfer (NL)', 'girocheckout'); 44 44 $this->has_fields = true; -
girocheckout/trunk/readme.txt
r2719666 r2795745 3 3 Tags: woocommerce, payment 4 4 Requires at least: 4.5 5 Tested up to: 6.0. 05 Tested up to: 6.0.2 6 6 Requires PHP: 5.4 7 7 WC requires at least: 3.0.0 8 WC tested up to: 6. 3.18 WC tested up to: 6.9.4 9 9 Stable tag: trunk 10 10 License: GPLv2 or later … … 54 54 55 55 == Changelog == 56 57 = 4.1.7 = 58 * Changes in purpose validation for new giropay 59 60 = 4.1.6 = 61 * Implemented support for new giropay 62 * Changed the iDEAL logo. 63 * Added SDK version 2.3.8 56 64 57 65 = 4.1.5 =
Note: See TracChangeset
for help on using the changeset viewer.