Paypal Adaptive payment implementation on live environment - paypal

We have implemented Adaptive payment method. This implementation is working fine on sandbox environment. But its showing the following response in Live environment. We are not clear with the response. Can please provide the details about this response.
Response:
{
Array
(["en" class
[send_method] => domestic;icon-uri
[content_ID] => marketing_us/request_money;icon-uri
[amp;from] => PayPal">Sign Up
2" width [label] => xuVFCJezswQQmbe91QM [guid] => ON [script] => 0"/>
escalateTab">Contact
[ ($("#mobile_number").val() !] => ''))
{
validPhoneNumber
[page] => main%3Amktg%3Apersonal%3A%3Ahome%3A%3A%3A
[tmpl] => core2HomeCExp.jsp
[pgst] => Unknown
[lgin] => out
[calc] => f91c2b0c39598
[rsta] => en_US
[md5h] => 7fbf0dfca87f30b51dc1d9cb8dae4318
[shfp] => %7C%7C
[usce] => + [pgtf] => Sparta [s] => ci [aver] => unverified [rstr] => unrestricted [pfid] => f91c2b0c39598
[bzsr] => main [bchn] => mktg [pgsf] => personal [ccpg] => usa [pgld] => Unknown [shir] => main_mktg_personal_" alt [pgrp] => main%3Amktg%3Apersonal%3A%3Ahome )
}

Related

Problems with Paypal and Magento 2 (Migrated from magento 1 with paypal working)

I'm having some problems with Paypal express in magento 2, I've migrated from magento 1, and now all is working, expect for paypal express.
I've debug paypal express and I get what I will post, for what I see the problem is maybe because o the prodcut prices are with tax included.
I've already acomplished to have the price without tax in checkout, but he always get the price with tax, what can I do? I've already disabled "Transfer cart line items".
The log is:
'AMT' => '16.70',
'CURRENCYCODE' => 'EUR',
'INVNUM' => '1000012787',
'SHIPPINGAMT' => '3.75',
'ITEMAMT' => '12.95',
'TAXAMT' => '2.42',
'BUSINESS' => 'rtr',
'NOTETEXT' => NULL,
'EMAIL' => 'info#test.pt',
'FIRSTNAME' => 'ertr',
'LASTNAME' => 'trt',
'MIDDLENAME' => NULL,
'SALUTATION' => NULL,
'SUFFIX' => NULL,
'COUNTRYCODE' => 'PT',
'STATE' => 'PR',
'CITY' => 'rt',
'STREET' => 'tr',
'ZIP' => '2335',
'PHONENUM' => 'rtrtrt',
'SHIPTOCOUNTRYCODE' => 'PT',
'SHIPTOSTATE' => 'PR',
'SHIPTOCITY' => 'rt',
'SHIPTOSTREET' => 'tr',
'SHIPTOZIP' => '2335',
'SHIPTOPHONENUM' => 'rtrtrt',
'SHIPTOSTREET2' => 'trt',
'STREET2' => 'trt',
'SHIPTONAME' => 'ertr trt',
'ADDROVERRIDE' => 1,
'METHOD' => 'SetExpressCheckout',
'VERSION' => '72.0',
'USER' => '****',
'PWD' => '****',
'SIGNATURE' => '****',
'BUTTONSOURCE' => 'Magento_Cart_Community',
'TIMESTAMP' => '2019-09-03T11:20:28Z',
'CORRELATIONID' => '403c3d4df0570',
'ACK' => 'Failure',
'VERSION' => '72.0',
'BUILD' => '53481737',
'L_ERRORCODE0' => '10413',
'L_SHORTMESSAGE0' => 'Transaction refused because of an invalid argument. See additional error messages for details.',
'L_LONGMESSAGE0' => 'The totals of the cart item amounts do not match order amounts.',
'L_SEVERITYCODE0' => 'Error',
Can anyone help me?
Best regards,
Leonel Nunes

How to modify Mediawiki Login form

I'm trying to add the attribute autocomplete="off" in mediawiki login form. Being completely new, I'm unable to find where the form is being built.
I'm using MediaWiki 1.29.1
Any help would be greatly appreciated.
Things I did to find it:
1. Added the following code in LocalSettings.php
$wgHooks['UserLoginForm'][] = 'modifyLoginForm';
function modifyLoginForm( &$template ) {
//Printed template and got the following
/*
UserloginTemplate Object
(
[data] => Array
(
[link] =>
[header] =>
[name] => Admin
[password] =>
[retype] =>
[email] =>
[realname] =>
[domain] =>
[reason] =>
[action] => /mediawiki/index.php?title=Special:UserLogin&action=submitlogin&type=login&returnto=Main+Page
[message] =>
[messagetype] => error
[createemail] =>
[userealname] => 1
[useemail] => 1
[emailrequired] =>
[emailothers] => 1
[canreset] => 1
[resetlink] => 1
[canremember] => 1
[usereason] =>
[remember] =>
[cansecurelogin] =>
[stickHTTPS] =>
[token] => 18955182baa69e0a66edefghi4e0ef
[loginend] =>
[signupend] =>
[usedomain] =>
)
*/
}
Tried to modify includes/templates/Userlogin.php . There is a login form, but it didn't get affected.
Checked LoginSignupSpecialPage.php, but not sure how to add the attribute.

Adaptive Payment Partial Refund Functionality

I am sending the request like below and getting error in response. Please help me what I did wrong. Thanks .
My Request :-
requestEnvelope.errorLanguage=en_US&requestEnvelope.detailLevel=ReturnAll
&payKey=AP-0VR709562K128704J&receiverList.receiver(0).email=buyer#abc.com&receiverList.receiver(0).amount=14.00¤cyCode=GBP
My Response :-
Array
(
[responseEnvelope.timestamp] => 2017-02-24T05:50:55.589-08:00
[responseEnvelope.ack] => Failure
[responseEnvelope.correlationId] => 66bf1bad1aa91
[responseEnvelope.build] => 30051544
[error(0).errorId] => 589037
[error(0).domain] => PLATFORM
[error(0).subdomain] => Application
[error(0).severity] => Error
[error(0).category] => Application
[error(0).message] => The refund's receiver buyer#abc.com wasn't part of the payment request
[error(0).parameter(0)] => buyer#abc.com
)
I got a solution for this. In request We need to send receiver (seller) email not buyer email and it will automatically send refund to the appropriate receiver.
So the answer will be
requestEnvelope.errorLanguage=en_US
&requestEnvelope.detailLevel=ReturnAll
&payKey=AP-0VR709562K128704J
&receiverList.receiver(0).email=api_email#apiemail.com
&receiverList.receiver(0).amount=14.00
¤cyCode=GBP
and we will get the responce like
Array
(
[responseEnvelope.timestamp] => 2017-04-05T07:34:25.622-07:00
[responseEnvelope.ack] => Success
[responseEnvelope.correlationId] => 3a31df57541f3
[responseEnvelope.build] => 31096492
[currencyCode] => GBP
[refundInfoList.refundInfo(0).receiver.amount] => 19.02
[refundInfoList.refundInfo(0).receiver.email] => api_email#apiemail.com
[refundInfoList.refundInfo(0).refundStatus] => REFUNDED
[refundInfoList.refundInfo(0).refundNetAmount] => 18.37
[refundInfoList.refundInfo(0).refundFeeAmount] => 0.65
[refundInfoList.refundInfo(0).refundGrossAmount] => 19.02
[refundInfoList.refundInfo(0).totalOfAllRefunds] => 39.04
[refundInfoList.refundInfo(0).refundHasBecomeFull] => false
[refundInfoList.refundInfo(0).encryptedRefundTransactionId] => 00487139PD976194Y
[refundInfoList.refundInfo(0).refundTransactionStatus] => COMPLETED
)

Get PayPal transaction ID through data served by PayPal IPN (with REST API, not classic)

The PayPal IPN serves the following data:
'mc_gross' => '715.80',
'protection_eligibility' => 'Eligible',
'address_status' => 'unconfirmed',
'item_number1' => '',
'payer_id' => 'UCTG7GEULVxxx',
'tax' => '0.00',
'address_street' => 'Pl 2270',
'payment_date' => '00:35:08 Jul 31, 2014 PDT',
'payment_status' => 'Completed',
'charset' => 'windows-1252',
'address_zip' => '26492',
'mc_shipping' => '0.00',
'mc_handling' => '0.00',
'first_name' => 'Benny',
'mc_fee' => '8.94',
'address_country_code' => 'SE',
'address_name' => 'Benny Andersxxx',
'notify_version' => '3.8',
'custom' => '',
'payer_status' => 'verified',
'business' => 'paypal#xxx.com',
'address_country' => 'Sweden',
'num_cart_items' => '1',
'mc_handling1' => '0.00',
'address_city' => 'Klippan',
'verify_sign' => 'AiJvJDl-VyZzRT4Hq0qB1wSjgCgGAvdLxvQHk79AHsO0AjdeWvSwxxx',
'payer_email' => 'benny.anderxxx#xxx.com',
'mc_shipping1' => '0.00',
'tax1' => '0.00',
'txn_id' => '1M112630L55146xxx',
'payment_type' => 'instant',
'last_name' => 'Andersxxx',
'address_state' => '_0_',
'item_name1' => 'Order xxx.com 2014-07-31',
'receiver_email' => 'paypal#xxx.com',
'payment_fee' => '',
'quantity1' => '1',
'receiver_id' => '4AMCEP9BMPxxx',
'txn_type' => 'cart',
'mc_gross_1' => '715.80',
'mc_currency' => 'EUR',
'residence_country' => 'SE',
'transaction_subject' => '',
'payment_gross' => '',
'ipn_track_id' => '354021aeaxxx',
Is it possible getting through the information above to the transaction id which is required in quite a lot of other API transactions?
Actually, I'm trying to execute a refund via this call:
https://api.paypal.com/v1/payments/sale/{transactionId}/refund
However, I'm still missing the correct ID here and meanwhile I don't have any more ideas how to collect this transaction id (I guess it should look like ""PAY-PT597110X687430LKGECATA") ....
Please keep in mind that I'm using the REST API and not the classic API.
Edit: I don't know why, but every time I edit this article and add a "Hello" at the beginning, it is being deleted after saving :-( Sorry!
The transaction id is found on this line
'txn_id' => '1M112630L55146xxx',
You would need to call this URL with REST (sandbox URL shown, adjust for Live as needed)
https://api.sandbox.paypal.com/v1/payments/refund/1M112630L55146xxx
You can see more details in the API reference
Just got a message from PayPal that refunds are only partially available wioth REST API. I'll now try it with Classic API...
However, it didn't work with the txn_id # Machavity

making Order in Paypal Parallel Express Checkout

I am trying to place Order with Parallel Paypal Express Checkout. Here is the API implementation.
I am using PAYMENTREQUEST_0_PAYMENTACTION => Order in SetExpressCheckout and in DoExpressChecoutPayment and it gives error (this is required).
When I use PAYMENTREQUEST_0_PAYMENTACTION => Order in SetExpressCheckout and PAYMENTREQUEST_0_PAYMENTACTION => Sale in DoExpressChecoutPayment it works.
All goes well until DoExpressChecoutPayment. Please check this
DoExpressCheckoutPayment Request
(
[TOKEN] => EC-4U931568VK402050F
[PAYERID] => BFSU67Z2LX5FJ
[VERSION] => 97.0
[METHOD] => DoExpressCheckoutPayment
[USER] => 'user'
[PWD] => 'pwd'
[SIGNATURE] => 'sig'
[PAYMENTREQUEST_0_PAYMENTACTION] => ORDER
[PAYMENTREQUEST_0_AMT] => 200.00
[PAYMENTREQUEST_0_CURRENCYCODE] => EUR
[PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID] => vendortwo2#yhaoo.com
[PAYMENTREQUEST_0_PAYMENTREQUESTID] => 25935
[PAYMENTREQUEST_1_PAYMENTACTION] => ORDER
[PAYMENTREQUEST_1_AMT] => 22.00
[PAYMENTREQUEST_1_CURRENCYCODE] => EUR
[PAYMENTREQUEST_1_SELLERPAYPALACCOUNTID] => vendorone#yahoo.com
[PAYMENTREQUEST_1_PAYMENTREQUESTID] => 25934
)
and response from this is:
(
[TOKEN] => EC-4U931568VK402050F
[SUCCESSPAGEREDIRECTREQUESTED] => false
[TIMESTAMP] => 2013-09-26T10:08:27Z
[CORRELATIONID] => 2381c85a926e3
[ACK] => Failure
[VERSION] => 97.0
[BUILD] => 7882219
[INSURANCEOPTIONSELECTED] => false
[SHIPPINGOPTIONISDEFAULT] => false
[PAYMENTINFO_0_PAYMENTSTATUS] => Failed
[PAYMENTINFO_0_SELLERPAYPALACCOUNTID] => vendortwo2#yhaoo.com
[PAYMENTINFO_0_SECUREMERCHANTACCOUNTID] => DRM9QQUAG9UNC
[PAYMENTINFO_0_PAYMENTREQUESTID] => 25935
[PAYMENTINFO_0_ERRORCODE] => 10001
[PAYMENTINFO_0_SHORTMESSAGE] => Internal Error
[PAYMENTINFO_0_LONGMESSAGE] => Internal Error
[PAYMENTINFO_0_SEVERITYCODE] => Error
[PAYMENTINFO_0_ACK] => Failure
[PAYMENTINFO_1_PAYMENTSTATUS] => Failed
[PAYMENTINFO_1_SELLERPAYPALACCOUNTID] => vendorone#yahoo.com
[PAYMENTINFO_1_SECUREMERCHANTACCOUNTID] => M7HT95CA3PUCE
[PAYMENTINFO_1_PAYMENTREQUESTID] => 25934
[PAYMENTINFO_1_ERRORCODE] => 10001
[PAYMENTINFO_1_SHORTMESSAGE] => Internal Error
[PAYMENTINFO_1_LONGMESSAGE] => Internal Error
[PAYMENTINFO_1_SEVERITYCODE] => Error
[PAYMENTINFO_1_ACK] => Failure
)
I have asked same question here.
Internal error came because wrong type of account ids are assigned to PAYMENTINFO_0_SELLERPAYPALACCOUNTID and PAYMENTINFO_1_SELLERPAYPALACCOUNTID in DoExpressCheckoutPayment request. Accounts assigned are personal, they should be paypal Business Accounts instead. that was the reason of "Internal Error". Thanks