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!
Solved! Go to Solution.
โ07-11-2018 12:48 PM
Now is working I figure out. The problem was that I was sending the cardData with month and year as number instead of string.
โ07-11-2018 02:50 PM
Now is working I figure out. The problem was that I was sending the cardData with month and year as number instead of string.
โ07-11-2018 02:50 PM
How you inject accept.js file in your angular 2. I am facing problem to inject accept.js
โ07-13-2018 06:40 AM
How you inject accept.js library in your angular 2. i am facing problem to inject this liberary
โ07-13-2018 06:45 AM
How you inject accept.js library in your angular 2. I am facing problem to inject accept.js library in my angular 5 .
โ07-13-2018 06:47 AM
How you inject accept.js library in your angular 2. I am facing problem to inject accept.js library in my angular 5 .
โ07-13-2018 07:03 AM
Hi Just imported on the index.
<script src="https://jstest.authorize.net/v1/Accept.js" charset="utf-8"></script>
And the declare the global vaiable on the component.
declare var Accept: any;
@Component({
selector: 'payment',
...
})
export class PaymentComponent implements OnInit {
....
โ07-19-2018 09:05 AM