I'm trying to create an order programmatically using braintree payment method and the customer's saved credit card.
// prepare adresses, products in quote, shipping method - skipped $quote->setPaymentMethod('braintree'); $quote->setInventoryProcessed(false); // Set Sales Order Payment $quote->getPayment()->importData(array('method' => 'braintree, 'cc_type' => 'AE', 'cc_exp_month' => '05', 'cc_exp_year' => '2022', 'public_hash' => $public_hash)); $customer = $this->customerRepository->get($contact->email); // prepare customer $quote->setCustomer($customer); // Collect Totals & Save Quote $quote->collectTotals()->save(); $order = $this->quoteManagement->submit($quote);
I have access to all of the saved CC information from the customer, I'm just not sure what info needs to be passed in
In my payment.log file I see the following error when attempting to create orders using the saved CC:
Cannot determine payment method.
Any ideas how to process payments using Braintree vaulted cards?