braintree - Second transaction for same customer fails to increase transaction count -


dashboard --> vault customer shows transaction count 1 when number of transaction same customer greater 1.

ckfmf6 default  visa 411111******1111   05/11/15    1 

code below creates customer , executes transaction.

transactionrequest request = new transactionrequest();         request.customer()                 .firstname("jenna")                 .lastname("smith");         request.creditcard()                 .number("4111111111111111")                 .expirationmonth("05")                 .expirationyear("2016")                 .cvv("100");         request.billingaddress()                 .firstname("jenna")                 .lastname("smith")                 .postalcode("60622");         request.amount(new bigdecimal("2"))                 .paymentmethodnonce("nonce-from-the-client")                 .options()                 .submitforsettlement(true)                 .storeinvaultonsuccess(true)                 .done(); 

from result customerid - 129089.

use same customerid second transaction.

transactionrequest request = new transactionrequest();         request.customer()                 .customerid(129089)                 .firstname("jenna")                 .lastname("smith");         request.creditcard()                 .number("4111111111111111")                 .expirationmonth("05")                 .expirationyear("2016")                 .cvv("100");         request.amount(new bigdecimal("2"))                 .paymentmethodnonce("nonce-from-the-client")                 .options()                 .submitforsettlement(true)                 .done(); 

number of transaction still same. missing?

btw .paymentmethodnonce("nonce-from-the-client") means? idea behind this?

this how solved it. instead of passing object, pass id in customerid.

transactionrequest request = new transactionrequest();     request.customerid(129089);     request.creditcard()             .number("4111111111111111")             .expirationmonth("05")             .expirationyear("2016")             .cvv("100");     request.amount(new bigdecimal("2"))             .paymentmethodnonce("nonce-from-the-client")             .options()             .submitforsettlement(true)             .done(); 

Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -