Reply
Member
Posts: 3
Registered: ‎07-31-2018

A duplicate customer payment profile already exists.

[ Edited ]

What is the difference between Create the profile and Create profile payments? Do i need to create a Customer first and then profile payment? If so, I am running into a small issue on Create the profile and create the profile payment. After i create a profile i get Customer Profile ID, then i am creating a profile payment with received customer profile id but i get an error "A duplicate customer payment profile already exists". 

 

auth.createProfile({
cust_id : '123456',
creditcard : "0000 0000 0000 0000",
expire : "0000",
fname : 'test',
lname : 'test',
company : 'test',
street : 'my adddress',
city : 'Montreal',
state : 'Quebec',
zip : 'h4mp343',
country : 'Canada',
email : 'test@test.com',
phone : '5149999999'
},function (data) {

if(data.error === undefined){
auth.createPaymentProfile({
profile_id : data.data.id,
creditcard : "0000 0000 0000 0000",
expire : "1111",
fname : 'test',
lname : 'test',
company : 'test',
street : 'my address',
city : 'Montreal',
state : 'Quebec',
zip : 'h4mp343',
country : 'Canada',
email : 'test@test.com',
phone : '5149999999'
},function (data) {
console.log('createPaymentProfile',data)
// here i get an error: A duplicate customer payment profile already exists.
})
}else{
console.log('createProfile',data.error)
}
})
Member
Posts: 3
Registered: ‎07-31-2018

Re: A duplicate customer payment profile already exists.

I solved it, i guess it was the problem with credit card number. If you enter same credit card you get an error.