-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from RBAtkins0n/master
1.1.6 iFrame version
- Loading branch information
Showing
15 changed files
with
879 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# PayWeb_WooCommerce | ||
## PayGate WooCommerce plugin v1.1.5 for WooCommerce v3.4.3 | ||
## PayGate WooCommerce plugin v1.1.6 for WooCommerce v3.5.0 | ||
|
||
This is the DPO PayGate PayWeb3 plugin for WooCommerce. Please feel free to contact the DPO PayGate support team at [email protected] should you require any assistance. | ||
|
||
## Installation | ||
[![How To Setup DPO | PayGate PayWeb for WooCommerce](https://www.appinlet.com/wp-content/uploads/2018/09/WooCommerce-Integration.jpg)](https://www.youtube.com/watch?v=MMcEG7FmoEM "How To Setup DPO | PayGate PayWeb for WooCommerce") | ||
|
||
Please navigate to the [releases page](https://github.com/PayGate/PayWeb_WooCommerce/releases), download the latest release (v1.1.5) and unzip. You will them be able to follow the integration guide PDF which is included in the zip. | ||
Please navigate to the [releases page](https://github.com/PayGate/PayWeb_WooCommerce/releases), download the latest release (v1.1.6) and unzip. You will them be able to follow the integration guide PDF which is included in the zip. | ||
|
||
## Collaboration | ||
|
||
|
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...e-gateway-paygate-pw3/gateway-paygate.php → ...e-gateway-paygate-pw3/gateway-paygate.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
62 changes: 62 additions & 0 deletions
62
iFrame/woocommerce-gateway-paygate-pw3/assets/css/paygate_checkout.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* The popup (background) */ | ||
|
||
#payPopup { | ||
display: block; | ||
/* Shows the popup */ | ||
position: fixed; | ||
z-index: 10000; | ||
left: 0; | ||
top: 0; | ||
width: 100%; | ||
height: 100%; | ||
overflow: auto; | ||
background-color: rgb(0, 0, 0); | ||
/* Fallback background color */ | ||
background-color: rgba(0, 0, 0, 0.6); | ||
/* Background color with opacity */ | ||
} | ||
/* Popup content box */ | ||
|
||
#payPopupContent { | ||
background-color: #fefefe; | ||
/* Popup color */ | ||
margin: auto; | ||
margin-top: 30px; | ||
padding: 6px; | ||
border: 1px solid #888; | ||
/* Popup border */ | ||
border-radius: 10px; | ||
max-width: 700px; | ||
/* Popup width */ | ||
height: 90%; | ||
/* Popup height: */ | ||
overflow: auto; | ||
} | ||
#payPopupFrame { | ||
margin: 0px; | ||
padding: 0px; | ||
border: none; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
/* The close button */ | ||
|
||
#payPopupClose { | ||
color: #aaa; | ||
/* Close button color */ | ||
float: right; | ||
font-size: 28px; | ||
/* Close button size */ | ||
font-weight: bold; | ||
margin: 0px; | ||
padding: 0px; | ||
font-family: 'Times New Roman'; | ||
line-height: 15px; | ||
height: 15px; | ||
} | ||
#payPopupClose:hover, #payPopupClose:focus { | ||
color: black; | ||
/* Close button hover color */ | ||
text-decoration: none; | ||
cursor: pointer; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions
40
iFrame/woocommerce-gateway-paygate-pw3/assets/js/paygate_checkout.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
jQuery(function() { | ||
jQuery.ajaxSetup({ | ||
complete: function(xhr, textStatus) { | ||
var result = JSON.parse(xhr.responseText); | ||
if (result.paygate_override) { | ||
jQuery('.woocommerce-error').remove(); | ||
initPayPopup(result); | ||
return false; | ||
} | ||
return; | ||
} | ||
}); | ||
jQuery(document).ajaxComplete(function() { | ||
if (jQuery('body').hasClass('woocommerce-checkout') || jQuery('body').hasClass('woocommerce-cart')) { | ||
jQuery('html, body').stop(); | ||
} | ||
}); | ||
}); | ||
|
||
function initPayPopup(result) { | ||
jQuery("body").append("<div id='payPopup'></div>"); | ||
jQuery("#payPopup").append("<div id='payPopupContent'></div>"); | ||
jQuery("#payPopupContent").append("<form target='myIframe' name='paygate_checkout' id='paygate_checkout' action='https://secure.paygate.co.za/payweb3/process.trans' method='post'><input type='hidden' name='PAY_REQUEST_ID' value='" + result.PAY_REQUEST_ID + "' size='200'><input type='hidden' name='CHECKSUM' value='" + result.CHECKSUM + "' size='200'></form><iframe style='width:100%;height:100%;' id='payPopupFrame' name='myIframe' src='#' ></iframe><script type='text/javascript'>document.getElementById('paygate_checkout').submit();</script>"); | ||
} | ||
jQuery(document).on('submit', 'form#order_review', function(e) { | ||
e.preventDefault(); | ||
jQuery.ajax({ | ||
'url': wc_add_to_cart_params.ajax_url, | ||
'type': 'POST', | ||
'dataType': 'json', | ||
'data': { | ||
'action': 'order_pay_payment', | ||
'order_id': paygate_checkout_js.order_id | ||
}, | ||
'async': false | ||
}).complete(function(result) { | ||
var result = JSON.parse(result); | ||
initPayPopup(result); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.