Reply
Member
Posts: 2
Registered: ‎07-11-2018

Accept js in Angular 2

Hello,

 

Im new on the Usage of the Accept js library.

 

Im trying to integrate with my Angular 2 project. 

 

Im trying to call the dispatch data funtion:

 

 

Accept.dispatchData(secureData, this.responseHandler);

 responseHandler(response: any) {
        if (response.messages.resultCode === "Error") {
            var i = 0;
            while (i < response.messages.message.length) {
                //paymentError(response.messages.message[i].text);
                console.log(response.messages.message[i].text);
                i = i + 1;
            }
        } else {
            //paymentNewUser(response.opaqueData, infoData);
        }
    }

But I get this error:

 

 

ERROR TypeError: a[c].match is not a function
at h (AcceptCore.js:1)
at b (AcceptCore.js:1)
at Object.function.a.dispatchData.a.dispatchData (AcceptCore.js:1)
at t.sendPaymentDataToAnet (payment-modal.component.ts:92)
at Object.eval [as handleEvent] (t.html:92)
at _ (core.js:13254)
at li (core.js:14739)
at Object.Zr [as handleEvent] (core.js:14326)
at he (core.js:9703)
at core.js:10317

 

Can any one help me with this? Can be the responseHandler function that is causing that issue?

 

 

Thanks!

 

 

 

 

Highlighted
Member
Posts: 2
Registered: ‎07-11-2018

Re: Accept js in Angular 2

Now is working I figure out. The problem was that I was sending the cardData with month and year as number instead of string.

New Member
Posts: 4
Registered: ‎07-13-2018

Re: Accept js in Angular 2

How you inject accept.js file in your angular 2. I am facing problem to inject accept.js

 

New Member
Posts: 4
Registered: ‎07-13-2018

Re: Accept js in Angular 2

How you inject accept.js library in your angular 2. i am facing problem to inject this liberary

New Member
Posts: 4
Registered: ‎07-13-2018

Re: Accept js in Angular 2

How you inject accept.js library in your angular 2. I am facing problem to inject accept.js library in my angular 5 .

New Member
Posts: 4
Registered: ‎07-13-2018

Re: Accept js in Angular 2

    How you inject accept.js library in your angular 2. I am facing problem to inject accept.js library in my angular 5 .