help with PayPal gateway #967
-
Hello. I am not new to statamic but new to statamic > v2. I am also not completely new to PayPal checkout. But I admit, I am stuck. Installed statamic with the SC starter kit. Added a product. populated the .env with client id etc. I only want to have customers buying stuff (in my case, fine Italian espresso coffee beans) from my (hopefully simple) website. Can anyone please head me into some good doc direction where I find: checkout, sc:checkout, sc:paypal:checkout: where do I configure that clicking the PayPal button, customer is directed to PayPal (offsite-payment sounds fine to me), pays – and comes back. I had to remove the {site_url} variable in the button's a-href and add my site's url "hard-coded" in the file resources/views/checkout/gateways/_paypal.antlers.html - then the button works. Is this intended or is something in my system config wrong that {site:url} is not rendered out? now I search where I can edit the address page so it changes from uk-default to Germany. and additionally I will need to translate the English texts into German. Is there a good way with t() or such syntax? I hope there are not way too obvious questions :) I hope, this is read by some knowing person :) – and no, I did to pay for the license yet as I am wondering whether I will be able to get a first sandbox or production transaction running. but after that I will buy! Thank you so much! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey 👋 I haven't touched PayPal in a while but should hopefully be able to answer your Simple Commerce questions 😄
By the sounds of it, PayPal is the only payment gateway you're going to be integrating. If that's the case, you should be able to follow these steps: On the final page of your checkout process (that might be when customers enter their details or pick the shipping method, etc), you want to make sure they get redirected to a template which just has these contents: {{ sc:checkout:paypal redirect="/checkout/complete" }} The If you've never setup a route which points to a template before, here's an example of how you'd define the route: https://github.com/duncanmcclean/sc-starter-kit/blob/main/routes/web.php#L29 For further details, you can find instructions on using PayPal as an "offsite gateway" in the docs (see here).
Removing that should be fine. I added that to lots of links to fix some multi-site issues but I think it's unitentionally caused other issues. I've got it on my list to do some tweaking. 👍
You can change the default country by adjusting these two lines: https://github.com/duncanmcclean/sc-starter-kit/blob/main/resources/views/checkout/information.antlers.html#L126-L127 In regards to translations, Statamic provides a
No worries. Like Statamic itself, you're not required to purchase a license until your site goes live. |
Beta Was this translation helpful? Give feedback.
Looks like there's a missing partial in the starter kit - if you create
resources/views/components/image.antlers.html
, the error should go away. You can then add Antlers templating into the partial.