EzDevInfo.com

paypal-express

Ruby Gem for PayPal Express Checkout API

Error Code: 12114 Invalid Item URL. Transaction refused because of an invalid argument

We use PayPal Express (along with other Gateways) in our ASP.Net Application. It is working fine, and we even received an order this morning via PayPal Express successfully.

However, one of our customer receives the following error message while checking out -

Invalid Item URL. Transaction refused because of an invalid argument. Error Code: 12114

Unfortunate, I could not find 12114 error code in API Error and Warning Codes

I'm wondering what might cause that error except from what is stated about.


Source: (StackOverflow)

Problems With Paypal Express Checkout Integration (WEBREQUEST)

So I was struggling with making head or tail out of the PayPal documentation and always felt that something was not right with my Webrequest.

So I stripped all the code back to basic and simply submitted the request via HTTP and the PLUS side is that I now get a response back from the PayPal sandbox server where ACK=Success and TOKEN=Valid-token-value-here there are some other variables returned too, such as CORRELATIONID and TIMESTAMP.

And hence so I tried some of the webrequest samples and I simply get a blank screen instead of being redirected to Paypal for the (sandbox) customer to complete payment.

So if anyone can post their WebRequest method that would be great.

Here is the code I used for my webrequest, I'm sure its wrong but cannot pinpoint where it is going wrong.

Also, when I run the code on my localhost during debugging, everything works fine and the call is completed with SUCCESS and a TOKEN is received.

