subscribepro / subscribepro-magento2-ext

Subscribe Pro Magento 2 Integration Extension
MIT License
24 stars 22 forks source link

Cannot Add Payment Method/Place Order to Free Order #185

Closed JenFaber closed 1 year ago

JenFaber commented 1 year ago

When attempting to place a subscription on a Magento 2 store page, where the order costs zero dollars, the user is unable to add a payment method or place the order.

Steps To Reproduce:

  1. Set up a 0$ coupon in Magento (Marketing > Cart Price) in order to create free orders *
    • Select Add New Rule
    • Chance Coupon dropdown to Coupon
    • Create/type in a coupon code (ex: zero)
    • Expand Actions and set discount amount to 100%
    • Toggle apply to shipping amount and save
  2. Add product to your Magento Cart and access your cart
  3. Apply the discount code set up in Step 1
  4. Observe the $0 dollar total
  5. Enter credit card details or select an existing card
  6. Click Place Order
  7. Receive error message: The requested Payment Method is not available.

* If you'd like to skip step 1, you can access my store https://jdfm2001a.sp1.dev/ and use the coupon code zero with Joust Duffle Bag.

image

Note: This feature was available in Magento 1 but may no longer be available in Magento 2. Magento 1 documentation describing how to set up the order: https://docs.subscribepro.com/integrations/magento-1/feature-support/free-and-zero-dollar-orders/

JenFaber commented 1 year ago

Stack Trace from Chris:

{
    "message": "The requested Payment Method is not available.",
    "trace": "#0 \/var\/www\/html\/vendor\/magento\/module-checkout\/Model\/PaymentInformationManagement.php(181): Magento\\Quote\\Model\\PaymentMethodManagement->set(73, Object(Magento\\Quote\\Model\\Quote\\Payment))\n#1 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/Interceptor.php(58): Magento\\Checkout\\Model\\PaymentInformationManagement->savePaymentInformation(73, Object(Magento\\Quote\\Model\\Quote\\Payment), Object(Magento\\Quote\\Model\\Quote\\Address\\Interceptor))\n#2 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/Interceptor.php(138): Magento\\Checkout\\Model\\PaymentInformationManagement\\Interceptor->___callParent('savePaymentInfo...', Array)\n#3 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/Interceptor.php(153): Magento\\Checkout\\Model\\PaymentInformationManagement\\Interceptor->Magento\\Framework\\Interception\\{closure}(73, Object(Magento\\Quote\\Model\\Quote\\Payment), Object(Magento\\Quote\\Model\\Quote\\Address\\Interceptor))\n#4 \/var\/www\/html\/generated\/code\/Magento\/Checkout\/Model\/PaymentInformationManagement\/Interceptor.php(32): Magento\\Checkout\\Model\\PaymentInformationManagement\\Interceptor->___callPlugins('savePaymentInfo...', Array, Array)\n#5 \/var\/www\/html\/vendor\/magento\/module-checkout\/Model\/PaymentInformationManagement.php(120): Magento\\Checkout\\Model\\PaymentInformationManagement\\Interceptor->savePaymentInformation(73, Object(Magento\\Quote\\Model\\Quote\\Payment), Object(Magento\\Quote\\Model\\Quote\\Address\\Interceptor))\n#6 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/Interceptor.php(58): Magento\\Checkout\\Model\\PaymentInformationManagement->savePaymentInformationAndPlaceOrder(73, Object(Magento\\Quote\\Model\\Quote\\Payment), Object(Magento\\Quote\\Model\\Quote\\Address\\Interceptor))\n#7 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/Interceptor.php(138): Magento\\Checkout\\Model\\PaymentInformationManagement\\Interceptor->___callParent('savePaymentInfo...', Array)\n#8 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/Interceptor.php(153): Magento\\Checkout\\Model\\PaymentInformationManagement\\Interceptor->Magento\\Framework\\Interception\\{closure}(73, Object(Magento\\Quote\\Model\\Quote\\Payment), Object(Magento\\Quote\\Model\\Quote\\Address\\Interceptor))\n#9 \/var\/www\/html\/generated\/code\/Magento\/Checkout\/Model\/PaymentInformationManagement\/Interceptor.php(23): Magento\\Checkout\\Model\\PaymentInformationManagement\\Interceptor->___callPlugins('savePaymentInfo...', Array, Array)\n#10 [internal function]: Magento\\Checkout\\Model\\PaymentInformationManagement\\Interceptor->savePaymentInformationAndPlaceOrder(73, Object(Magento\\Quote\\Model\\Quote\\Payment), Object(Magento\\Quote\\Model\\Quote\\Address\\Interceptor))\n#11 \/var\/www\/html\/vendor\/magento\/module-webapi\/Controller\/Rest\/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)\n#12 \/var\/www\/html\/vendor\/magento\/module-webapi\/Controller\/Rest.php(195): Magento\\Webapi\\Controller\\Rest\\SynchronousRequestProcessor->process(Object(Magento\\Framework\\Webapi\\Rest\\Request\\Proxy))\n#13 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/Interceptor.php(58): Magento\\Webapi\\Controller\\Rest->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#14 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/Interceptor.php(138): Magento\\Webapi\\Controller\\Rest\\Interceptor->___callParent('dispatch', Array)\n#15 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/Interceptor.php(153): Magento\\Webapi\\Controller\\Rest\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#16 \/var\/www\/html\/generated\/code\/Magento\/Webapi\/Controller\/Rest\/Interceptor.php(23): Magento\\Webapi\\Controller\\Rest\\Interceptor->___callPlugins('dispatch', Array, Array)\n#17 \/var\/www\/html\/vendor\/magento\/framework\/App\/Http.php(116): Magento\\Webapi\\Controller\\Rest\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#18 \/var\/www\/html\/generated\/code\/Magento\/Framework\/App\/Http\/Interceptor.php(23): Magento\\Framework\\App\\Http->launch()\n#19 \/var\/www\/html\/vendor\/magento\/framework\/App\/Bootstrap.php(264): Magento\\Framework\\App\\Http\\Interceptor->launch()\n#20 \/var\/www\/html\/pub\/index.php(30): Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http\\Interceptor))\n#21 {main}"
}
garthbrantley commented 1 year ago

We have decided to not support $0 initial checkouts with the SP payment method.