I'm trying to include some metadata on emails that get sent out on order receipts.
Only certain merchant names seem to be working, such as "Amazon.com", "Ebay.com", and a few others. I want to put in my own. Here's an example:
Google email markup: only certain merchant name works:
%div{:itemscope => "", :itemtype => "http://schema.org/Order"}
%div{:itemprop => "merchant", :itemscope => "", :itemtype => "http://schema.org/Organization"}
%meta{:content => "Amazon.com", :itemprop => "name"}/
I'd like the content part of the name meta tag to be anything I like. Any ideas what I'm doing wrong?
Related
I have multiple websites that use PayPal Buy Now buttons and have PDT enabled.
All of the existing customer websites are working, in that after the user makes a purchase, they are redirected back to their site by PayPal with a return URL that includes the 'cm' parameter as specified here.
I have a new client with a brand new Merchant Account who has their PDT configured correctly (I have checked it multiple times to be sure). However, upon return from PayPal payment, we are missing the 'cm' parameter that is necessary to do validation/updates on our website.
I have never seen this before where some of the variables are getting sent back, but not all as defined in the PayPal documentation above.
Here is an example of a working return URL - (some values edited for privacy purposes only)
.../paypal/pdt?redirect=https://journals.myclient.com/view/journals/cssm/4/1/article-p14.xml?PFTxId=4435&offerProvider=DEFAULT&amt=9.95&cc=USD&cm=mJ5v4sm1PUcD0E9vbii0pm6e1ql5GRs/lv+aQuNuves=%7CaccountId=XXXXX%7COffer ID=7|mc_gross=9.95&item_name=ITEM NAME Dilemma&item_number=/journals/cssm/4/1/article-p14.xml&st=Completed&tx=XXXXXXXXXXXX
Here is the example of the newly created Merchant Account where this is not working
.../paypal/pdt?redirect=https://www.nonworkingclient.org/view/journals/tpmd/s1-1/6/article-p331.xml?PFTxId=40&offerProvider=DEFAULT&PayerID=RPUJELM94HEYU&st=Completed&tx=XXXXXXXXXX&cc=USD&amt=0.01
Here you can see in the comparison, PayPal is returning the 'tx' and 'cc' variables in both examples, but 'cm' is missing from the bottom example.
Has anyone else experienced this lately?
Does anyone know of anything more than the PDT setup that needs to be checked to see why this is failing in the Merchant Account?
Thank you for any assistance.
I have an account that has been set up and working for 3+ years. PDT always returned a "cm" parameter which I pass in as "custom". In the last couple weeks it is hit or miss whether I get "cm" back (can't say exactly when it stopped working as the site has not been used since Spring 2020). About 10% of the time it works but the other 90% no "cm". The response is a bit different in the success and failure cases. Here is an example of a successful return with "cm" (the output is the GET array parameters and values)
(
[feepaid] => Y
[amt] => 75.00
[cc] => USD
[cm] => 586
[item_name] => IW***** Fee
[item_number] => g**5
[st] => Completed
[tx] => 9J5******81R
)
and an example of a failure case (no "cm")
(
[feepaid] => Y
[PayerID] => 9J*******YG
[st] => Completed
[tx] => 3D2*****2457
[cc] => USD
[amt] => 75.00
)
The failure has "PayerID" which does not appear as a valid variable in PDT or IPN spec. Success case has no PayerID but has item_name and item_number (which are fixed in the button definition on PayPal merchant account).
Same here! Paypal no longer return cm paramater for some users
I have created a multistep order form extension which collects some user data and then redirect to different third party solutions for the payment step.
This third party solutions (like PayPal) require a return url to find the way back to my form. So the current workflow looks like this:
My form: collect user data
My form: redirect to payment provider with return url
Payment provider: collect user data for payment
Payment provider: redirect back to my form
My form: show order details with collected data
Payment provider: submit order
My form: redirect to success page
I hope this is comprehensible so far. I stuck into step 4, because every redirect from a payment provider back to my form ends in a 404, because the payment provider add some query string parameters which my form don't know. I think the problem here is that this parameters are not cHash calculated and this is the reason because they fail.
In step 2 I generate the return url of my form, this looks like this:
$returnUrl = $this->uriBuilder
->reset()
->setTargetPageUid($returnPageId)
->setCreateAbsoluteUri(true)
->setSection('form-multistep')
->uriFor('step5', null, 'CouponItem', 'bookingmanager', 'p2');
The generated output looks like this:
https://example.com/coupon/?tx_bookingmanager_p2%5Baction%5D=step5&tx_bookingmanager_p2%5Bcontroller%5D=CouponItem&cHash=565dc2e51a8d43bf3836b43b994e98d0#form-multistep
So this is the url which will be send to different payment providers and if I copy paste this url into my browser this url is working, BUT the payment providers manipulate this url and add some custom query string parameters to it before they redirect.
For example PayPal add the following query string parameters:
paymentId, token and PayerID
So the generated redirect url from PayPal to my form looks like:
https://example.com/coupon/?paymentId=XXXXXX&token=XXXXXX&PayerID=XXXXXX&tx_bookingmanager_p2%5Baction%5D=step5&tx_bookingmanager_p2%5Bcontroller%5D=CouponItem&cHash=565dc2e51a8d43bf3836b43b994e98d0#form-multistep
And this url ends in a 404 because I think the cHash is not valid for this manipulated url anymore or am I wrong?
Furthermore I have tried to predefine this parameters, like so:
$returnUrl = $this->uriBuilder
->reset()
->setTargetPageUid($this->settings['returnPageId'])
->setCreateAbsoluteUri(true)
->setSection('form-multistep')
->setArguments(['paymentId' => '', 'token' => '', 'PayerID' => ''])
->uriFor('step5',null,'CouponItem','bookingmanager','p2');
If I do something like that then the redirect from PayPal to my form is working, BUT unfortunately not as expected, because PayPal don't know that the parameters already exist in the given return url and still add this parameters again, so the generated url looks like:
https://example.com/coupon/?paymentId=&token=&PayerID=&tx_bookingmanager_p2%5Baction%5D=step5&tx_bookingmanager_p2%5Bcontroller%5D=CouponItem&cHash=bf642fb35a66033689b7d4ff772b3cf9#form-multistep&paymentId=XXXX&token=XXXX&PayerID=XXXX
Furthermore I can't access the query string parameters which PayPal added to the url :(. So I have tried something like this:
$returnUrl = $this->uriBuilder
->reset()
->setTargetPageUid($this->settings['returnPageId'])
->setCreateAbsoluteUri(true)
->setSection('form-multistep')
->uriFor('step5',null,'CouponItem','bookingmanager','p2');
$this->uriBuilder
->reset()
->setTargetPageUid($this->settings['returnPageId'])
->setCreateAbsoluteUri(true)
->setSection('form-multistep')
->setArguments(['paymentId' => '', 'token' => '', 'PayerID' => ''])
->uriFor('step5',null,'CouponItem','bookingmanager','p2');
So I have sent the "normal" return url (with only my extension parameters) to PayPal and register a second url with the uri builder to get the redirect from PayPal to my form working (this already seems to be bad).
So the redirect to PayPal through my form and the redirect from PayPal back to my form is working, BUT now I got the same problem as my last try. I got the right parameters in my URL, but I can't access them:
DebuggerUtility::var_dump(GeneralUtility::_GET());
array(3 items)
tx_bookingmanager_p2 => array(2 items)
action => 'step5' (5 chars)
controller => 'CouponItem' (10 chars)
cHash => 'cbe7c08c1a45e85404a06877c453cb63' (32 chars)
id => '175' (3 chars)
So how can I allow custom query string parameters which are generated by a third party app for a specific controller action?
You need to exclude those parameters from cHash.
In the InstallTool you will find a value for
$GLOBALS['TYPO3_CONF_VARS']['FE']['cHashExcludedParameters']
where you enter the list of paramters (comma separated) you do not want to be consiered in the cHash.
I have a question concerning the Laravel 4.1 validators.
$validator = Validator::make(
array('name' => 'Dayle'),
array('email' => 'required|min:5|unique:users')
);
Is it possible to call a specific validation error for the case when the entered email is not unique? Reading the docs I only saw that one is able to define the error message if the validation for 'email' fails. However, if someone enters an email address but this one is already in the database it would be awesome to show the user exactly that he passed "required" but did not pass "unique".
The third parameter of Validator::make() lets you pass in an array of messages. More on this here: http://laravel.com/docs/validation#custom-error-messages
As it says in the above link, you can specify field-and-rule-specific messages by using the dot syntax email.unique. In your case this would be:
$validator = Validator::make(
array('name' => 'Dayle'),
array('email' => 'required|min:5|unique:users'),
array('email.unique' => 'This email is already being used by another user.'),
);
We are using Paypal rest api to process payment on your site. After successfully Payment::execute, I receive the payment information (with state approved) and when I dump the $payment->getPayer() I get the following
object(PayPal\Api\PayerInfo)[949]
private '_propMap' (PayPal\Common\PPModel) =>
array (size=4)
'email' => string 'paypal-buyer#example.com' (length=23)
'first_name' => string 'Buyer' (length=5)
'last_name' => string 'Buyer' (length=5)
'payer_id' => string 'XXXXXXXXXXX' (length=13)
as you can see there is no shipping address. is this a limitation of the REST api?
Yes, we do not currently return the shipping address of a buyer unless a shipping address was passed in the initial /payment request made by you (which means that, obviously, you would already have the shipping address).
We're adding functionality to return the shipping address in other scenarios in the future, though I don't have a fixed date for this for you.
I am using a Wrapper from http://sourceforge.net/projects/php-aws-ses/
I am not able to send Email Headers with
From: Name <email#example.com>
Is there any way we can send headers using amazon ses. Any other PHP Wrapper you recommend which allows us to do that?
Change the FROM Variable to something like this
$m->setFrom(" Name <info#gitgrow.com>");
For the new API SDK (v2) you can use:
$client->sendMail( array(
'source' => 'Name <a#b.c>',
....
)
);
Basically if you want to include the name, the source must have the name followed by the email id and importantly, the email id must be enclosed in < and >