Jump to content

NFT

Starter
  • Posts

    1
  • Joined

  • Last visited

Everything posted by NFT

  1. Hi Team I am trying to send billing address and shipping address to the formbuilder stripe checkout via hook but it is not working. Here's the code I am trying for setting billing address but on the stripe checkout page it is again showing the dropdown to select the billing address. Any suggestions! $wire->addHookAfter('FormBuilderProcessorStripe::getSessionOptions', function($e) { // Get the existing session options $sessionOptions = $e->return; // Add billing address collection to the session options $sessionOptions['billing_address_collection'] = 'required'; // You can also specify allowed countries for billing address collection $sessionOptions['shipping_address_collection']['allowed_countries'] = ['US', 'CA']; // Set the modified session options $e->return = $sessionOptions; }); I also tried setting the line items with getLineItems hook and it is working fine. Here's the code for that as well. In $stripeProductsArr I have stored the details of all the line items. $wire->addHookAfter('FormBuilderProcessorStripe::getLineItems', function($e) use ($stripeProductsArr) { $e->return = $stripeProductsArr; });
×
×
  • Create New...