Generating multiple Braintree payment method nonce using one hosted form
<p>My application is using Braintree to collect payments on my application. I want to have a checkbox on payment form which can be ticked to store the credit card details to the braintree customer record</p>

<p>However, I cannot reuse the same nonce that is generated to make the payment (I am getting error saying I cannot use the same nonce multiple times).</p>

<p>This is what I am trying to do:</p>

<pre><code>...
$paymentMethodNonce = $this-&gt;input-&gt;post("payment_method_nonce");

//make payment
Braintree_Transaction::sale(['paymentMethodNonce'       =&gt; $paymentMethodNonce,
                                'orderId'               =&gt; $orderId,
                                'merchantAccountId'     =&gt; $merchantAccountId,
                                'amount'                =&gt; $amount,
                                "options"               =&gt; ["submitForSettlement" =&gt; true]
                               ]);


//create card for existing customer
Braintree_PaymentMethod::create(['paymentMethodNonce' =&gt; $paymentMethodNonce,
                                 'customerId' =&gt; $customerId,
                                 'options' =&gt; ['verifyCard' =&gt; true]
                                ]);
...
</code></pre>

<p>I do not want to force user to re enter their credit card details again to be able to save it.</p>

<p>Is there a way in Braintree to generate more than one nonce for one hosted form? Or is there a better way to save card than having a checkbox?</p>

<p>Many thanks</p>