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
<div> | |
<div id="paypal-button-container" style="width: 350px;"></div> | |
<p id="result-message"></p> | |
<!-- Replace the "test" client-id value with your client-id --> | |
<script src="https://www.paypal.com/sdk/js?client-id=test¤cy=USD"></script> | |
</div> | |
<script language="JavaScript"> | |
if (window.top != window.self){ | |
window.paypal.Buttons({ | |
async createOrder() { |
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
... | |
let responseMessage: string = ''; | |
const statusOptions = [ 'All', 'Running', 'Failed', 'Cancelled', 'Succeeded' ]; | |
const NO_FILTER = 0; | |
var runsList = { | |
runs: [] | |
}; | |
let runsCount = 0; |
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
... | |
export class SomeComponent implements ComponentFramework.StandardControl<IInputs, IOutputs> { | |
private has_been_reset: boolean; | |
... | |
public init(context: ComponentFramework.Context<IInputs>, notifyOutputChanged: () => void, state: ComponentFramework.Dictionary, container:HTMLDivElement) | |
{ | |
this.has_been_reset = false; | |
... |
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
... | |
const STATUS_NEW: string = "new"; | |
const STATUS_ERROR: string = "error"; | |
const STATUS_PROCESSING: string = "processing"; | |
const STATUS_COMPLETED: string = "completed"; | |
export class Payments implements ComponentFramework.StandardControl<IInputs, IOutputs> { | |
... | |
private transaction_status: string; | |
private _notifyOutputChanged: () => void; |
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
<div class="wrapper-body"> | |
<div class="container"> | |
<!-- Hidden error message block --> | |
<div id="error" style="display:none"> | |
<p>There was an error processing your payment, please try again.</p> | |
</div> | |
<h2>Make a payment</h2> | |
<p>Please make a payment of $100 AUD</p> |
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
<!-- Payment confirmation request and form submission script --> | |
<script> | |
var urlParams = new URLSearchParams(window.location.search); | |
var access_code = urlParams.get('AccessCode'); | |
// Request payment confimration from teh payment gateway | |
$.ajax({ | |
url: "https://paymentrequest2.azurewebsites.net/api/PaymentStatus?transaction=" + access_code, | |
dataType: 'json', |
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
<div class="wrapper-body"> | |
<div class="container"> | |
<!-- Hidden entity form --> | |
<div style="display:none"> | |
{% if page.adx_entityform %} | |
{% entityform id: page.adx_entityform.id %} | |
{% endif %} | |
</div> |
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
module.exports = function (context, req) { | |
context.log('JavaScript HTTP trigger function processed a request.'); | |
var request = require('request'); | |
var transaction = context.req.query.transaction; | |
request( | |
{ | |
url : 'https://api.sandbox.ewaypayments.com/Transaction/' + transaction, | |
auth: { |
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
<!-- Retrieve the payment record submitted on the previous step --> | |
{% assign payment = entities.cr591_payment["{{ request.params['payment'] }}"] %} | |
<div class="wrapper-body"> | |
<div class="container"> | |
<h3>Payment successful</h3> | |
<p>Your payment has been successfully processed, thank you!</p> | |
<ul> | |
<li>Reference: {{ payment.cr591_reference }}</li> | |
<li>Amount: ${{ payment.cr591_amount }}</li> |