<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>NemoPS &#187; payment</title>
	<atom:link href="https://nemops.com/tag/payment/feed/" rel="self" type="application/rss+xml" />
	<link>https://nemops.com</link>
	<description>Prestashop Tutorials, Modules and More!</description>
	<lastBuildDate>Wed, 05 Dec 2018 13:25:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.35</generator>
	<item>
		<title>Testing Paypal in PrestaShop</title>
		<link>https://nemops.com/prestashop-paypal-testing/</link>
		<comments>https://nemops.com/prestashop-paypal-testing/#comments</comments>
		<pubDate>Wed, 28 Oct 2015 13:19:11 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[payment]]></category>
		<category><![CDATA[paypal]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[sandbox]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=2593</guid>
		<description><![CDATA[<p>Here is how you can setup a testing (sandbox) environment with Paypal in PrestaShop, before starting to accept real payments! Watch the screencast</p>
<p>The post <a rel="nofollow" href="https://nemops.com/prestashop-paypal-testing/">Testing Paypal in PrestaShop</a> appeared first on <a rel="nofollow" href="https://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Here is how you can setup a testing (sandbox) environment with Paypal in PrestaShop, before starting to accept real payments!<br />
<span id="more-2593"></span></p>
<h2>Watch the screencast</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/ATsUtWH1bWw" frameborder="0" allowfullscreen></iframe><p><a href="https://www.youtube.com/user/NemoPostScriptum/videos" rel="nofollow" title="Subscribe Post Scriptum's Youtube Channel">Subscribe Post Scriptum's Youtube Channel</a></p>	</div>
<p>The post <a rel="nofollow" href="https://nemops.com/prestashop-paypal-testing/">Testing Paypal in PrestaShop</a> appeared first on <a rel="nofollow" href="https://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://nemops.com/prestashop-paypal-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Specific payment methods for virtual products in Prestashop</title>
		<link>https://nemops.com/prestashop-virtual-products-specific-payment/</link>
		<comments>https://nemops.com/prestashop-virtual-products-specific-payment/#comments</comments>
		<pubDate>Tue, 07 Apr 2015 09:39:48 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[downloads]]></category>
		<category><![CDATA[payment]]></category>
		<category><![CDATA[virtual products]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=2364</guid>
		<description><![CDATA[<p>In this quick tip we will see how to enable or disable payment methods for virtual products in Prestashop If you are selling both virtual and normal products, it might be worth displaying your customers specific payment methods depending on what they&#8217;re buying. It&#8217;s useless, for example, to allow them to pay by cash on [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://nemops.com/prestashop-virtual-products-specific-payment/">Specific payment methods for virtual products in Prestashop</a> appeared first on <a rel="nofollow" href="https://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>In this quick tip we will see how to enable or disable payment methods for virtual products in Prestashop</p>
<p><span id="more-2364"></span></p>
<p>If you are selling both virtual and normal products, it might be worth displaying your customers specific payment methods depending on what they&#8217;re buying. It&#8217;s useless, for example, to allow them to pay by cash on delivery something they can download soon after purchase! Similarly, you might want to offer a specific digital payment for virtual products only.</p>
<p>It is important to know that the modification we are about to apply <strong>needs to be made on every single payment module you want to restrict</strong>. This means having to hard-modify core files on older prestashop versions, or using overrides on newer than 1.6.0.11. For simplicity, I will modify core files, but have a look at my tutorial on <a href="http://nemops.com/override-prestashop-modules-core/#.VRlOVfnQqr0" target="_blank" title="how to override Prestashop Modules' core files">how to override Prestashop Modules&#8217; core files</a>.</p>
<div class="separator"></div>
<h2>The hookPayment method</h2>
<p>The simplest way to restrict our payment methods is to modify the method named <strong>hookPayment</strong>, used by every single Prestashop Payment module. It&#8217;s the function responsible of displaying payment methods during the checkout, so hiding them here will prevent people from continuing the purchase with them.</p>
<p>We will use bankwire as an example, but any other will equally do. Since non-standard modules might have their own rules, it&#8217;s better to add these lines of code at the very beginning of the method.</p>
<p>Therefore, open up <strong>modules/bankwire/bankwire.php</strong> (or use overrides), and scroll to the <strong>hookPayment</strong> method, which looks like this:</p>
<pre class="brush: php; title: ; notranslate">

	public function hookPayment($params)
	{

		if (!$this-&gt;active)
			return;
		if (!$this-&gt;checkCurrency($params['cart']))
			return;

		$this-&gt;smarty-&gt;assign(array(
			'this_path' =&gt; $this-&gt;_path,
			'this_path_bw' =&gt; $this-&gt;_path,
			'this_path_ssl' =&gt; Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this-&gt;name.'/'
		));
		return $this-&gt;display(__FILE__, 'payment.tpl');
	}

</pre>
<p>First of all, we need to check which products are in the cart</p>
<pre class="brush: php; title: ; notranslate">
$products = $this-&gt;context-&gt;cart-&gt;getProducts();
</pre>
<p>Then, we loop through them, and see if any is virtual:</p>
<pre class="brush: php; title: ; notranslate">
		$products = $this-&gt;context-&gt;cart-&gt;getProducts();

		if($products)
		{
			foreach ($products as $product) {
				if ($product['is_virtual'])
				{
					// what to do?
				}		
			}
		}
</pre>
<p>It&#8217;s dead easy, isn&#8217;t it? Now we can choose what to do, let&#8217;s try removing bankwire for virtual products!</p>
<pre class="brush: php; title: ; notranslate">
		$products = $this-&gt;context-&gt;cart-&gt;getProducts();

		if($products)
		{
			foreach ($products as $product) {
				if ($product['is_virtual'])
				{
					return false;
				}		
			}
		}
</pre>
<p>What happens now? This will kill the bankwire payment method whenever someone has a virtual product in the cart. It means, of course that it won&#8217;t be accessible even if there are other products there. This might lead to unwanted situations, when no method is available at all.</p>
<p>For example, you have two methods: bankwire, and paypal. You remove bankwire with this method on virtual products, and paypal on others. What happens when a user has both a virtual and normal product in the cart? <strong>No method will be available!</strong> We therefore need to make a choice, whether to leave a warning in the cart page (shopping-cart.tpl) or explore another way.</p>
<p>We might want to only hide the method if <strong>all</strong> products are virtual, for example. How to?</p>
<p>The easiest way is to use $this->context->cart->isVirtualCart(), which will return true if all products in it are virtual. Alternatively, we can do it manually ourselves: </p>
<pre class="brush: php; title: ; notranslate">
	if($products)
	{
		$virtuals = 0;
		foreach ($products as $product) {
			if ($product['is_virtual'])
			{
				$virtuals++;
			}		
		}
		if($virtuals == count($products))
			return false;
	}
</pre>
<p>In this case, we use a counter to check how many virtual products we have. If all of them are virtual, we disable the module! How can we revere it then?</p>
<pre class="brush: php; title: ; notranslate">
		$products = $this-&gt;context-&gt;cart-&gt;getProducts();

		if($products)
		{
			foreach ($products as $product) {
				if (!$product['is_virtual'])
				{
					return false;
				}		
			}
		}
</pre>
<p>This will disable bankwire whenever a non-virtual product is in the cart.</p>
<pre class="brush: php; title: ; notranslate">
	if($products)
	{
		$nonvirtuals = 0;
		foreach ($products as $product) {
			if (!$product['is_virtual'])
			{
				$nonvirtuals++;
			}		
		}
		if($nonvirtuals == count($products))
			return false;
	}
</pre>
<p>While this other will hide it when all products are physical.</p>
<div class="separator"></div>
<h2>Conclusion</h2>
<p>There are many ways to utilize the restriction, depending on your needs (such as even buying a certain number of products!). Just keep in mind that you might end up not having any payment available if you mix up the wrong conditions!</p>
<p>The post <a rel="nofollow" href="https://nemops.com/prestashop-virtual-products-specific-payment/">Specific payment methods for virtual products in Prestashop</a> appeared first on <a rel="nofollow" href="https://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://nemops.com/prestashop-virtual-products-specific-payment/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New Prestashop Payment Module available: paysafecard!</title>
		<link>https://nemops.com/prestashop-payment-module-paysafecard/</link>
		<comments>https://nemops.com/prestashop-payment-module-paysafecard/#comments</comments>
		<pubDate>Thu, 11 Dec 2014 10:46:24 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[payment]]></category>
		<category><![CDATA[paysafecard]]></category>
		<category><![CDATA[prestashop]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=2239</guid>
		<description><![CDATA[<p>paysafecard is Europe&#8217;s most popular and proven online prepaid payment method: This Prestashop payment module lets you pay online simply, quickly and safely Get the module! &#160; No Paysafecard account yet? Get it now! paysafecard lets you pay online as quickly, simply and safely as if using cash. Buy paysafecard at over 450.000 sales outlets [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://nemops.com/prestashop-payment-module-paysafecard/">New Prestashop Payment Module available: paysafecard!</a> appeared first on <a rel="nofollow" href="https://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>paysafecard is Europe&#8217;s most popular and proven online prepaid payment method: This Prestashop payment module lets you pay online simply, quickly and safely<br />
<span id="more-2239"></span></p>
<p><a class="button style1" style="float:left" href="http://store.nemops.com/payment-and-gateways/39-prestashop-paysafecard.html#.VIl04TGjOr0" title="Prestahop payment module: paysafecard. Get it from the addons store">Get the module!</a><br />
&nbsp;</p>
<p><a href="https://affiliates.paysafecard.com/scripts/click.php?partnerProgramId=5486ceadaff53&amp;bid=1af2ec26" target="_blank"><img title="my paysafecard" src="https://affiliates.paysafecard.com/accounts/default1/banners/1af2ec26.gif" alt="my paysafecard" width="728" height="90" /></a><img style="border: 0;" src="https://affiliates.paysafecard.com/scripts/imp.php?partnerProgramId=5486ceadaff53&amp;bid=1af2ec26" alt="" width="1" height="1" /></p>
<p><strong><a title="" href="https://affiliates.paysafecard.com/scripts/click.php?partnerProgramId=5486ceadaff53&amp;bid=1af2ec26" target="_blank">No Paysafecard account yet? Get it now!</a></strong></p>
<p>paysafecard lets you pay online as quickly, simply and safely as if using cash. Buy paysafecard at over 450.000 sales outlets around the world and pay with it at thousands of online shops. You don&#8217;t have to enter any personal information or bank account or credit card details. Your privacy remains completely protected at all times with paysafecard!</p>
<h3><span>Info about the demo</span></h3>
<p>You will be able to see the method but not checkout without any valid test CC on the demo environment. If you want to test out the full functionality, you can ask for a test card by writing me at <a href="mailto:nemo@nemops.com">nemo@nemops.com</a></p>
<h3>Core Features</h3>
<ul>
<li>Plug and play</li>
<li>Test and Production modes</li>
<li><strong>Pre-approved by paysacard: you won&#8217;t need to go through their validation process!</strong></li>
<li><strong>Supports both page redirection and iFrame for the maximum flexibility</strong></li>
</ul>
<p>The post <a rel="nofollow" href="https://nemops.com/prestashop-payment-module-paysafecard/">New Prestashop Payment Module available: paysafecard!</a> appeared first on <a rel="nofollow" href="https://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://nemops.com/prestashop-payment-module-paysafecard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prestashop 101 Day 8: Taxes, Currencies, Payments</title>
		<link>https://nemops.com/prestashop-payments-currencies-taxes/</link>
		<comments>https://nemops.com/prestashop-payments-currencies-taxes/#comments</comments>
		<pubDate>Tue, 11 Nov 2014 10:45:42 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[currencies]]></category>
		<category><![CDATA[payment]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[prestashop 101]]></category>
		<category><![CDATA[taxes]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=905</guid>
		<description><![CDATA[<p>It&#8217;s time to deal with Prestashop Taxes and currencies, and see how to target different taxation areas with the use of tax rules Running Time: 20 mins &#160; Watch the screencast &#8211; 1.6 version Watch the screencast &#8211; 1.5 version &#160; All series&#8217; lessons Prestashop 1.6 Prestashop 1.5</p>
<p>The post <a rel="nofollow" href="https://nemops.com/prestashop-payments-currencies-taxes/">Prestashop 101 Day 8: Taxes, Currencies, Payments</a> appeared first on <a rel="nofollow" href="https://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s time to deal with Prestashop Taxes and currencies, and see how to target different taxation areas with the use of tax rules</p>
<p><span id="more-905"></span></p>
<ul>
<li><strong>Running Time</strong>: 20 mins</li>
</ul>
<div class="separator"></div>
<p>&nbsp;</p>
<h2>Watch the screencast &#8211; 1.6 version</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/KgIg0pSP878#038;feature=youtu.be" frameborder="0" allowfullscreen></iframe><p><a href="https://www.youtube.com/user/NemoPostScriptum/videos" rel="nofollow" title="Subscribe Post Scriptum's Youtube Channel">Subscribe Post Scriptum's Youtube Channel</a></p>	</div>
<h2>Watch the screencast &#8211; 1.5 version</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/-AiobjXp9KU" frameborder="0" allowfullscreen></iframe><p><a href="https://www.youtube.com/user/NemoPostScriptum/videos" rel="nofollow" title="Subscribe Post Scriptum's Youtube Channel">Subscribe Post Scriptum's Youtube Channel</a></p>	</div>
<h3>All series&#8217; lessons</h3>
<h3>Prestashop 1.6</h3>
<ul><li><a href="http://nemops.com/prestashop-101-day-1-installing-prestashop" title="Prestashop 101 Day 1 – Introducing and installing Prestashop">Prestashop 101 Day 1 – Introducing and installing Prestashop</a></li><li><a href="http://nemops.com/prestashop-101-prestashop-configuration" title="Prestashop 101 Day 2 – Basic Prestashop Configuration">Prestashop 101 Day 2 – Basic Prestashop Configuration</a></li><li><a href="http://nemops.com/prestashop-categories-and-products" title="Prestashop 101 Day 3 – Prestashop categories and products">Prestashop 101 Day 3 – Prestashop categories and products</a></li><li><a href="http://nemops.com/prestashop-attributes" title="Prestashop 101 Day 4 – Prestashop attributes combinations">Prestashop 101 Day 4 – Prestashop attributes combinations</a></li><li><a href="http://nemops.com/prestashop-upgrade" title="Prestashop 101 Day 5 – Prestashop Upgrade">Prestashop 101 Day 5 – Prestashop Upgrade</a></li><li><a href="http://nemops.com/prestashop-modules" title="Prestashop 101 Day 6 – Prestashop Modules">Prestashop 101 Day 6 – Prestashop Modules</a></li><li><a href="http://nemops.com/prestashop-shipping-zones-countries" title="Prestashop 101 Day 7 – Prestashop Shipping, Zones and Countries">Prestashop 101 Day 7 – Prestashop Shipping, Zones and Countries</a></li><li>Prestashop 101 Day 8 – Taxes, Currencies, Payments</li><li><a href="http://nemops.com/order-management" title="Prestashop 101 Day 9 – Order Management">Prestashop 101 Day 9 – Order Management</a></li><li><a href="http://nemops.com/prestashop-customers" title="Prestashop 101 Day 10 – Prestashop Customers">Prestashop 101 Day 10 – Prestashop Customers</a></li><li><a href="http://nemops.com/prestashop-discounts-cart-rules" title="Prestashop 101 Day 11 – Prestashop Discounts (Cart rules)">Prestashop 101 Day 11 – Prestashop Discounts (Cart rules)</a></li></ul>
<h3>Prestashop 1.5</h3>
<ul><li><a href="http://nemops.com/prestashop-101-day-1-installing-prestashop" title="Prestashop 101 Day 1 – Introducing and installing Prestashop">Prestashop 101 Day 1 – Introducing and installing Prestashop</a></li><li><a href="http://nemops.com/prestashop-101-prestashop-configuration" title="Prestashop 101 Day 2 – Basic Prestashop Configuration">Prestashop 101 Day 2 – Basic Prestashop Configuration</a></li><li><a href="http://nemops.com/prestashop-categories-and-products" title="Prestashop 101 Day 3 – Prestashop categories and products">Prestashop 101 Day 3 – Prestashop categories and products</a></li><li><a href="http://nemops.com/prestashop-attributes" title="Prestashop 101 Day 4 – Prestashop attributes combinations">Prestashop 101 Day 4 – Prestashop attributes combinations</a></li><li><a href="http://nemops.com/prestashop-upgrade" title="Prestashop 101 Day 5 – Prestashop Upgrade">Prestashop 101 Day 5 – Prestashop Upgrade</a></li><li><a href="http://nemops.com/prestashop-modules" title="Prestashop 101 Day 6 – Prestashop Modules">Prestashop 101 Day 6 – Prestashop Modules</a></li><li><a href="http://nemops.com/prestashop-shipping-zones-countries" title="Prestashop 101 Day 7 – Prestashop Shipping, Zones and Countries">Prestashop 101 Day 7 – Prestashop Shipping, Zones and Countries</a></li><li>Prestashop 101 Day 8 – Taxes, Currencies, Payments</li><li><a href="http://nemops.com/order-management" title="Prestashop 101 Day 9 – Order Management">Prestashop 101 Day 9 – Order Management</a></li><li><a href="http://nemops.com/prestashop-customers" title="Prestashop 101 Day 10 – Prestashop Customers">Prestashop 101 Day 10 – Prestashop Customers</a></li><li><a href="http://nemops.com/prestashop-discounts-cart-rules" title="Prestashop 101 Day 11 – Prestashop Discounts (Cart rules)">Prestashop 101 Day 11 – Prestashop Discounts (Cart rules)</a></li><li><a href="http://nemops.com/prestashop-themes" title="Prestashop 101 Day 12 – Prestashop Themes and visual tweaks">Prestashop 101 Day 12 – Prestashop Themes and visual tweaks</a></li><li><a href="http://nemops.com/prestashop-cms" title="Prestashop 101 Day 13 – Prestashop CMS">Prestashop 101 Day 13 – Prestashop CMS</a></li><li><a href="http://nemops.com/prestashop-seo-and-preferences" title="Prestashop 101 Day 14 – Prestashop SEO and Preferences">Prestashop 101 Day 14 – Prestashop SEO and Preferences</a></li><li><a href="http://nemops.com/prestashop-multistore" title="Prestashop 101 Day 15 – Prestashop Multistore">Prestashop 101 Day 15 – Prestashop Multistore</a></li><li><a href="http://nemops.com/prestashop-employees-and-languages/#.U2f_LPna6r0" title="Prestashop 101 Day 16 – Employees and Languages">Prestashop 101 Day 16 – Employees and Languages</a></li></ul>
<p>The post <a rel="nofollow" href="https://nemops.com/prestashop-payments-currencies-taxes/">Prestashop 101 Day 8: Taxes, Currencies, Payments</a> appeared first on <a rel="nofollow" href="https://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://nemops.com/prestashop-payments-currencies-taxes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
