Paypal payment pro PayPal express order not sending confirmation email in Magento - magento-1.9

I have a very long standing issue with PayPal Payments Pro in magento. If a customer places an order using PayPal express they don't receive the order email. If a customer pays with card they get it with no problems.
I have spent a lot of time investigating this with no joy at all. I am wondering if other people have had the same issue and if anyone has managed to solve it. I am running magento community 1.9.2.
The IPN seems to be working properly, and there are no orders in the email que.
Any help would be gratefully appreciated.

PayPal Payment Pro not send confirmation email facility.But you can achieve it by creating observer after payment receive.
You may use event checkout_onepage_controller_success_action. This can be used if your order success.
There is another event sales_order_payment_pay. This can be used if your order success. It may also use in your case.
1 ) Make custom config.xml for call observer file
The config.xml defines your module and declares your event listener for a given event (checkout_onepage_controller_success_action is sent when onepage checkout process is complete, sales_order_payment_pay is sent when the payment has been confirmed).
<?xml version="1.0"?>
<config>
<modules>
<Namespace_Modulename>
<version>0.1.0</version>
</Namespace_Modulename>
</modules>
<frontend>
<events>
<sales_order_payment_pay>
<observers>
<Namespace_Modulename_Customevent>
<type>singleton</type>
<class>Namespace_Modulename_Model_Observer</class>
<method>customFunction</method>
</Namespace_Modulename_Customevent>
</observers>
</sales_order_payment_pay>
</events>
</frontend>
</config>
2 ) create observer.php file inside your module/Model directory and paste this code
<?php
class Namespace_Modulename_Model_Observer
{
public function customFunction(Varien_Event_Observer $observer)
{
$order_id = $observer->getData('order_ids');
$order = Mage::getModel('sales/order')->load($order_id);
//your code here
}
}
Hope It's helpful for you.

Related

.ASPX: How do I restrict web access to logged on users only?

► Problem: Anyone can access a webpage, but I only want logged in users to be authorized to access it.
Background:
Web Server = IIS 8
Server OS = Windows Server 2012
Framework = .NET 4.5
Environment = .\WebFolder\logon.aspx, .\WebFolder\inside.html
Website = Simple logon page ("logon.aspx") that guards an html page ("inside.html").
Users = External people (ie, non-intranet)
Sample URLs:
A. "www.webpage.com/logon.aspx"
B. "www.webpage.com/inside.html"
Desired Outcome:
Everyone can access the "logon.aspx" page
Only logged on users can access the "inside.html" page
Any direct attempts to access "B" will trigger a redirect to "A"
No additional use of program code
Prior Attempts:
I've been fiddling with the web.config file (authentication & authorization), but to no avail (501 Server Error, 401 Authorization Error, Runtime Application Error).
Web.Config File:
<system.web>
<authentication>
<forms name=".ASPXFORMSAUTH" loginUrl="logon.aspx" protection="All" timeout="1" path="/" slidingExpiration="true" requireSSL="false" />
</authentication>
<authorization></authorization>
</system.web>
Bottom line: I'm sure this is a very basic/easy thing to configure, it's just that I haven't been able to do it so far. Plus, I do not want to write any additional code in order to accomplish a seemingly fundamental task.
Thanks in advance!
Okay, I figured it out (after 7 hours). It requires four things (based on the example file structure):
1. Using the FormsAuthentication module
VS2012 → Project → Your credentials/authentication code → Use FormsAuthentication.RedirectFromLogin(_var1_, _var2_) instead of Response.Redirect(inside.html)
2. Adding a new node in the web.config file
<system.webServer><handlers><add name="HTMLHandler" type="System.Web.StaticFileHandler" path="*.html" verb="GET" /></handlers>
3. Including the 'defaultUrl' attribute in the Forms tag
<forms name=".ASPXFORMSAUTH" loginUrl="logon.aspx" defaultUrl="inside.html" protection="All" timeout="1" path="/" slidingExpiration="false" requireSSL="false" />
4. Adding a location tag authorization restriction to the 'web.config' file
<location path="inside.html"><system.web><authorization><deny users="?" /></authorization></system.web></location>
See my comments (below) for an explanation of each of these four pieces.

