@@ -515,47 +515,6 @@ var BringgSDK = (function () {
515515 }
516516 } ;
517517
518- /**
519- *
520- */
521- module . submitTip = function ( tip ) {
522- var canvas = document . getElementById ( 'newSignature' ) ; // save canvas image as data url (png format by default)
523- var blob = dataURItoBlob ( canvas . toDataURL ( 'image/jpg' ) ) ;
524- var fileName = guid ( ) + '.jpg' ;
525-
526- if ( configuration && configuration . tipConfiguration && configuration . tipConfiguration . tipSignatureUploadPath
527- && configuration . tipConfiguration . tipCurrency && configuration . tip_token && tipConfiguration . tipUrl )
528- $ . post ( configuration . tipConfiguration . tipSignatureUploadPath , {
529- amount : tip ,
530- signatureImage : fileName ,
531- currency : configuration . tipConfiguration . tipCurrency ,
532- type : blob . type ,
533- tipToken : configuration . tip_token
534- } , function ( urlResponse ) {
535- $ . ajax ( {
536- url : urlResponse . url ,
537- type : 'PUT' ,
538- data : blob ,
539- processData : false ,
540- contentType : blob . type
541- } ) . success ( function ( res ) {
542- $ . post ( configuration . tipConfiguration . tipUrl , {
543- amount : tip ,
544- tipToken : configuration . tip_token ,
545- signatureImage : fileName ,
546- currency : configuration . tipConfiguration . tipCurrency ,
547- taskNoteId : urlResponse . note_id
548- } ) . success ( function ( res ) {
549-
550- } ) . fail ( function ( res ) {
551-
552- } ) ;
553- } ) ;
554- } ) . fail ( function ( res ) {
555-
556- } ) ;
557- } ;
558-
559518 /**
560519 *
561520 * @returns {* }
0 commit comments