I am using a PayPal button in my HTML Form. All works fine like PayPal ask for authentication and inject the payment_method_nonce in HTML form.
But, When i creating a subscription with this payment_method_nonce then its give me error that:- Message:- Payment method token is invalid Code:- 91903
I am using PHP Library and Here is my code snippet:-
$subscription = Braintree_Subscription::create(array(
'paymentMethodToken' => payment_method_nonce that PayPal button inject in my form,
'planId' => planId that created in Braintree,
));
or if i use sale method using same payment_method_nonce like this:-
$subscription = Braintree_Transaction::sale(array(
'amount' => $amount,
'paymentMethodToken' => payment_method_nonce that PayPal button inject in my form
));
than its works fine.
Please let me know what is the problem with this?