Changeset 1542060
- Timestamp:
- 11/28/2016 03:11:03 PM (9 years ago)
- Location:
- woocommerce-mpay24-gateway/trunk
- Files:
-
- 3 edited
-
MPay24/MDXI.xsd (modified) (3 diffs)
-
gateway-mpay24.php (modified) (2 diffs)
-
readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-mpay24-gateway/trunk/MPay24/MDXI.xsd
r1034503 r1542060 58 58 <xs:enumeration value="KLARNA"/> 59 59 <xs:enumeration value="SOFORT"/> 60 <xs:enumeration value="MASTERPASS"/> 60 61 </xs:restriction> 61 62 </xs:simpleType> … … 86 87 <xs:enumeration value="INVOICE"/> 87 88 <xs:enumeration value="HP"/> 89 <xs:enumeration value="INTERNATIONAL"/> 90 <xs:enumeration value="MASTERPASS"/> 91 </xs:restriction> 92 </xs:simpleType> 93 <xs:simpleType name="PaymentSubBrandType"> 94 <xs:restriction base="xs:string"> 95 <xs:maxLength value="3"/> 96 <xs:pattern value="[0-9]{1,3}"/> 88 97 </xs:restriction> 89 98 </xs:simpleType> 90 99 <xs:simpleType name="PriceType"> 91 100 <xs:restriction base="xs:float"> 92 <xs:pattern value=" -?\d{1,9}\.\d{2}|-?\d{1,9}"/>101 <xs:pattern value="\-?\d{1,9}(\.\d{2})?"/> 93 102 </xs:restriction> 94 103 </xs:simpleType> … … 272 281 <xs:attribute name="Type" type="PaymentTypeType" use="required"/> 273 282 <xs:attribute name="Brand" type="PaymentBrandType"/> 283 <xs:attribute name="SubBrand" type="PaymentSubBrandType"/> 274 284 </xs:complexType> 275 285 </xs:element> -
woocommerce-mpay24-gateway/trunk/gateway-mpay24.php
r1034503 r1542060 541 541 542 542 $shop->setSuccessUrl( $this->get_return_url( $order ) ); // thank you page 543 $shop->setErrorUrl( $order->get_cancel_order_url() ); // failed orders will also be marked as cancelled 544 $shop->setCancelUrl( $order->get_cancel_order_url() ); 543 if( version_compare( $woocommerce->version, '2.3.6', '>=' ) ) { 544 $shop->setErrorUrl( $order->get_cancel_order_url_raw() ); // failed orders will also be marked as cancelled 545 $shop->setCancelUrl( $order->get_cancel_order_url_raw() ); 546 } 547 else { 548 $shop->setErrorUrl( $this->get_cancel_order_url_raw($order) ); // failed orders will also be marked as cancelled 549 $shop->setCancelUrl( $this->get_cancel_order_url_raw($order) ); 550 } 545 551 $shop->setConfirmUrl( $this->protect_url( $this->notify_url ) ); 546 552 … … 570 576 'redirect' => $result->getLocation() 571 577 ); 578 } 579 580 /** 581 * Generates a raw (unescaped) cancel-order URL for use by payment gateways. 582 * code adapted from woocommerce version >= 2.3.6 for plugin usage with lower woocommerce versions 583 * 584 * @param object $order 585 * @param string $redirect 586 * @return string The unescaped cancel-order URL. 587 */ 588 public function get_cancel_order_url_raw( $order, $redirect = '' ) { 589 $cancel_endpoint = wc_get_page_permalink( 'cart' ); 590 if ( ! $cancel_endpoint ) { 591 $cancel_endpoint = home_url(); 592 } 593 594 if ( false === strpos( $cancel_endpoint, '?' ) ) { 595 $cancel_endpoint = trailingslashit( $cancel_endpoint ); 596 } 597 598 return apply_filters('woocommerce_get_cancel_order_url_raw', add_query_arg( array( 599 'cancel_order' => 'true', 600 'order' => $order->order_key, 601 'order_id' => $order->id, 602 'redirect' => $redirect 603 ), $cancel_endpoint ) ); 572 604 } 573 605 -
woocommerce-mpay24-gateway/trunk/readme.txt
r1034503 r1542060 5 5 Tags: woocommerce, gateway, mpay24 6 6 Requires at least: 3.5 7 Tested up to: 4. 0.18 Stable tag: 1.5. 17 Tested up to: 4.6.1 8 Stable tag: 1.5.2 9 9 License: GNU General Public License v3.0 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 16 16 = Features = 17 17 18 * Uses mPAY24 PHP files (version 2013-06-24), follows mPAY24 SOAP Specification (version 2014-09-12)18 * Uses mPAY24 PHP files (version 2013-06-24), follows mPAY24 SOAP Specification 19 19 * Using the mPAY24 payment page to integrate in website 20 20 * Switching between DEV and PROD mPAY24 environment with SOAP logins … … 29 29 = mPAY24 = 30 30 31 If there are newer mPAY24 PHP Files you can replace the files in the folder `MPay24`. 31 If there are newer mPAY24 PHP Files you can replace the files in the folder `MPay24`. But don't use the current PHP SDK from Github. 32 32 If you want to extend the functionality you have to edit `class-wc-mpay24-shop.php` 33 33 … … 40 40 * DOM (mPAY24 API) 41 41 * Mcrypt (mPAY24 API) 42 * [WooCommerce Plugin](http://www.woothemes.com/woocommerce/) v2. 0or higher42 * [WooCommerce Plugin](http://www.woothemes.com/woocommerce/) v2.1 or higher 43 43 44 44 = Manual installation = … … 76 76 77 77 == Changelog == 78 79 = 1.5.2 - 2016-11-28 = 80 81 * Bugfix: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data (WC 2.3.6 and higher), (thanks to [jbugella](https://profiles.wordpress.org/jbugella) for bugfix) 78 82 79 83 = 1.5.1 - 2014-11-28 =
Note: See TracChangeset
for help on using the changeset viewer.