EWS Partial sync soap request returns organizer name as appointment subject

I am currently working on a project where the system, which is a node.js web server subscribes to push notification for changes in the resource calendars of an Exchange server. We followed the MSDN documentation to subscribe and communicate with the Exchange server using SOAP requests.
We used SOAP request below to fetch the changes and store them in the local database of the web server. The '+roomCalId' and '+syncState+' values are replaced with room calendar Id and its corresponding sync state which are stored previously in the database when subscribing.
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<t:RequestServerVersion Version="Exchange2013"></t:RequestServerVersion>
<t:TimeZoneContext>
<t:TimeZoneDefinition Name="UTC" Id="UTC"></t:TimeZoneDefinition>
</t:TimeZoneContext>
<t:ExchangeImpersonation>
<t:ConnectingSID>
<t:PrimarySmtpAddress>+roomCalId+</t:PrimarySmtpAddress>
</t:ConnectingSID>
</t:ExchangeImpersonation>
</soap:Header>
<soap:Body>
<m:SyncFolderItems>
<m:ItemShape>
<t:BaseShape>AllProperties</t:BaseShape>
</m:ItemShape>
<m:SyncFolderId>
<t:DistinguishedFolderId Id="calendar" />
</m:SyncFolderId>
<m:SyncState>+syncState+</m:SyncState>
<m:MaxChangesReturned>500</m:MaxChangesReturned>
<m:SyncScope>NormalItems</m:SyncScope>
</m:SyncFolderItems>
</soap:Body>
</soap:Envelope>
The process worked perfectly without any problems for the first few calendars. However, for newly created room calendars, the soap request above returns the organizer's name as appointment title instead of the actual title. Is there a reason why this might be happening?
Thats is a default setting on Room mailboxes where the Organiser name is used to replace the Subject of a Meeting. This is done for security reasons as most people have access to Meeting rooms but generally people like HR might not want people to see the subject of the meeting (eg meeting to talk about downsizing etc). You can change this setting using the Set-CalendarProcessing cmdlet https://technet.microsoft.com/en-us/library/dd335046(v=exchg.160).aspx and the AddOrganizerToSubject parameter

How to include a simple tax calculator in Broadleaf ecommerse

Im trying to create a poc with broadleaf ECommerce to develop a simple tax calculator .
I tried with whats explained on
broadleaf doc simple calculator but when i login on admin pannel its showing "No values found for this enumeration".
Can anyone please help me how to setup this...
The simple tax calculator included in the Broadleaf out of the box is not configurable in the admin. If you are talking about the 'Tax Code' field on Product and Category, that is configurable via data driven enumerations, but deciding what meaning the different tax codes have is a customization.
The data driven enumeration table is BLC_DATA_DRVN_ENUM. The admin will look up the values (in the BLC_DATA_DRVN_ENUM_VAL table) for the data driven enumeration who's key is TAX_CODE.
Again, the SimpleTaxProvider from the doc that you linked makes no use of this tax code and instead relies on Spring XML bean configuration.

How to include pom version number into Jenkins e-mail notification?