When I run it live, I recieve Error Number 5 in the Error exception and also the text `Remote host failed to connect' in the STATUS DESCRIPTION.

THIS IS THE UPDATED CODE

Function MakeWebRequest(ByVal pUseSandbox As Boolean, ByVal pRequestMethod As String, ByVal pReturnUrl As String, ByVal pCancelUrl As String, ByRef pRtnStatus As String, ByRef pRtnStatusId As HttpStatusCode, ByRef pRtnResponseString As String) As Boolean
'
Dim _sxHost As String = Nothing
Dim _sxEndpoint As String = Nothing
Dim _sxNameValCol As System.Collections.Specialized.NameValueCollection = Nothing
Dim _sxResponseCol As System.Collections.Specialized.NameValueCollection = Nothing
Dim _sxCounta As Integer = Nothing
Dim _sxParamsString As String = Nothing
'
'-> Init
_sxParamsString = ""
MakeWebRequest = False
_sxNameValCol = New System.Collections.Specialized.NameValueCollection()
_sxResponseCol = New System.Collections.Specialized.NameValueCollection()
If pUseSandbox Then
  _sxHost = "http://www.sandbox.paypal.com"
  _sxEndpoint = "https://api-3t.sandbox.paypal.com/nvp"
Else
  _sxHost = "http://www.paypal.com"
  _sxEndpoint = "https://api-3t.paypal.com/nvp"
End If
'-> Create Request
Try
  '-> Key/Value Collection Params
  _sxNameValCol.Add("METHOD", "SetExpressCheckout")
  _sxNameValCol.Add("USER", _UserName)
  _sxNameValCol.Add("PWD", _Password)
  _sxNameValCol.Add("SIGNATURE", _Signature)
  _sxNameValCol.Add("PAYMENTREQUEST_0_AMT", Format(_Basket.BasketTotalIncDelivery / 100, "0.00"))
  _sxNameValCol.Add("PAYMENTREQUEST_0_PAYMENTACTION", "Sale")
  _sxNameValCol.Add("PAYMENTREQUEST_0_CURRENCYCODE", "GBP")
  _sxNameValCol.Add("RETURNURL", pReturnUrl)
  _sxNameValCol.Add("CANCELURL", pCancelUrl)
  _sxNameValCol.Add("REQCONFIRMSHIPPING", "0")
  _sxNameValCol.Add("NOSHIPPING", "2")
  _sxNameValCol.Add("LOCALECODE", "EN")
  _sxNameValCol.Add("BUTTONSOURCE", "PP-ECWizard")
  _sxNameValCol.Add("VERSION", "93.0")
  '-> UrlEncode
  For _sxCounta = 0 To _sxNameValCol.Count - 1
    If _sxCounta = 0 Then
      _sxParamsString = _sxParamsString & _sxNameValCol.Keys(_sxCounta) & "=" & HttpUtility.UrlEncode(_sxNameValCol(_sxCounta))
    Else
      _sxParamsString = _sxParamsString & "&" & _sxNameValCol.Keys(_sxCounta) & "=" & HttpUtility.UrlEncode(_sxNameValCol(_sxCounta))
    End If
  Next
  '-> Credentials (not used)
  '_sxRequest.Credentials = CredentialCache.DefaultCredentials
  Try
    Dim _sxRequest As WebRequest = DirectCast(System.Net.WebRequest.Create(_sxEndpoint), System.Net.HttpWebRequest)
    '-> Convert request to byte-array
    Dim _sxByteArray As Byte() = Encoding.UTF8.GetBytes(_sxParamsString)
    _sxRequest.Method = "POST"                                                      'Our method is post, otherwise the buffer (_sxParamsString) would be useless
    _sxRequest.ContentType = "application/x-www-form-urlencoded"                    'We use form contentType, for the postvars
    _sxRequest.ContentLength = _sxByteArray.Length                                  'The length of the buffer (postvars) is used as contentlength
    Dim _sxPostDataStream As System.IO.Stream = _sxRequest.GetRequestStream()       'We open a stream for writing the postvars
    _sxPostDataStream.Write(_sxByteArray, 0, _sxByteArray.Length)                   'Now we write, and afterwards, we close
    _sxPostDataStream.Close()                                                       'Closing is always important!
    '-> Create Response
    Dim _sxResponse As HttpWebResponse = DirectCast(_sxRequest.GetResponse(), HttpWebResponse)
    '-> Get Response Status
    pRtnStatus = _sxResponse.StatusDescription
    pRtnStatusId = _sxResponse.StatusCode
    '-> Reponse Stream
    Dim _sxResponseStream As Stream = _sxResponse.GetResponseStream()               'Open a stream to the response
    '-> Response Stream Reader
    Dim _sxStreamReader As New StreamReader(_sxResponseStream)                      'Open as reader for the stream 
    pRtnResponseString = _sxStreamReader.ReadToEnd()                                'Read the response string
    MakeWebRequest = True
    '-> Tidy up
    _sxStreamReader.Close()
    _sxResponseStream.Close()
    _sxResponse.Close()
    _sxByteArray = Nothing
    _sxPostDataStream = Nothing
    _sxRequest = Nothing
    _sxResponse = Nothing
    _sxResponseStream = Nothing
    _sxStreamReader = Nothing
  Catch ex As Exception
    pRtnStatusId = Err.Number
    pRtnStatus = "response(" & ex.Message & ")"
    Decode(pRtnResponseString, _sxResponseCol)
    pRtnResponseString = Stringify(_sxResponseCol)
  End Try
Catch ex As Exception
  pRtnStatusId = Err.Number
  pRtnStatus = "request(" & ex.Message & ")"
  Decode(pRtnResponseString, _sxResponseCol)
  pRtnResponseString = Stringify(_sxResponseCol)
End Try
'-> Tidy Up
_sxHost = Nothing
_sxEndpoint = Nothing
_sxNameValCol = Nothing
_sxResponseCol = Nothing
_sxCounta = Nothing
_sxParamsString = Nothing
'
End Function

enter image description here


Source: (StackOverflow)

Advertisements

PayPal - You are not signed up to accept payment for digitally delivered goods

I just went from sandbox to live with my PayPal Express Checkout.

But when I try to use it, I get the following error:

You are not signed up to accept payment for digitally delivered goods.

My account is a business account and I have added express checkout as a payment option.

What other steps do I need to take, to get this function to work?


Source: (StackOverflow)

How to update City, post code in Review page after paypal express redirect in Magento

I am working on the one page checkout in Magento and selected the Paypal Express checkout. Now i faced problem with Checkout with Paypal default button that set for the user's that not want to fill there details in the form.

Now what happen, after redirect to the Review page http://localhost/magento/index.php/paypal/express/review/, I just get the address of the user not the city and Postcode that i have to display on the review form,

anyone please help me what i have to do to display the appropriate fields data into the form or how do i check if paypal returned or not the city and postcode on review page?


Source: (StackOverflow)

Get Transaction status from Paypal using Merchant's transaction id

Paypal provides GetTransactionDetails API call to get the transaction status of a transaction. But it requires TRANSACTIONID as mandatory parameter which is transaction id assigned by Paypal to this transaction.

This TRANSACTIONID is returned by Paypal after completion of the payment. But in scenarios when the customer has made the payment and is returning to merchant page and the network is disrupted, the merchant won't be able to get the status of payment as well as the transaction id of paypal. How would the merchant be able to get the transaction later using API call? Is there any way to get the status using the transaction Id of the merchant?


Source: (StackOverflow)

How do I include the currency conversion block in Paypal Express Checkout

I have attached a screenshot of an example Paypal Express Checkout payment page which include some currency conversion information (indicated with a blue arrow). I am trying to replicate this implementation of Paypal Express Checkout on my own app. What parameters or settings are used to set whether to show this information or not? It is not clear in the documentation. Note: I am using Classic APIs

Paypal Express Checkout


Source: (StackOverflow)

Can't figure out how to charge taxes

I have set up the sales tax in my account but Paypal always return 0%

Here are the SetExpressCheckout parameters

enter image description here

This is the result

TOKEN=EC-03E58022CK445842R
&TIMESTAMP=2015-01-10T20:48:57Z
&CORRELATIONID=b875a01d29414
&ACK=Success
&VERSION=119
&BUILD=14726230

Then the user is redirected to Paypal and enter its billing address.

On the callback url, I do the GetExpressCheckoutDetails with the following parameters

enter image description here

and the result is

 TOKEN=EC-5TF12550CK165913F
&BILLINGAGREEMENTACCEPTEDSTATUS=0
&CHECKOUTSTATUS=PaymentActionNotInitiated
&TIMESTAMP=2015-01-10T21:04:05Z
&CORRELATIONID=7eefa2e1b98b5
&ACK=Success
&VERSION=119
&BUILD=14726230
&EMAIL=something@hotmail.com
&PAYERID=WDUJK7NL59J7A&PAYERSTATUS=verified
&FIRSTNAME=SandboxTest
&LASTNAME=Account
&COUNTRYCODE=CA
&CURRENCYCODE=CAD
&AMT=59.99
&SHIPPINGAMT=0.00
&HANDLINGAMT=0.00
&TAXAMT=0.00
&INSURANCEAMT=0.00
&SHIPDISCAMT=0.00
&PAYMENTREQUEST_0_CURRENCYCODE=CAD
&PAYMENTREQUEST_0_AMT=59.99
&PAYMENTREQUEST_0_SHIPPINGAMT=0.00
&PAYMENTREQUEST_0_HANDLINGAMT=0.00
&PAYMENTREQUEST_0_TAXAMT=0.00
&PAYMENTREQUEST_0_INSURANCEAMT=0.00
&PAYMENTREQUEST_0_SHIPDISCAMT=0.00
&PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED=false
&PAYMENTREQUEST_0_ADDRESSNORMALIZATIONSTATUS=None
&PAYMENTREQUESTINFO_0_ERRORCODE=0

so the sales tax are not calculated

and from the documentation it looks like you have to set up the taxes yourself SetExpressCheckout with L_PAYMENTREQUEST_n_TAXAMTm

but how are you supposed to know how much to charge if you don't know where the user lives?


Source: (StackOverflow)

How can I test Paypal Express Checkout integration with Malaysian Ringgit (MYR) currency?

We're developing a service for customers in Malaysia and would like to use Paypal Express Checkout for payment processing

According to the paypal documentation:

Malaysian Ringgit

Note:This currency is supported as a payment currency and a currency balance for in-country PayPal accounts only

When trying to run test payments in Sandbox mode, the checkout process errors out:

"This transaction is invalid. Please return to the recipient's website to complete your transaction using their regular checkout flow."

I'm able to proceed using USD or SGD as the currency - so I believe the problem is only when I'm using MYR.

Paypal advertises Express Checkout on it's Malaysian site, so I'm sure it's available to malaysian customers - the question is how can I test that it's working?

Any insight would be appreciated.


Source: (StackOverflow)

Expand Paypal Express Checkout, if a downloadable product

It really frustrates me, because I'm a while with such a simple change requirement.

I´ll like to display a simple checkbox in the checkout-review layout, when a downbloadable product in the cart.

I tried with the following code, but it shows no effect

<PRODUCT_TYPE_downloadable>
    <reference name="paypal.express.review">
        <block type="checkout/specialdownloadagreements" name="specialdownloadagreements"  template="page/html/specialdownloadagreements.phtml" />
    </reference>
</PRODUCT_TYPE_downloadable>

This following code works, but is shows, if it is a simple product only

<paypal_express_review translate="label">
    <reference name="paypal.express.review">
        <block type="checkout/special_agreements" name="special.agreements"  template="page/html/special_agreements.phtml" />
    </reference>
</paypal_express_review>

Source: (StackOverflow)

PayPal checkout html form not working

i have some difficulties with defining html form for PayPal checkout,

i always use the same code but this time something go wrong,

i'm trying to send the user for paypal page to pay the all cart at once and

i'm getting an error:

We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to resolve the problem. If this payment is for an eBay listing, you can contact the seller via the "Ask Seller a Question" link on the listing page. When you have the correct email address, payment can be made at www.paypal.com.

i checked the account setting and it seems to be ok, Account Type: Business Status: Verified, i also add the ipn address in the account and turn it to ON

this is my code:

<form method="post" action="https://www.paypal.com/cgi-bin/webscr" id="paypal" name="paypal">
<input type="hidden" name="cmd" value="_xclick"> 
<input type="hidden" name="upload" value="1"> 
<input type="hidden" name="business" value="business@email.com‏"> 
<input type="hidden" name="currency_code" value="ILS"> 
<input type="hidden" name="rm" value="2" />
<input type="hidden" name="return" value="http://www.example.com/orderSubmited.php" />
<input type="hidden" name="notify_url" value="http://www.example.com/paid.php" />
<input type="hidden" name="cancel_return" value="http://www.example.com" /> 
<input type="hidden" name="shipping" value="0" />
<input type="hidden" name="charset" value="utf-8">
<input type="hidden" name="item_name" value="payment>
<input type="hidden" name="item_number" value="123456" /> 
<input type="hidden" name="amount" value="250" />
<input type="hidden" name="quantity" value="1" /> 
<input type="hidden" name="address1" value="Address" /> 
<input type="hidden" name="city" value="City" /> 
<input type="hidden" name="zip" value="Zip" /> 
<input type="hidden" name="email" value="customer@email.com" /> 
<input type="hidden" name="first_name" value="CustomerFirstName" /> 
<input type="hidden" name="last_name" value="CustomerLastName"/> 
</form>

Source: (StackOverflow)

ExpressCheckout with recurring payments -- Cannot find solution

I have been trying to set up an ExpressCheckout with recurring payments but I don't find the solution.

Having a look at the documentation (Recurring Payments With the Express Checkout API), the diagram gives a sequence where "CreateRecurringPaymentsProfile" is invoked at the end.

Now, having a look at the other documentation (How to Create a Recurring Payments Profile with Express Checkout), the different steps which are explained give a different sequence order, where "CreateRecurringPaymentsProfile" comes directly after "GetExpressCheckoutDetails".

I tried to follow this second example but I systematically receive an error.

Could someone tell me what I exactly need to do? Of course a practical example would be more than welcome...

In advance, many thanks

Additional information:

The error I am receiving is "INVALID TOKEN".

Here is the information I send:

VERSION=84.0
METHOD=CreateRecurringPaymentsProfile
LOCALECODE=FR
TOKEN=[the one I received from SetExpressCheckout]
PROFILESTARTDATE=[the date of the next payment]
BILLINGPERIOD=Month
BILLINGFREQUENCY=6
TOTALBILLINGCYCLES=0
AMT=[the same as I mentioned in PAYMENTREQUEST_0_AMT]
AUTOBILLAMT=AddToNextBilling
CURRENCYCODE=EUR
MAXFAILEDPAYMENTS=3
DESC=[the same as I mentioned in L_BILLINGAGREEMENTDESCRIPTION0]
L_PAYMENTREQUEST_0_NAME0=[the same as I used in SetExpressCheckout]
L_PAYMENTREQUEST_0_DESC0=[the same as I used in SetExpressCheckout]
L_PAYMENTREQUEST_0_AMT0=[the same as I used in SetExpressCheckout]
L_PAYMENTREQUEST_0_QTY0=[the same as I used in SetExpressCheckout]
L_PAYMENTREQUEST_0_TAXAMT0=[the same as I used in SetExpressCheckout]

Do I also need to mention: L_BILLINGAGREEMENTDESCRIPTION0 & L_BILLINGTYPE0 ?


Source: (StackOverflow)

Paypal invalid token error when creating a recurring payment profile

I am trying to setup a recurring payment profile via the ExpressCheckout API of Paypal in Ruby on Rails with the help of paypal-express gem but i keep getting error code 11502 (Invalid token) => Paypal error code documentation

The documentation is a bit unclear because there it is not saying what's missing:

One or more subscription detail fields are missing from the request.

I have checked the required field in the documentation here but i don't think i missed any. No need for shipping details as we don't ship a product. Here is a log of what is being sent to Paypal when i am doing the checkout and then creating the recurring profile:

SetExpressCheckout

Parameters:

{:RETURNURL=>"http://localhost:3000/paypal/validate", :CANCELURL=>"http://localhost:3000/paypal/cancel", :REQCONFIRMSHIPPING=>0, :NOSHIPPING=>1, :ALLOWNOTE=>0, :PAYMENTREQUEST_0_AMT=>"88.00", :PAYMENTREQUEST_0_TAXAMT=>"0.00", :PAYMENTREQUEST_0_SHIPPINGAMT=>"0.00", :PAYMENTREQUEST_0_CURRENCYCODE=>"HKD", :PAYMENTREQUEST_0_DESC=>"Plus x 2-month subscription x 2 staff", :LOCALECODE=>:fr}

Response:

TOKEN=EC%2d0H440138VJ9552235&TIMESTAMP=2015%2d04%2d25T08%3a38%3a42Z&CORRELATIONID>=48742557da98&ACK=Success&VERSION=88%2e0&BUILD=16428450

CreateRecurringPaymentsProfile

Parameters:

{:TOKEN=>"EC-0H440138VJ9552235", :BILLINGPERIOD=>:Month, :BILLINGFREQUENCY=>2, :TOTALBILLINGCYCLES=>0, :AMT=>"88.00", :CURRENCYCODE=>"HKD", :SHIPPINGAMT=>"0.00", :TAXAMT=>"0.00", :DESC=>"Plus x 2-month subscription x 2 staff", :MAXFAILEDPAYMENTS=>0, :PROFILESTARTDATE=>"2015-04-25 16:39:24"}

Response:

TIMESTAMP=2015%2d04%2d25T08%3a39%3a26Z&CORRELATIONID=533964ff183a1&ACK=Failure&VE>RSION=88%2e0&BUILD=16398710&L_ERRORCODE0=11502&L_SHORTMESSAGE0=Invalid%20Token&L_>LONGMESSAGE0=The %20token%20is%20invalid&L_SEVERITYCODE0=Error

Do you guys have any ideas of what could be wrong? I can execute a payment without any issue, the issue appear when creating a recurring profile.


Source: (StackOverflow)

How do I get PayPal_Express response using OmniPay?

I have searched all over and have ran in circles on OmniPays github trying to find documentation on how to implement PayPal Express in OmniPay.

        $response = Omnipay::purchase([
            'amount' => $total,
            'encodedTestIDs' => serialize($payForTestID),
            'returnUrl' => 'http://php.bhiceu.com/payment/return',
            'cancelUrl' => 'http://php.bhiceu.com/payment/cancel' 
        ])->send();
        //dd($response);
        //die;
        if ($response->isRedirect()) {
            // redirect to offsite payment gateway
            $response->redirect();
        } else {
            // payment failed: display message to customer
            echo $response->getMessage();
        }

The above code successfully sends me to PayPal with the proper amount and when I cancel or check I am returned to the appropriate URLS, however all that I get back is the paypal token which I cannot find any documentation on what to do with.


Source: (StackOverflow)

Opencart Paypal Express Checkout L_ERRORCODE0=10486

When I making payment, keep getting error code 10486, this message from Error Log. When I making payment, I choose not require login option and then using credit card, but debit card has no issue, only credit card. Paypal prompt me "We're sorry, the card issuer declined your purchase using card Visa x-xxxx. Please enter a new credit or debit card to continue payment." OR after clicking pay now, it is redirect back to the website, but payment is not successful sometimes is working not everytime, very weird. I've check many website, but no solution, I did try paypal payment standard module transaction still fail, but no error logs found.

And I've check billing address, CC expired date, CC secret number everything correct and my CC is valid.

OpenCart version: V 1.5.6 Paypal Acc Type: Business Modules: Paypal Express checkout (pre-installed one)

Anyone experience can help? Many thanks.


Source: (StackOverflow)

How to send custom currency type to Paypal using Magento Paypal express checkout?

Is there any way to send Paypay custom currency type other that base currency?

Here is what i want to achieve.

Currently i have set my Magento Base currency as EURO in System -> General -> Currency Setup -> Currency Options. As my client wants to enter Prices in EURO.

Paypay Express checkout takes EURO as the currency type while checkout because it takes base currency for prcessing. But we would like to process Payment in USD. Is there any way to achieve this?

Thanks in Advance!


Source: (StackOverflow)