I am using the PHP PayPal REST API for credit card payments and a sandbox account and I get this error:
PayPal\Core\PayPalHttpConnection :
ERROR: Got Http response code 400 when accessing https://api.sandbox.paypal.com/v1/payments/payment.
{
"name":"CURRENCY_NOT_ALLOWED",
"message":"Currency is not supported",
"information_link":"https://developer.paypal.com/webapps/developer/docs/api/#CURRENCY_NOT_ALLOWED",
"debug_id":"308d4b24ea4b5"
}
The "information_link" they provide does not provide any information whatsoever about CURRENCY_NOT_ALLOWED and what I found on another page of theirs is "more than helpful": Currency is not supported You are using a currency that is not currently supported.
The problematic currency is NOK, while EUR seems to work just fine.
Any idea on how to fix this?
Please check your paypal sendbox account address zone. May be it's not valid for NOK. For more details you can check it here :- https://developer.paypal.com/docs/classic/api/currency_codes/
Related
In amazon selling partner api , canonical request and string to sign is coming as expected, code after that is below:
{
$kDate=hash_hmac('sha256',$date,'AWS4'.$secretKey,true); //only date. $kRegion=hash_hmac('sha256',$region,$kDate,true); $kService=hash_hmac('sha256',$service,$kRegion,true); $kSigning=hash_hmac('sha256','aws4_request',$kService,true); $signature=hash_hmac('sha256',$stringToSign,$kSigning);
}
Can anyone help me with what's wrong in it, Thanks in advance.
Output coming after running script
I am asking for help on an error I got when I try to integrate the MasterCard Payment Gateway Sample Code:
Gateway sample code link: https://ap-gateway.mastercard.com/api/documentation/downloads/example/Sample_REST-JSON_PHP.zip?locale=en_US
I configure the following field in the configuration.php
// Base URL of the Payment Gateway. Do not include the version.
$configArray["gatewayUrl"] = "https://ap-gateway.mastercard.com/api/rest/";
// Merchant ID supplied by your payments provider
$configArray["merchantId"] = "[INSERT-MERCHANT-ID]";
// API username in the format below where Merchant ID is the same as above
$configArray["apiUsername"] = "merchant.[INSERT-MERCHANT-ID]";
// API password which can be configured in Merchant Administration
$configArray["password"] = "";
I am pretty sure my Merchant ID, which is provided by a financial provider, is correct. However, I got the following error, could you please help to advise? Thanks.
{
"error": {
"cause": "INVALID_REQUEST",
"explanation": "Value '[INSERT-MERCHANT-ID]' is invalid. No valid Merchant Acquirer Relationship available",
"field": "merchantId",
"validationType": "INVALID"
},
"result": "ERROR"
}
Regards,
Carlos
You need the merchantId from a payment service provider. It says as much in the error.
commerce and to use PayPal sandbox and I'm trying to do a simple transaction for testing the PayPal sandbox but i've an error that i can't to solve.
This is my call to PayPal sandbox:
$cmd='_xclick';
$busisness='SELLER MAIL';
$lc='IT';
$currency_code='EUR';
$no_note=0;
$bn=urlencode('PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest');
$return='localhost/PayPal/ok.php';
$cbt='Torna al MIO SITO';
$rm=2;
$item_name='prova prodotto 1';
$item_number='00000001';
$amount='22.50';
$url='https://sandbox.paypal.com/cgi-bin/webdescr'
. '?cmd='.$cmd
.'&busisness='.$busisness
.'&lc='.$lc
.'¤cy_code='.$currency_code
.'&no_note='.$no_note
.'&bn='.$bn
.'&return='.$return
.'&cbt='.$cbt
.'&rm='.$rm
.'&item_name='.$item_name
.'&item_number='.$item_number
.'&amount='.$amount;
My problem is that receive this error:
It isn't possible elaborate transaction because of a problem with the email address supplied by PayPal seller
How can i fix it?
Thank's
You have misspelt the word business, you have put busisness but it should be business.
https://www.paypal.com/cgi-bin/webscr?cmd=p/pdn/howto_checkout-outside
my Payeezy is throwing an error “payment method is missing”
im testing authorize transaction which i believe doesnt require payment method.
here’s my code
http://pastebin.com/gEyAfyuf
here’s the response on our site at http://wolcottschoolpay.com/test/payeezy_php/test.php
{
correlation_id: "228.1440254919101",
Error:
{
messages:
[
{
code: "payment_method_missing",
description: "The payment method is missing"
},
{
code: "missing_amount",
description: "The amount is missing"
},
{
code: "missing_currency",
description: "The currency is missing"
}
]
},
transaction_status: "Not Processed",
validation_status: "failed",
transaction_type: "authorize",
currency: "USD”
}
I copied most of the part here on the official payeezy php direct library on github.
authorize transaction is on line 127
https://github.com/payeezy/payeezy_direct_API/blob/master/payeezy_php/example/tests/PayeezyTest.php
i also tried both my merchant test details and the one provided at payeezy library but none worked.
Is this a library issue? any idea?
First you need to add x_currency_code and x_amount in api request. without amount and currency it can not process transaction.
And to process payment you need to select payment method like VISA, AMERICAN EXPRESS, DISCOER etc...
As the error message suggests, your request JSON payload is missing amount, currency and payment method. Please add those and try again.
I am using Paypal Website Payments Pro currently.
My question is, how can I retrieve the AVS/CVV response code through the API, after a transaction has taken place. So I'm thinking all I need to do is send a GET request to some endpoint, with the transaction ID, and I am hoping the AVS/CVV will be included in the response.
There seems to be limited information on what is actually returned though.
TLDR: That said, is it possible to retrieve the AVS/CVV response code through the API, for Paypal Website Payments Pro, while providing a transaction ID (or similar) as a parameter?
This is the typical DoDirectPayment Response
NVP Response:
TIMESTAMP=2015-04-01T07:09:23Z
CORRELATIONID=5d206d78a7eb2
ACK=Success
VERSION=109.0
BUILD=15840636
AMT=0.01
CURRENCYCODE=USD
AVSCODE=X
CVV2MATCH=M
TRANSACTIONID=4XJ98999B8918783X
There is GetTransactionDetails API with transaction id as input parameter , which responds the following but won't get AVS,CVV in response.
NVP Response:
RECEIVERBUSINESS=us-30#cri.com
RECEIVEREMAIL=us-30#cri.com
RECEIVERID=XTV2XWLQDBBUL
PAYERID=RPP8F58J274JG
PAYERSTATUS=unverified
COUNTRYCODE=US
ADDRESSOWNER=PayPal
ADDRESSSTATUS=None
SALESTAX=0.00
SHIPAMOUNT=0.00
SHIPHANDLEAMOUNT=0.00
TIMESTAMP=2015-04-01T07:09:35Z
CORRELATIONID=6d04b6839b8a
ACK=Success
VERSION=109.0
BUILD=15840636
FIRSTNAME=John
LASTNAME=Test
TRANSACTIONID=4XJ98999B8918783X
RECEIPTID=2178-2433-5782-0156
TRANSACTIONTYPE=webaccept
PAYMENTTYPE=instant
ORDERTIME=2015-04-01T07:09:22Z
AMT=0.01
FEEAMT=0.01
TAXAMT=0.00
CURRENCYCODE=USD
PAYMENTSTATUS=Completed
PENDINGREASON=None
REASONCODE=None
PROTECTIONELIGIBILITY=Ineligible
PROTECTIONELIGIBILITYTYPE=None
L_QTY0=1
L_TAXAMT0=0.00
L_CURRENCYCODE0=USD
L_TAXABLE0=false