Magento - How can I pass UserId instead of OrderId to ADYEN SKIN - magento

I'm using adyen to pay by credit cards and I notice that when the user pays, the module on Magento passes the order id as MerchantReference to Adyen.
In order to activate the "remember my data" during the payment using adyen SKIN, I need to pass the UserId and not the orderId.
Any suggestion how to solve it?
--- More info ---
This is the specific module: http://www.magentocommerce.com/magento-connect/adyen-payment.html
And, this is the form example that we generate for the payments on Adyen, in another environment. As you can see, the merchantReference is an unique value, which identify the first user payment. This values is calculated using UserId, so we could identify the user for his next payments.
I should need to know where the plugin Adyen (for Magento) generate this form, so I could change the merchantReference parameter using UserId and not OrderId
<form action="https://test.adyen.com/hpp/pay.shtml"
method="post" id="gatewayPaymentForm">
<input type="hidden" name="merchantReference" value="Ajx">
<input type="hidden" name="paymentAmount" value="2900">
<input type="hidden" name="currencyCode" value="EUR">
<input type="hidden" name="shipBeforeDate" value="2013-02-03">
<input type="hidden" name="skinCode" value="XDFGG">
<input type="hidden" name="merchantAccount" value="NameAccount">
<input type="hidden" name="shopperLocale" value="es">
<input type="hidden" name="sessionValidity" value="2013-01-31T16:35:31+01:00">
<input type="hidden" name="merchantSig" value="bcbXNhsd">
<input type="hidden" name="shopperEmail" value="asd#gmail.com">
<input type="hidden" name="shopperReference" value="5">
<input type="hidden" name="recurringContract" value="ONECLICK">
</form>
Thank you

Already solved, we modified the file: /Madia/Adyen/Model/Adyen/Hpp.php
//To identify and remind user data with mail.
$adyFields['shopperReference'] = $customerEmail;
It works for us.

Related

Email subscription form in octobercms

I am using Email Subscription Form plugin. When I enter the email address in the form and click the submit button, the submitted email appears in the url and it redirects to the same page. I did the configuration as mentioned in the documentation but it is not working. Neither the subscription list is updated nor it shows the userProfile page.
<form name="form-subscribe-andradedev" id="form-subscribe-andradedev" data-request="formSubscribe::onAddSubscriber" data-request-update="'formSubscribe::alert': '#result'">
<input type="email" class="form-control" name="email" placeholder="* Email" required>
<input type="hidden" name="latitude" id="latitude">
<input type="hidden" name="longitude" id="longitude">
</form>
Reads like you need {% frameworks extras %} loading in the template somewhere. You also need the jquery loaded before that.

How to implement paypal recurring payment with using IPN in codeigniter

Hii I am using paypal recurring payment in codeigniter. But i want to use IPN inside this. Here is my form in a view file.
$paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
$merchant_email = 'futureloop#merchent.com';
<form name="_xclick" action="<?php echo $paypal_url;?>" method="post">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="<?php echo $merchant_email; ?>">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="no_shipping" value="1">
<input type="image" src="http://www.paypal.com/en_GB/i/btn/x-click-but20.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="a3" value="54.00">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="D">
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
</form>
How can i use IPN inside this in codeigniter?
Please help me.
checkout below documentation link where you can setup for IPN and also you will get same code for PHP regarding how to listen IPN data and how process it.
https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNIntro/
For listening paypal IPN
https://github.com/paypal/ipn-code-samples/blob/master/paypal_ipn.php

How to properly internationalize a Sinatra page?