How to include pom version number into Jenkins e-mail notification?
This is to notify test team about a sucessful build and the build version. For now, we can only send a generic e-mail without any useful content in it.
I have tried the following but none of those sucess.
grep and export in a post build step but I can't pass that into the e-mail notification plugin
(.*) annotation but it dosen't work for the plugin.
Anyone have any idea?
You may use Extended Email Notification plugin that can parse your build log using regular expressions.
When you install the plugin you first configure its default behavior on the main Jenkins configuration page. Then you customize it per job: go to Post-Build Actions and check 'Editable Email Notification' box. Use 'Content Token Reference' help button to get the tokens you may use. Among them will be BUILD_LOG_REGEX token with the explanation on its usage.
So what you may do is to output your POM via the build log in some easily parseable form and then parse it out using BUILD_LOG_REGEX into your e-mail.
Here's an actual test build (for Windows) that echoes boo_$BUILD_ID_foo line to the output, the plugin parses out that line and sends an email that looks like this:
Here we go, Joe:
boo_2012-01-30_23-04-29_foo
config.xml for the job:
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.scm.NullSCM"/>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers class="vector"/>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.BatchFile>
<command>echo boo_%BUILD_ID%_foo
</command>
</hudson.tasks.BatchFile>
</builders>
<publishers>
<hudson.plugins.emailext.ExtendedEmailPublisher>
<recipientList>youemail#company.com</recipientList>
<configuredTriggers>
<hudson.plugins.emailext.plugins.trigger.FailureTrigger>
<email>
<recipientList></recipientList>
<subject>$PROJECT_DEFAULT_SUBJECT</subject>
<body>$PROJECT_DEFAULT_CONTENT</body>
<sendToDevelopers>false</sendToDevelopers>
<includeCulprits>false</includeCulprits>
<sendToRecipientList>true</sendToRecipientList>
</email>
</hudson.plugins.emailext.plugins.trigger.FailureTrigger>
<hudson.plugins.emailext.plugins.trigger.SuccessTrigger>
<email>
<recipientList></recipientList>
<subject>$PROJECT_DEFAULT_SUBJECT</subject>
<body>$PROJECT_DEFAULT_CONTENT</body>
<sendToDevelopers>false</sendToDevelopers>
<includeCulprits>false</includeCulprits>
<sendToRecipientList>true</sendToRecipientList>
</email>
</hudson.plugins.emailext.plugins.trigger.SuccessTrigger>
</configuredTriggers>
<contentType>text/plain</contentType>
<defaultSubject>$DEFAULT_SUBJECT</defaultSubject>
<defaultContent>Here we go, Joe:
${BUILD_LOG_REGEX, regex="^boo.*?foo.*?$",showTruncatedLines=false}
</defaultContent>
</hudson.plugins.emailext.ExtendedEmailPublisher>
</publishers>
<buildWrappers/>
</project>
Just use the following property:
${POM_VERSION}

How can I find out how a build was triggered in Jenkins

I'm trying to update Jelly scripts in my Jenkins setup to email the reason for a build (the build trigger), but I can't find any documentation on this.
I know it should be available, as the build's page will show the information, but I want it to be displayed on the email being distributed.
Does anyone know if there is a var I can query, or a Jenkins API call I can call to get this?
You can do it by calling this API.
More convinient, in env var setted before the build, you'll find BUILD_URL :
BUILD_URL=https://jenkins-server.tld/job/JOBNAME/BUILD_NUMBER
So you just need to append /api/json. You can also got it in xml :
<freeStyleBuild>
<action>
<cause>
<shortDescription>Started by user kenji</shortDescription>
<userName>kenji</userName>
</cause>
</action>
<action/>
<action/>
<action>
<failCount>0</failCount>
<skipCount>0</skipCount>
<totalCount>1</totalCount>
<urlName>testReport</urlName>
</action>
<building>false</building>
<duration>9772</duration>
<fullDisplayName>JOBNAME #4</fullDisplayName>
<id>2011-08-10_11-19-42</id>
<keepLog>false</keepLog>
<number>4</number>
<result>SUCCESS</result>
<timestamp>1312967982296</timestamp>
<url>https://jenkins-server.tld/job/JOBNAME/4/</url>
<builtOn>macboo</builtOn>
<changeSet>
<kind>svn</kind>
<revision>
<module>https://svn-server.tld/JOBNAME/trunk</module>
<revision>7</revision>
</revision>
</changeSet>
</freeStyleBuild>