Scan to make payment
@@ -14,7 +15,7 @@
-
+
+
+
+ Can't scan?
Use this
wallet link, or
+
+
+
+
+
+
+
diff --git a/src/app/checkout/checkout.component.ts b/src/app/checkout/checkout.component.ts
index 815afe0..7273f13 100644
--- a/src/app/checkout/checkout.component.ts
+++ b/src/app/checkout/checkout.component.ts
@@ -2,6 +2,8 @@ import { Inject, Component, OnInit, ViewEncapsulation} from '@angular/core';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
+import { NotifierService } from '../notifier.service';
+
var QRCode = require('easyqrcodejs');
var URLSafeBase64 = require('urlsafe-base64');
var Buffer = require('buffer/').Buffer;
@@ -22,8 +24,9 @@ export class CheckoutComponent implements OnInit{
constructor(
private dialogRef: MatDialogRef
,
private sanitizer: DomSanitizer,
- @Inject(MAT_DIALOG_DATA) public data: { totalZec: number, addr: string, orderId: string}
- ) {
+ @Inject(MAT_DIALOG_DATA) public data: { totalZec: number, addr: string, orderId: string},
+ private notifierService : NotifierService ) {
+
console.log("Entra a Constructor")
this.address = data.addr;
this.total = data.totalZec;
@@ -37,8 +40,8 @@ export class CheckoutComponent implements OnInit{
{
text: this.codeString,
logo: "/assets/zcash.png",
- width: 220,
- height: 220,
+ width: 230,
+ height: 230,
logoWidth: 60,
logoHeight: 60,
correctLevel: QRCode.CorrectLevel.H
@@ -54,4 +57,48 @@ export class CheckoutComponent implements OnInit{
close() {
this.dialogRef.close(false);
}
+
+ copyAddress() {
+ if (!navigator.clipboard) {
+// alert("Copy functionality not supported");
+ this.notifierService
+ .showNotification("Copy functionality not supported","Close","error");
+ }
+ try {
+ navigator.clipboard.writeText(this.address);
+ } catch (err) {
+ this.notifierService
+ .showNotification("Error copying address","Close","error");
+// console.error("Error", err);
+ }
+ }
+ copyAmount() {
+ if (!navigator.clipboard) {
+// alert("Copy functionality not supported");
+ this.notifierService
+ .showNotification("Copy functionality not supported","Close","error");
+ }
+ try {
+ navigator.clipboard.writeText(this.total.toString());
+ } catch (err) {
+ this.notifierService
+ .showNotification("Error while copying ammount","Close","error");
+// console.error("Error", err);
+ }
+ }
+
+ copyMemo() {
+ if (!navigator.clipboard) {
+// alert("Copy functionality not supported");
+ this.notifierService
+ .showNotification("Copy functionality not supported","Close","error");
+ }
+ try {
+ navigator.clipboard.writeText("ZGo Order::" + this.orderId);
+ } catch (err) {
+ this.notifierService
+ .showNotification("Error while copying Memo","Close","error");
+// console.error("Error", err);
+ }
+ }
}