I have a Sinatra route file, which displays some page.
<h2>Free, open song contest</h2>
<h3>Sign up</h3>
<form action="/signup" method="post">
E-mail: <input type="text" name="email" placeholder="Your e-mail"><br/>
Password: <input type="password" name="password"><br/>
Repeat password: <input type="password" name="password2"><br/>
Account type: <input type="radio" checked="true" name="type" value="fan">Fan
<input type="radio" name="type" value="musician">Musician
</form>
<h3>Log in</h3>
<form action="/login" method="post">
E-mail: <input type="text" name="email" placeholder="Your e-mail"><br/>
Password: <input type="password" name="password"><br/>
</form>
If I wanted to internationalize all string in this page (Free, open song contest, Sign up, E-mail etc.), what is the correct way to do this?
I found this i18n recipe, but it doesn't tell, how to insert the internationalized strings into the template (home.erb in the above example).
In the same documentation page, it later says:
Selection of localized strings/objects is easy as it only requires use
of standard methods from I18n
I18n.t(:token)
I18n.l(Time.now)
So, you need to do:
<h2>I18n.t(:contest_page_title')</h2>
And, in your locales/en.yml, you will have:
en:
contest_page_title: Free, open song contest
Since the i18n gem is also used in Rails, basic aspects of internationalization can also be inferred from Rails guide

Why is PayPal ignoring discount_amount_cart?

I have been using PayPal Payments Standard. Everything has been working great. Now I want to add support for coupon discounts.
According to the documentation, the discount_amount_cart variable appears to be what I want:
Single discount amount charged cart-wide.
It must be less than the selling price of all items combined in the cart. This variable overrides any individual item discount_amount_x values, if present.
Applies only to the Cart Upload command.
So, I add the variable to my form:
<form id="Paypal" name="Paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input id="cmd" name="cmd" type="hidden" value="_cart">
<input id="upload" name="upload" type="hidden" value="1">
<input id="business" name="business" type="hidden" value="kelly#hopskipdesign.com">
<input id="custom" name="custom" type="hidden" value="Client">
<input id="discount_amount_cart" name="discount_amount_cart"
type="hidden" value="$4.00">
<input id="tax_cart" name="tax_cart" type="hidden" value="$1.65">
<input id="currency_code" name="currency_code" type="hidden" value="USD">
<input id="return" name="return" type="hidden" value="http://www.hopskipphotography.com/Order/Confirm/Client">
<input id="cancel_return" name="cancel_return" type="hidden" value="http://www.hopskipphotography.com/Order/Cart/Client">
<input id="cbt" name="cbt" type="hidden" value="Place Order">
<input id="item_name_1" name="item_name_1" type="hidden" value="Photo #6">
<input id="amount_1" name="amount_1" type="hidden" value="$20.00">
<input id="item_number_1" name="item_number_1" type="hidden" value="B49A8382">
<input id="quantity_1" name="quantity_1" type="hidden" value="1">
<input id="item_name_2" name="item_name_2" type="hidden" value="Photo #10">
<input id="amount_2" name="amount_2" type="hidden" value="$20.00">
<input id="item_number_2" name="item_number_2" type="hidden" value="B49A8428">
<input id="quantity_2" name="quantity_2" type="hidden" value="1">
<div class="checkout-button">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" alt="Check out with PayPal">
</div>
</form>
But when I click the button, everything appears except the discount:
I found a similar question where the answer was to use the tax_cart variable instead of tax_x. But I was already using tax_cart.
Any other ideas as to why discount_amount_cart is not working?
Unlike other amount variables, discount_amount_cart does not like dollar signs.
When I changed the field to:
<input id="discount_amount_cart" name="discount_amount_cart"
type="hidden" value="4.00">
PayPal displayed the discount:

Editing Magento Checkout Form

On clicking "place order" in Magento, I want to capture some of its values and feed them to the following form:
<form method="post" action="https://www.jambopay.com/JPExpress.aspx" target="_blank">
<input type="hidden" name="jp_item_type" value="cart"/>
<input type="hidden" name="jp_item_name" value="test shop"/>
<input type="hidden" name="order_id" value="455879"/>
<input type="hidden" name="jp_business" value="business#yourdomain.com"/>
<input type="hidden" name="jp_amount_1" value="51"/>
<input type="hidden" name="jp_amount_2" value="0"/>
<input type="hidden" name="jp_amount_5" value="0"/>
<input type="hidden" name="jp_payee" value="email#yourcustomer.com"/>
<input type="hidden" name="jp_shipping" value="company name"/>
<input type="hidden" name="jp_rurl" value="http://www.yourwebsite.com/testpost/Result.aspx?ii=0"/>
<input type="hidden" name="jp_furl" value="http://www.yourwebsite.com/testpost/Result.aspx?ii=1"/>
<input type="hidden" name="jp_curl" value="http://www.yourwebsite.com/testpost/Result.aspx?ii=2"/>
<input type="image" src="https://www.jambopay.com/jambohelp/jambo/rsc/paymentsbyJamboPay.jpg"/>
</form>
The values include:
Order Number,
Total Amount,
Customers Email Address,
How do i do this?
You can get value of order after save order is called you can get last order id from this methods
$orderId = Mage::getSingleton('checkout/session')->getLastOrderId();
once you have order id then load order like this
$order = Mage::getModel('sales/order')->load($orderId);
and you can get all details of order

Resources