Changeset 2118404
- Timestamp:
- 07/05/2019 10:18:47 PM (7 years ago)
- Location:
- girocheckout/trunk
- Files:
-
- 12 edited
-
girocheckout.php (modified) (1 diff)
-
library/GiroCheckout_Utility.php (modified) (3 diffs)
-
payments/gc_bluecode.php (modified) (7 diffs)
-
payments/gc_creditcard.php (modified) (8 diffs)
-
payments/gc_directdebit.php (modified) (6 diffs)
-
payments/gc_eps.php (modified) (6 diffs)
-
payments/gc_giropay.php (modified) (6 diffs)
-
payments/gc_ideal.php (modified) (6 diffs)
-
payments/gc_maestro.php (modified) (6 diffs)
-
payments/gc_paydirekt.php (modified) (7 diffs)
-
payments/gc_sofortuw.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
girocheckout/trunk/girocheckout.php
r2099900 r2118404 10 10 * Plugin Name: GiroCheckout 11 11 * Description: Plugin to integrate the GiroCheckout payment methods into WooCommerce. 12 * Version: 4.0. 4.112 * Version: 4.0.5 13 13 * Author: GiroSolution GmbH 14 14 * Author URI: http://www.girosolution.de -
girocheckout/trunk/library/GiroCheckout_Utility.php
r2099900 r2118404 19 19 */ 20 20 public static function getVersion() { 21 return '4.0. 4.1';21 return '4.0.5'; 22 22 } 23 23 … … 77 77 } 78 78 79 $transaction_id = (string) apply_filters( 'woocommerce_order_number', $iOrderId, $p_oOrder ); 80 if( !empty($transaction_id) ) { 81 $iOrderId = $transaction_id; 82 } 83 79 84 $strPurpose = str_replace( "{ORDERID}", $iOrderId, $strPurpose ); 80 85 $strPurpose = str_replace( "{CUSTOMERID}", get_current_user_id(), $strPurpose ); … … 91 96 public static function formatText($p_strText) { 92 97 return mb_convert_encoding( $p_strText, "UTF-8" ); 93 } 98 } 99 100 /** 101 * Get order ID from custom order number. 102 * 103 * @param string $order_number Order number to search for 104 * @return bool|integer Internal order ID or FALSE if not found. 105 */ 106 public static function get_order_id_by_order_number( $order_number ) { 107 108 if( ($order = wc_get_order($order_number)) != NULL ) { 109 // Order_number is already valid internal id 110 return $order_number; 111 } 112 113 $aOrders = wc_get_orders( array( 'limit' => -1 ) ); 114 foreach ( $aOrders as $order ) { 115 if ( $order->get_order_number() == $order_number ) { 116 return $order->get_id(); 117 } 118 } 119 return false; 120 } 94 121 } -
girocheckout/trunk/payments/gc_bluecode.php
r2099898 r2118404 10 10 /** @var string */ 11 11 public $password; 12 13 /** @var string */14 public $sourceid = 'e70f2793e318713d8491a2bbb98edfd7';15 12 16 13 /** @var string */ … … 229 226 $amount = $order->get_total(); 230 227 $currency = get_woocommerce_currency(); 231 $transaction_id = $order ID;228 $transaction_id = $order->get_order_number(); 232 229 $urlRedirect = add_query_arg('type', 'redirect', add_query_arg('wc-api', $this->id, home_url('/'))); 233 230 $urlNotify = add_query_arg('type', 'notify', add_query_arg('wc-api', $this->id, home_url('/'))); … … 238 235 $reqPayment->addParam('merchantId', $merchantId) 239 236 ->addParam('projectId', $projectId) 240 ->addParam('merchantTxId', (int)$transaction_id)237 ->addParam('merchantTxId', $transaction_id) 241 238 ->addParam('amount', round($amount * 100)) 242 239 ->addParam('currency', $currency) … … 245 242 ->addParam('urlNotify', $urlNotify) 246 243 ->addParam('sourceId', GiroCheckout_Utility::getGcSource()) 247 ->addParam('orderId', (int)$transaction_id)244 ->addParam('orderId', $transaction_id) 248 245 ->addParam('customerId', get_current_user_id()); 249 246 … … 251 248 252 249 if ($reqPayment->requestHasSucceeded()) { 250 // Add the girocheckout transaction Id value to the order 251 if (!add_post_meta($orderID, '_girocheckout_reference', $reqPayment->getResponseParam('reference'), true)) { 252 update_post_meta($orderID, '_girocheckout_reference', $reqPayment->getResponseParam('reference')); 253 } 253 254 $strUrlRedirect = $reqPayment->getResponseParam('redirect'); 254 255 } else { … … 303 304 $notify->parseNotification($_GET); 304 305 305 $order = new WC_Order($notify->getResponseParam('gcMerchantTxId')); 306 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 307 $order = new WC_Order( $iOrderId ); 306 308 $bPaymentSuccess = $notify->paymentSuccessful(); 307 309 … … 371 373 $notify->parseNotification($_GET); 372 374 373 $iOrderId = $notify->getResponseParam('gcMerchantTxId');374 $order = new WC_Order( $iOrderId);375 375 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 376 $order = new WC_Order( $iOrderId ); 377 376 378 $paymentMsg = GiroCheckout_SDK_ResponseCode_helper::getMessage($notify->getResponseParam('gcResultPayment'), $this->lang); 377 379 $order->add_order_note($paymentMsg); -
girocheckout/trunk/payments/gc_creditcard.php
r2082698 r2118404 11 11 /** @var string */ 12 12 public $password; 13 14 /** @var string */15 public $sourceid = 'e70f2793e318713d8491a2bbb98edfd7';16 13 17 14 /** @var string */ … … 80 77 81 78 $strLogoName = $this->getExtendedLogo(); 82 if (strlen($strLogoName) > 0) 79 if (strlen($strLogoName) > 0) { 83 80 $this->icon = plugins_url('img/' . $strLogoName, dirname(__FILE__)); 84 else 81 } 82 else { 85 83 $this->icon = plugins_url('img/gc_creditcard.jpg', dirname(__FILE__)); 84 } 86 85 87 86 // Hooks … … 237 236 public function addGateway($methods) 238 237 { 239 240 238 $methods[] = $this->id; 241 242 239 return $methods; 243 240 } … … 302 299 $amount = $order->get_total(); 303 300 $currency = get_woocommerce_currency(); 304 $transaction_id = $order ID;301 $transaction_id = $order->get_order_number(); 305 302 $urlRedirect = add_query_arg('type', 'redirect', add_query_arg('wc-api', $this->id, home_url('/'))); 306 303 $urlNotify = add_query_arg('type', 'notify', add_query_arg('wc-api', $this->id, home_url('/'))); 307 304 308 if( $transactiontype == "authorize" ) 305 if( $transactiontype == "authorize" ) { 309 306 $strTransType = __GIROCHECKOUT_TRANTYP_AUTH; 310 else 307 } 308 else { 311 309 $strTransType = __GIROCHECKOUT_TRANTYP_SALE; 310 } 312 311 313 312 $request = new GiroCheckout_SDK_Request('creditCardTransaction'); … … 315 314 $request->addParam('merchantId', $merchantId) 316 315 ->addParam('projectId', $projectId) 317 ->addParam('merchantTxId', (int)$transaction_id)316 ->addParam('merchantTxId', $transaction_id) 318 317 ->addParam('amount', round($amount * 100)) 319 318 ->addParam('currency', $currency) … … 323 322 ->addParam('urlNotify', $urlNotify) 324 323 ->addParam('sourceId', GiroCheckout_Utility::getGcSource()) 325 ->addParam('orderId', (int)$transaction_id)324 ->addParam('orderId', $transaction_id) 326 325 ->addParam('customerId', get_current_user_id()) 327 326 ->addParam('type', $strTransType) … … 389 388 $notify->parseNotification($_GET); 390 389 391 $order = new WC_Order($notify->getResponseParam('gcMerchantTxId')); 390 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 391 $order = new WC_Order( $iOrderId ); 392 392 $paymentMsg = GiroCheckout_SDK_ResponseCode_helper::getMessage($notify->getResponseParam('gcResultPayment'), $this->lang); 393 393 $bPaymentSuccess = $notify->paymentSuccessful(); … … 450 450 $notify->parseNotification($_GET); 451 451 452 $iOrderId = $notify->getResponseParam('gcMerchantTxId');453 $order = new WC_Order( $iOrderId);452 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 453 $order = new WC_Order( $iOrderId ); 454 454 $paymentMsg = GiroCheckout_SDK_ResponseCode_helper::getMessage($notify->getResponseParam('gcResultPayment'), $this->lang); 455 455 $order->add_order_note($paymentMsg); -
girocheckout/trunk/payments/gc_directdebit.php
r2082698 r2118404 11 11 /** @var string */ 12 12 public $password; 13 14 /** @var string */15 public $sourceid = 'e70f2793e318713d8491a2bbb98edfd7';16 13 17 14 /** @var string */ … … 412 409 $amount = $order->get_total(); 413 410 $currency = get_woocommerce_currency(); 414 $transaction_id = $order ID;415 416 if ($transactiontype == "authorize") 411 $transaction_id = $order->get_order_number(); 412 413 if ($transactiontype == "authorize") { 417 414 $strTransType = __GIROCHECKOUT_TRANTYP_AUTH; 418 else 415 } 416 else { 419 417 $strTransType = __GIROCHECKOUT_TRANTYP_SALE; 418 } 420 419 421 420 if ($this->useexternalformservice) { … … 424 423 $request->addParam('merchantId', $merchantId) 425 424 ->addParam('projectId', $projectId) 426 ->addParam('merchantTxId', (int)$transaction_id)425 ->addParam('merchantTxId', $transaction_id) 427 426 ->addParam('amount', round($amount * 100)) 428 427 ->addParam('currency', $currency) … … 431 430 ->addParam('urlNotify', $urlNotify) 432 431 ->addParam('sourceId', GiroCheckout_Utility::getGcSource()) 433 ->addParam('orderId', (int)$transaction_id)432 ->addParam('orderId', $transaction_id) 434 433 ->addParam('customerId', get_current_user_id()) 435 434 ->addParam('type', $strTransType) … … 577 576 $notify->parseNotification($_GET); 578 577 579 $order = new WC_Order($notify->getResponseParam('gcMerchantTxId')); 578 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 579 $order = new WC_Order( $iOrderId ); 580 580 $paymentMsg = GiroCheckout_SDK_ResponseCode_helper::getMessage($notify->getResponseParam('gcResultPayment'), $this->lang); 581 581 $bPaymentSuccess = $notify->paymentSuccessful(); … … 639 639 $notify->parseNotification($_GET); 640 640 641 $iOrderId = $notify->getResponseParam('gcMerchantTxId');642 $order = new WC_Order( $iOrderId);641 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 642 $order = new WC_Order( $iOrderId ); 643 643 $paymentMsg = GiroCheckout_SDK_ResponseCode_helper::getMessage($notify->getResponseParam('gcResultPayment'), $this->lang); 644 644 $order->add_order_note($paymentMsg); -
girocheckout/trunk/payments/gc_eps.php
r2082698 r2118404 10 10 /** @var string */ 11 11 public $password; 12 13 /** @var string */14 public $sourceid = 'e70f2793e318713d8491a2bbb98edfd7';15 12 16 13 /** @var string */ … … 251 248 $amount = $order->get_total(); 252 249 $currency = get_woocommerce_currency(); 253 $transaction_id = $order ID;250 $transaction_id = $order->get_order_number(); 254 251 $urlRedirect = add_query_arg('type', 'redirect', add_query_arg('wc-api', $this->id, home_url('/'))); 255 252 $urlNotify = add_query_arg('type', 'notify', add_query_arg('wc-api', $this->id, home_url('/'))); … … 260 257 $reqPayment->addParam('merchantId', $merchantId) 261 258 ->addParam('projectId', $projectId) 262 ->addParam('merchantTxId', (int)$transaction_id)259 ->addParam('merchantTxId', $transaction_id) 263 260 ->addParam('amount', round($amount * 100)) 264 261 ->addParam('currency', $currency) … … 267 264 ->addParam('urlNotify', $urlNotify) 268 265 ->addParam('sourceId', GiroCheckout_Utility::getGcSource()) 269 ->addParam('orderId', (int)$transaction_id)266 ->addParam('orderId', $transaction_id) 270 267 ->addParam('customerId', get_current_user_id()) 271 268 ->submit(); 272 269 273 270 if ($reqPayment->requestHasSucceeded()) { 271 // Add the girocheckout transaction Id value to the order 272 if (!add_post_meta($orderID, '_girocheckout_reference', $reqPayment->getResponseParam('reference'), true)) { 273 update_post_meta($orderID, '_girocheckout_reference', $reqPayment->getResponseParam('reference')); 274 } 274 275 $strUrlRedirect = $reqPayment->getResponseParam('redirect'); 275 276 } else { … … 324 325 $notify->parseNotification($_GET); 325 326 326 $order = new WC_Order($notify->getResponseParam('gcMerchantTxId')); 327 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 328 $order = new WC_Order( $iOrderId ); 327 329 $paymentMsg = GiroCheckout_SDK_ResponseCode_helper::getMessage($notify->getResponseParam('gcResultPayment'), $this->lang); 328 330 $bPaymentSuccess = $notify->paymentSuccessful(); … … 388 390 $notify->parseNotification($_GET); 389 391 390 $iOrderId = $notify->getResponseParam('gcMerchantTxId');391 $order = new WC_Order( $iOrderId);392 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 393 $order = new WC_Order( $iOrderId ); 392 394 $paymentMsg = GiroCheckout_SDK_ResponseCode_helper::getMessage($notify->getResponseParam('gcResultPayment'), $this->lang); 393 395 $order->add_order_note($paymentMsg); -
girocheckout/trunk/payments/gc_giropay.php
r2082698 r2118404 10 10 /** @var string */ 11 11 public $password; 12 13 /** @var string */14 public $sourceid = 'e70f2793e318713d8491a2bbb98edfd7';15 12 16 13 /** @var string */ … … 250 247 $amount = $order->get_total(); 251 248 $currency = get_woocommerce_currency(); 252 $transaction_id = $order ID;249 $transaction_id = $order->get_order_number(); 253 250 $urlRedirect = add_query_arg('type', 'redirect', add_query_arg('wc-api', $this->id, home_url('/'))); 254 251 $urlNotify = add_query_arg('type', 'notify', add_query_arg('wc-api', $this->id, home_url('/'))); 255 256 252 257 253 // Sends request to Girocheckout. … … 260 256 $reqPayment->addParam('merchantId', $merchantId) 261 257 ->addParam('projectId', $projectId) 262 ->addParam('merchantTxId', (int)$transaction_id)258 ->addParam('merchantTxId', $transaction_id) 263 259 ->addParam('amount', round($amount * 100)) 264 260 ->addParam('currency', $currency) … … 267 263 ->addParam('urlNotify', $urlNotify) 268 264 ->addParam('sourceId', GiroCheckout_Utility::getGcSource()) 269 ->addParam('orderId', (int)$transaction_id)265 ->addParam('orderId', $transaction_id) 270 266 ->addParam('customerId', get_current_user_id()) 271 267 ->submit(); 272 268 273 269 if ($reqPayment->requestHasSucceeded()) { 270 // Add the girocheckout transaction Id value to the order 271 if (!add_post_meta($orderID, '_girocheckout_reference', $reqPayment->getResponseParam('reference'), true)) { 272 update_post_meta($orderID, '_girocheckout_reference', $reqPayment->getResponseParam('reference')); 273 } 274 274 $strUrlRedirect = $reqPayment->getResponseParam('redirect'); 275 275 } else { … … 324 324 $notify->parseNotification($_GET); 325 325 326 $order = new WC_Order($notify->getResponseParam('gcMerchantTxId')); 326 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 327 $order = new WC_Order( $iOrderId ); 327 328 $bPaymentSuccess = $notify->paymentSuccessful(); 328 329 … … 394 395 $notify->parseNotification($_GET); 395 396 396 $iOrderId = $notify->getResponseParam('gcMerchantTxId');397 $order = new WC_Order( $iOrderId);397 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 398 $order = new WC_Order( $iOrderId ); 398 399 399 400 $paymentMsg = GiroCheckout_SDK_ResponseCode_helper::getMessage($notify->getResponseParam('gcResultPayment'), $this->lang); -
girocheckout/trunk/payments/gc_ideal.php
r2082698 r2118404 11 11 /** @var string */ 12 12 public $password; 13 14 /** @var string */15 public $sourceid = 'e70f2793e318713d8491a2bbb98edfd7';16 13 17 14 /** @var string */ … … 321 318 $amount = $order->get_total(); 322 319 $currency = get_woocommerce_currency(); 323 $transaction_id = $order ID;320 $transaction_id = $order->get_order_number(); 324 321 $urlRedirect = add_query_arg('type', 'redirect', add_query_arg('wc-api', $this->id, home_url('/'))); 325 322 $urlNotify = add_query_arg('type', 'notify', add_query_arg('wc-api', $this->id, home_url('/'))); … … 330 327 $request->addParam('merchantId', $merchantId) 331 328 ->addParam('projectId', $projectId) 332 ->addParam('merchantTxId', (int)$transaction_id)329 ->addParam('merchantTxId', $transaction_id) 333 330 ->addParam('amount', round($amount * 100)) 334 331 ->addParam('currency', $currency) … … 338 335 ->addParam('urlNotify', $urlNotify) 339 336 ->addParam('sourceId', GiroCheckout_Utility::getGcSource()) 340 ->addParam('orderId', (int)$transaction_id)337 ->addParam('orderId', $transaction_id) 341 338 ->addParam('customerId', get_current_user_id()) 342 339 ->submit(); … … 401 398 $notify->parseNotification($_GET); 402 399 403 $order = new WC_Order($notify->getResponseParam('gcMerchantTxId')); 400 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 401 $order = new WC_Order( $iOrderId ); 404 402 $paymentMsg = GiroCheckout_SDK_ResponseCode_helper::getMessage($notify->getResponseParam('gcResultPayment'), $this->lang); 405 403 $bPaymentSuccess = $notify->paymentSuccessful(); … … 462 460 $notify->parseNotification($_GET); 463 461 464 $iOrderId = $notify->getResponseParam('gcMerchantTxId');465 $order = new WC_Order( $iOrderId);462 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 463 $order = new WC_Order( $iOrderId ); 466 464 $paymentMsg = GiroCheckout_SDK_ResponseCode_helper::getMessage($notify->getResponseParam('gcResultPayment'), $this->lang); 467 465 $order->add_order_note($paymentMsg); -
girocheckout/trunk/payments/gc_maestro.php
r2082698 r2118404 11 11 /** @var string */ 12 12 public $password; 13 14 /** @var string */15 public $sourceid = 'e70f2793e318713d8491a2bbb98edfd7';16 13 17 14 /** @var string */ … … 234 231 $amount = $order->get_total(); 235 232 $currency = get_woocommerce_currency(); 236 $transaction_id = $order ID;233 $transaction_id = $order->get_order_number(); 237 234 $urlRedirect = add_query_arg('type', 'redirect', add_query_arg('wc-api', $this->id, home_url('/'))); 238 235 $urlNotify = add_query_arg('type', 'notify', add_query_arg('wc-api', $this->id, home_url('/'))); … … 242 239 $request->addParam('merchantId', $merchantId) 243 240 ->addParam('projectId', $projectId) 244 ->addParam('merchantTxId', (int)$transaction_id)241 ->addParam('merchantTxId', $transaction_id) 245 242 ->addParam('amount', round($amount * 100)) 246 243 ->addParam('currency', $currency) … … 249 246 ->addParam('urlNotify', $urlNotify) 250 247 ->addParam('sourceId', GiroCheckout_Utility::getGcSource()) 251 ->addParam('orderId', (int)$transaction_id)248 ->addParam('orderId', $transaction_id) 252 249 ->addParam('customerId', get_current_user_id()) 253 250 ->submit(); … … 313 310 $notify->parseNotification($_GET); 314 311 315 $order = new WC_Order($notify->getResponseParam('gcMerchantTxId')); 312 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 313 $order = new WC_Order( $iOrderId ); 316 314 $paymentMsg = GiroCheckout_SDK_ResponseCode_helper::getMessage($notify->getResponseParam('gcResultPayment'), $this->lang); 317 315 $bPaymentSuccess = $notify->paymentSuccessful(); … … 374 372 $notify->parseNotification($_GET); 375 373 376 $iOrderId = $notify->getResponseParam('gcMerchantTxId');377 $order = new WC_Order( $iOrderId);374 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 375 $order = new WC_Order( $iOrderId ); 378 376 $paymentMsg = GiroCheckout_SDK_ResponseCode_helper::getMessage($notify->getResponseParam('gcResultPayment'), $this->lang); 379 377 $order->add_order_note($paymentMsg); -
girocheckout/trunk/payments/gc_paydirekt.php
r2082698 r2118404 11 11 /** @var string */ 12 12 public $password; 13 14 /** @var string */15 public $sourceid = 'e70f2793e318713d8491a2bbb98edfd7';16 13 17 14 /** @var string */ … … 269 266 $amount = $order->get_total(); 270 267 $currency = get_woocommerce_currency(); 271 $transaction_id = $order ID;268 $transaction_id = $order->get_order_number(); 272 269 $urlRedirect = add_query_arg('type', 'redirect', add_query_arg('wc-api', $this->id, home_url('/'))); 273 270 $urlNotify = add_query_arg('type', 'notify', add_query_arg('wc-api', $this->id, home_url('/'))); … … 276 273 $iNumProdPhysical = 0; 277 274 278 if( $transactiontype == "authorize" ) 275 if( $transactiontype == "authorize" ) { 279 276 $strTransType = __GIROCHECKOUT_TRANTYP_AUTH; 280 else 277 } 278 else { 281 279 $strTransType = __GIROCHECKOUT_TRANTYP_SALE; 280 } 282 281 283 282 $oCart = new GiroCheckout_SDK_Request_Cart(); … … 392 391 $request->addParam('merchantId', $merchantId) 393 392 ->addParam('projectId', $projectId) 394 ->addParam('merchantTxId', (int)$transaction_id)393 ->addParam('merchantTxId', $transaction_id) 395 394 ->addParam('amount', round($amount * 100)) 396 395 ->addParam('currency', $currency) … … 411 410 ->addParam('urlNotify', $urlNotify) 412 411 ->addParam('sourceId', GiroCheckout_Utility::getGcSource()) 413 ->addParam('orderId', (int)$transaction_id)412 ->addParam('orderId', $transaction_id) 414 413 ->addParam('customerId', get_current_user_id()) 415 414 ->addParam('shoppingCartType', $strCartType) … … 479 478 $notify->parseNotification($_GET); 480 479 481 $order = new WC_Order($notify->getResponseParam('gcMerchantTxId')); 480 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 481 $order = new WC_Order( $iOrderId ); 482 482 $paymentMsg = GiroCheckout_SDK_ResponseCode_helper::getMessage($notify->getResponseParam('gcResultPayment'), $this->lang); 483 483 $bPaymentSuccess = $notify->paymentSuccessful(); … … 542 542 $notify->parseNotification($_GET); 543 543 544 $iOrderId = $notify->getResponseParam('gcMerchantTxId');545 $order = new WC_Order( $iOrderId);544 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 545 $order = new WC_Order( $iOrderId ); 546 546 $paymentMsg = GiroCheckout_SDK_ResponseCode_helper::getMessage($notify->getResponseParam('gcResultPayment'), $this->lang); 547 547 $order->add_order_note($paymentMsg); -
girocheckout/trunk/payments/gc_sofortuw.php
r2082698 r2118404 10 10 /** @var string */ 11 11 public $password; 12 13 /** @var string */14 public $sourceid = 'e70f2793e318713d8491a2bbb98edfd7';15 12 16 13 /** @var string */ … … 224 221 $amount = $order->get_total(); 225 222 $currency = get_woocommerce_currency(); 226 $transaction_id = $order ID;223 $transaction_id = $order->get_order_number(); 227 224 $urlRedirect = add_query_arg('type', 'redirect', add_query_arg('wc-api', $this->id, home_url('/'))); 228 225 $urlNotify = add_query_arg('type', 'notify', add_query_arg('wc-api', $this->id, home_url('/'))); … … 232 229 $request->addParam('merchantId', $merchantId) 233 230 ->addParam('projectId', $projectId) 234 ->addParam('merchantTxId', (int)$transaction_id)231 ->addParam('merchantTxId', $transaction_id) 235 232 ->addParam('amount', round($amount * 100)) 236 233 ->addParam('currency', $currency) … … 239 236 ->addParam('urlNotify', $urlNotify) 240 237 ->addParam('sourceId', GiroCheckout_Utility::getGcSource()) 241 ->addParam('orderId', (int)$transaction_id)238 ->addParam('orderId', $transaction_id) 242 239 ->addParam('customerId', get_current_user_id()) 243 240 ->submit(); 244 241 245 242 if ($request->requestHasSucceeded()) { 243 // Add the girocheckout transaction Id value to the order 244 if (!add_post_meta($orderID, '_girocheckout_reference', $request->getResponseParam('reference'), true)) { 245 update_post_meta($orderID, '_girocheckout_reference', $request->getResponseParam('reference')); 246 } 246 247 $strUrlRedirect = $request->getResponseParam('redirect'); 247 248 } else { … … 297 298 $notify->parseNotification($_GET); 298 299 299 $order = new WC_Order($notify->getResponseParam('gcMerchantTxId')); 300 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 301 $order = new WC_Order( $iOrderId ); 300 302 $paymentMsg = GiroCheckout_SDK_ResponseCode_helper::getMessage($notify->getResponseParam('gcResultPayment'), $this->lang); 301 303 $bPaymentSuccess = $notify->paymentSuccessful(); … … 360 362 $notify->parseNotification($_GET); 361 363 362 $iOrderId = $notify->getResponseParam('gcMerchantTxId');363 $order = new WC_Order( $iOrderId);364 $iOrderId = GiroCheckout_Utility::get_order_id_by_order_number( $notify->getResponseParam('gcMerchantTxId') ); 365 $order = new WC_Order( $iOrderId ); 364 366 $paymentMsg = GiroCheckout_SDK_ResponseCode_helper::getMessage($notify->getResponseParam('gcResultPayment'), $this->lang); 365 367 $order->add_order_note($paymentMsg); -
girocheckout/trunk/readme.txt
r2097544 r2118404 3 3 Tags: woocommerce, payment 4 4 Requires at least: 4.5 5 Tested up to: 5.2 5 Tested up to: 5.2.2 6 6 Requires PHP: 5.4 7 7 WC requires at least: 3.0.0 8 WC tested up to: 3.6. 48 WC tested up to: 3.6.5 9 9 Stable tag: trunk 10 10 License: GPLv2 or later … … 55 55 == Changelog == 56 56 57 = 4.0.5 = 58 * Order numbers are now compatible with custom formats and may differ from orderid 59 57 60 = 4.0.4 = 58 61 * Added support for Bluecode E-Commerce payment method
Note: See TracChangeset
for help on using the changeset viewer.