6

The error messages are returned to the template as flash messages. Handling those is documented here: https://craftcms.com/docs/templating/craft.session One thing to watch out for is that flash messages are only available once, and are by default 'consumed' when you retrieve them: {{ craft.session.getFlashes() }} ...some other template code here.... {{ ...


2

You wouldn't need to dynamically change the Stripe credentials on the Stripe payment method, rather it is more likely you would set up a seperate Stripe payment method for each Stripe account. It is a little known feature that you can set up more than one payment method per gateway with different credentials. You could then hard code the payment method ...


2

Depends on your requirements, but seems like you'd just be able to use the standard PayPal checkout button for this, no? https://www.paypal.com/us/webapps/mpp/paypal-payments-standard


2

There is most likely some error in your configuration, or what you're sending to the cart. The following code (when in devMode) will show you any errors that are coming back from Commerce/Paypal when you're redirected back to the cart: {# SHOW ANY ERRORS IF THERE ARE ANY! #} {% if craft.config.devMode and (craft.session.hasFlash('commerce') or craft....


2

Welp... I feel like an idiot. It wouldn't let it through because I didn't set the endpoints found at https://craftcommerce.com/docs/payment-gateways


2

There are a variety of ways you can solve this depending on your needs. One possible way would be to assign users to groups and then use simple twig code to limit the shown payment options at the template level depending on which user (i.e which user of which group) is viewing the page. In addition, some validation logic in a custom plugin should ...


2

Commerce 1: {% set paymentMethod = null %} {% for pm in craft.commerce.paymentMethods %} {% if pm.id == 2 %}{% set paymentMethod = pm %}{% endif %} {% endfor %} {{ paymentMethod.name }} Commerce 2: {{ craft.commerce.gateways.getGatewayById(2).name }}


2

You want to look at Commerce's 'manual' gateway. This is a gateway that let's you receive unpaid orders, which you can then process as you see fit, including manually 'capturing' the payment when it is ultimately made. We use this to e.g. offer a mechanism for people to pay by direct bank deposit - we just leave the orders in a 'holding' status until the ...


1

Have you tried looking at commerce.log in storage/logs? (With Craft 3/Commerce 2 there is no commerce.log - you'll need to comb through the general web.log)


1

Commerce 2 moved all payment gateways to plugins. You can see the relevant bit in the docs here: https://docs.craftcms.com/commerce/v2/payment-gateways.html There are currently seven 1st party plugins that add payment gateways and the two most popular, Stripe and PayPal are free. You can see the table for the remaining in the above link. All of these are ...


1

That error is from the cart service when trying to set the payment method ID on the cart during payment. There are 2 possible reasons the error would appear: 1) The payment ID you are submitting is wrong <input type="hidden" name="paymentMethodId" value="theIDhere"/> 2) In the settings (for a correctly submitted payment ID), the "Enabled to select ...


1

Craft Commerce uses Omnipay for its payment processing library. Here's a list of the Omnipay officially supported 1st party gateways: https://github.com/thephpleague/omnipay#payment-gateways Omnipay: Paypal says it supports these Paypal services: PayPal_Express (PayPal Express Checkout) PayPal_ExpressInContext (PayPal Express In-Context Checkout) ...


1

For those interested, here was the solution: The payment method for Authorize.net wasn't completely filled in; there was no endpoint set. Thus, it was of course failing when it sent the curl request, because there was no protocol, domain, or anything else other than the query string for the payment form. Providing the payment method with an endpoint in the ...


1

Craft Commerce 1.2.1238 added support for the REST based Multi-Safepay gateway.


1

A no one has come forward and told me it's a bad idea, I've ploughed on and done the following: Created my own Controller action in my plugin to bypass the payment side of things altogether. I didn't use Omnipay to create my Customer on Stripe in the end. I went with using Stripes own API directly as documented here. To complete the Order (as-in convert a ...


Only top voted, non community-wiki answers of a minimum length are eligible