I'm having a problem with CreateRecurringPaymentsProfile call - when I send a request using:
[TOKEN] => EC-0HX47934KS3525414
[DESC] => Enrolment title
[PROFILESTARTDATE] => 2014-08-05T19:20:42+01:00
[AMT] => 98.16
[BILLINGPERIOD] => Month
[BILLINGFREQUENCY] => 1
[TOTALBILLINGCYCLES] => 2
[INITAMT] => 98.16
I get the response:
[PROFILEID] => I-VBR32KNHNXWN
[PROFILESTATUS] => PendingProfile
[TIMESTAMP] => 2014-08-05T18:20:45Z
[CORRELATIONID] => 853de87c95475
[ACK] => Success
[VERSION] => 72.0
[BUILD] => 12194268
Any idea why am I getting PendingProfile instead of ActiveProfile?
EDIT
The solution was to take the initial payment with SetExpressCheckout method - using L_PAYMENTREQUEST_0_NAME0 and L_PAYMENTREQUEST_0_AMT0 instead of INITAMT with CreateRecurringPaymentsProfile - once I've done that - everything works just fine.
Related
I am trying to invoke the PayPal API in my source code for processing credit-card transaction. It looks to be working perfect on Sandbox, but throwing an error like below on Live in response.
Array
(
[TIMESTAMP] => 2018-03-14T17:42:19Z
[CORRELATIONID] => 8d47b259e776b
[ACK] => Failure
[VERSION] => 3.2
[BUILD] => 39949200
[L_ERRORCODE0] => 10548
[L_SHORTMESSAGE0] => Invalid Configuration
[L_LONGMESSAGE0] => This transaction cannot be processed. The merchant's account is not able to process transactions.
[L_SEVERITYCODE0] => Error
[AMT] => 26.55
[CURRENCYCODE] => USD
)
The parameters being sent in request object appears to be like below.
Array
(
[USER] => <my_username>
[PWD] => <my_password>
[SIGNATURE] => <signature>
[METHOD] => DoDirectPayment
[PAYMENTACTION] => Sale
[IPADDRESS] => <my_server_ip_address>
[VERSION] => 3.2
[AMT] => 26.55
[CREDITCARDTYPE] => Visa
[ACCT] => <credit_card_number>
[STARTDATE] =>
[EXPDATE] => 032023
[CVV2] => 111
[FIRSTNAME] => <acct_first_name>
[LASTNAME] => <acct_last_name>
[STREET] =>
[CITY] =>
[STATE] =>
[COUNTRYCODE] =>
[ZIP] =>
[EMAIL] => <acct_email_id_at_domain.com>
[PHONENUM] =>
[CURRENCYCODE] =>
[BUTTONSOURCE] => osCommerce22_Default_DP
)
I am done with checking it a "Business Account" along with presence of "Home Phone Number" and "Customer Service Phone Number" in the profile, and found everything working.
Any help would be appreciated.
Thanks!
You are trying to process a direct card payment using the API operation DoDirectPayment. In order to process a direct card payment, you will need to have PayPal Business account with PRO. But your Live PayPal account doesn't have PRO, this is the reason for getting an error code 10548.Here you are using Classic API for processing the payment. Please contact PayPal MTS team at https://www.paypal-techsupport.com/ for the suitable latest product in order to process a direct card payment.
I tried to implement paymentwall payment gateway integration with Laravel using omnipay library.After setting setApiType, setPublicKey and setPrivateKey and trying to call the API, its getting the response "Public key is missed or invalid" from payment wall gateway.
Actually this error is happened due to passing parameter public key as public_Key instead of public_key from the omnipay library.
The following is the response
[request:protected] => Omnipay\PaymentWall\Message\PurchaseRequest Object
(
[endPoint:protected] => https://api.paymentwall.com/api
[parameters:protected] => Symfony\Component\HttpFoundation\ParameterBag Object
(
[parameters:protected] => Array
(
[apiType] => 0
[publicKey] => hjghjghsdfsc5464564564e56456
[privateKey] => gfh4567686786787hfjfhgfgfgh
[amount] => 10.00
[currency] => USD
[accountId] =>
[description] => test Pay
[email] => test#gmail.com
[clientIp] => 112.133.236.158
[browserDomain] => test.com
[card] => Omnipay\Common\CreditCard Object
[response:protected] => Omnipay\PaymentWall\Message\Response Object
*RECURSION*
[zeroAmountAllowed:protected] => 1
[negativeAmountAllowed:protected] =>
)
[data:protected] => Array
(
[type] => Error
[object] => Error
[error] => Public key is missed or invalid
[code] => 2111
[log] =>
)
)
Public key is missed or invalid
As I commented in the issue that you raised on github:
This is working for everyone else. Are you sure there isn't really an issue with your keys? Can you check that there are no spurious newlines, etc, in your key as provided to the library?
The correct name for the public key parameter within Omnipay is publicKey. The correct name within the paymentwall library is public_key. A check of the code appears to indicate that the parameter naming is correct. The Omnipay publicKey parameter is correctly passed to the paymentwall library as public_key.
We have multiple Woo Commerce stores set up however one we have a SSL Certificate applied to it.
On the one with the SSL certificate we get the Error "Error response: SSL connect error" in the Woo Commerce pay pal Logs. Has anyone got any clue as to what the reason could be.
I have tried changing the notify URL to a http connection instead but it still produces the same issue.
WooCommerce PayPal Log below
01-29-2016 # 10:25:25 - Generating payment form for order 1869. Notify URL: https://frictionfreeshaving.com/wc-api/WC_Gateway_Paypal/
01-29-2016 # 10:25:48 - Checking IPN response is valid
01-29-2016 # 10:25:48 - IPN Request: Array
(
[body] => Array
(
[cmd] => _notify-validate
[transaction_subject] => Subscription 1870 (Order 1869) - test-razor
[payment_date] => 02:25:44 Jan 29, 2016 PST
[txn_type] => subscr_payment
[subscr_id] => I-0TFMV85ERGCJ
[last_name] => singh
[residence_country] => GB
[item_name] => Subscription 1870 (Order 1869) - test-razor
[payment_gross] =>
[mc_currency] => GBP
[business] => tjmailcoms#gmail.com
[payment_type] => instant
[protection_eligibility] => Ineligible
[verify_sign] => ALUw10OT3.wkDPQ73JiKtXApC16gA24mWOunWinyGFBel4bkL0L8u3O-
[payer_status] => verified
[test_ipn] => 1
[payer_email] => tjmailcoms03#gmail.com
[txn_id] => 41285066KK228700R
[receiver_email] => tjmailcoms#gmail.com
[first_name] => tejinder
[invoice] => WC-10011869
[payer_id] => M7A8DVMKC4GCW
[receiver_id] => XK2LNP4PTGQUU
[payment_status] => Completed
[payment_fee] =>
[mc_fee] => 0.23
[mc_gross] => 1.00
[custom] => {"order_id":1869,"order_key":"wc_order_56ab3e14c01b3","subscription_id":1870,"subscription_key":"wc_order_56ab3e14e7922"}
[charset] => windows-1252
[notify_version] => 3.8
[ipn_track_id] => f7146428bb012
)
[timeout] => 60
[httpversion] => 1.1
[compress] =>
[decompress] =>
[user-agent] => WooCommerce/2.3.11
)
01-29-2016 # 10:25:48 - IPN Response: WP_Error Object
(
[errors] => Array
(
[http_request_failed] => Array
(
[0] => SSL connect error
)
)
[error_data] => Array
(
)
)
01-29-2016 # 10:25:48 - Received invalid response from PayPal
01-29-2016 # 10:25:48 - Error response: SSL connect error
01-29-2016 # 10:25:52 - Checking IPN response is valid
01-29-2016 # 10:25:53 - IPN Request: Array
(
[body] => Array
(
[cmd] => _notify-validate
[txn_type] => subscr_signup
[subscr_id] => I-0TFMV85ERGCJ
[last_name] => singh
[residence_country] => GB
[mc_currency] => GBP
[item_name] => Subscription 1870 (Order 1869) - test-razor
[business] => tjmailcoms#gmail.com
[recurring] => 1
[verify_sign] => AFUzd6d5BFLcPs.756upyW0L6Uo6A-NLMyaoJ69kQZg1yL4yEsY4gTMf
[payer_status] => verified
[test_ipn] => 1
[payer_email] => tjmailcoms03#gmail.com
[first_name] => tejinder
[receiver_email] => tjmailcoms#gmail.com
[payer_id] => M7A8DVMKC4GCW
[invoice] => WC-10011869
[reattempt] => 1
[subscr_date] => 02:25:42 Jan 29, 2016 PST
[custom] => {"order_id":1869,"order_key":"wc_order_56ab3e14c01b3","subscription_id":1870,"subscription_key":"wc_order_56ab3e14e7922"}
[charset] => windows-1252
[notify_version] => 3.8
[period3] => 1 D
[mc_amount3] => 1.00
[ipn_track_id] => f7146428bb012
)
[timeout] => 60
[httpversion] => 1.1
[compress] =>
[decompress] =>
[user-agent] => WooCommerce/2.3.11
)
01-29-2016 # 10:25:53 - IPN Response: WP_Error Object
(
[errors] => Array
(
[http_request_failed] => Array
(
[0] => SSL connect error
)
)
[error_data] => Array
(
)
)
01-29-2016 # 10:25:53 - Received invalid response from PayPal
01-29-2016 # 10:25:53 - Error response: SSL connect error
01-29-2016 # 10:30:08 - Checking IPN response is valid
01-29-2016 # 10:30:09 - IPN Request: Array
(
[body] => Array
(
[cmd] => _notify-validate
[txn_type] => subscr_cancel
[subscr_id] => I-0TFMV85ERGCJ
[last_name] => singh
[residence_country] => GB
[mc_currency] => GBP
[item_name] => Subscription 1870 (Order 1869) - test-razor
[business] => tjmailcoms#gmail.com
[recurring] => 1
[verify_sign] => Am729F3QdZ4ucintGF7EZMXFQKlgAKfHAWYr4ohDcQkhr0xx0H34n8lT
[payer_status] => verified
[test_ipn] => 1
[payer_email] => tjmailcoms03#gmail.com
[first_name] => tejinder
[receiver_email] => tjmailcoms#gmail.com
[payer_id] => M7A8DVMKC4GCW
[invoice] => WC-10011869
[reattempt] => 1
[subscr_date] => 02:29:50 Jan 29, 2016 PST
[custom] => {"order_id":1869,"order_key":"wc_order_56ab3e14c01b3","subscription_id":1870,"subscription_key":"wc_order_56ab3e14e7922"}
[charset] => windows-1252
[notify_version] => 3.8
[period3] => 1 D
[mc_amount3] => 1.00
[ipn_track_id] => 542b79c8e6b4
)
[timeout] => 60
[httpversion] => 1.1
[compress] =>
[decompress] =>
[user-agent] => WooCommerce/2.3.11
)
01-29-2016 # 10:30:09 - IPN Response: WP_Error Object
(
[errors] => Array
(
[http_request_failed] => Array
(
[0] => SSL connect error
)
)
[error_data] => Array
(
)
)
01-29-2016 # 10:30:09 - Received invalid response from PayPal
01-29-2016 # 10:30:09 - Error response: SSL connect error
Due to this no orders are being processed but payment is being taken. Any help would be greatly appreciated as I'm out of ideas.
Tj
Copying my previous answer from here:
Paypal have recently rolled out some security updates on the sandbox (production will be updated in June) https://devblog.paypal.com/upcoming-security-changes-notice/
Most importantly, TLS 1.0 and 1.1 are no longer accepted by the sandbox, so you'll need to make sure that TLS 1.2 is being used by forcing the curl option, e.g:
$curl->setOption(CURLOPT_SSLVERSION,6);
You'll need OpenSSL 1.0.1+ for this to work. You can wait for woocommerce to release a patch themselves, or you can make TLS 1.2 work automatically (the common cipher will be deduced during the SSL handshake) by updating to PHP 5.5.19+ and (lib)curl 7.34+.
We just came across this problem this past week.
We are sending the API SEPARATE orders/invoice IDs, and it is returning the SAME transaction ID back, and not processing one of the payments. We do not get the payment in our PayPal account, and our response from the API is the SAME transaction ID as the first transaction, even though we are sending a separate order, and we get a separate correlation ID.
We have been processing payments just fine up until August. This is when this problem just started occurring. It happens when we send more than 1 order through the API. The problem seems to occur only when sending more than one transaction ID through the system.
We are using [METHOD] => DoDirectPayment
===============
From one of our developers:
We use this. its LEGACY!
https://developer.paypal.com/docs/classic/api/#wpp
we use this function in particular.
https://developer.paypal.com/docs/classic/api/merchant/DoDirectPayment_API_Operation_NVP/
===============
We have over 25 cases where this is documented and PayPal just seems to "lose" and "not process" the order, resulting in the API sending the same transaction ID back, with a different correlation ID.
We have tried changing our order/inv numbers from having a - (hyphen) to all alphanumeric, we have tried postfixing a random number. None of these seem to work.
The problem does not happen ALL the time. It happens intermittently. Sometimes payments process fine, and other times they do not and only a fraction of the orders are processed correctly, with the others being sent a previous transaction ID.
We spent over 2 hours on the phone at PayPal with someone today. They looked up a sample correlation ID and transaction ID and immediately found something to be wrong on their end.
It is impossible that a unique invoice number be sent to
PayPal, and then a payment transaction ID be a duplicate returned to us saying successful, but that is what PayPal is returning to us.
I ASK YOU THIS:
How is it possible that we send you an invoice number and you return us a unique correlation ID and a transaction ID and then 47 seconds later we send you a DIFFERENT invoice number and YOU RETURN US THE SAME transaction ID as the invoice 47 seconds earlier?????
SEE HERE
3 orders were made. 1 was fine. 2nd duplicate error we caught, 3rd order fine.
Here is the log..
first 3 orders.
<---start paypal send transaction details in function purchase--->
time: 08/20/15 12:10:47 PM
Array
(
[METHOD] => DoDirectPayment
[VERSION] => 85.0
[PAYMENTACTION] => Sale
[AMT] => 11.00
[CURRENCYCODE] => USD
[DESC] =>
[CREDITCARDTYPE] => visa
[EXPDATE] => 082017
[CVV2] => 665
[IPADDRESS] => xx.xx.xx.xx
[FIRSTNAME] => xx
[LASTNAME] => xx
[STREET] => xx
[STREET2] =>
[CITY] => xx
[STATE] => xx
[ZIP] => xx
[COUNTRYCODE] => US
[INVNUM] => AZ101425x001253x173933x1x761
)
<---end paypal send transaction details in function purchase--->
<---start paypal response transaction details in function purchase--->
time: 08/20/15 12:10:53 PM
Array
(
[TIMESTAMP] => 2015-08-20T19:10:53Z
[CORRELATIONID] => 34d8711050
[ACK] => Success
[VERSION] => 85.0
[BUILD] => 000000
[AMT] => 11.00
[CURRENCYCODE] => USD
[AVSCODE] => Y
[CVV2MATCH] => M
[TRANSACTIONID] => 8WS0295W561945T
)
<---end paypal response transaction details in function purchase--->
<---start paypal send transaction details in function purchase--->
time: 08/20/15 12:10:53 PM
Array
(
[METHOD] => DoDirectPayment
[VERSION] => 85.0
[PAYMENTACTION] => Sale
[AMT] => 11.00
[CURRENCYCODE] => USD
[DESC] =>
[CREDITCARDTYPE] => visa
[EXPDATE] => 082017
[CVV2] => 665
[IPADDRESS] => xx.xx.xx.xx
[FIRSTNAME] => xx
[LASTNAME] => xx
[STREET] => xx
[STREET2] =>
[CITY] => xx
[STATE] => xx
[ZIP] => xx
[COUNTRYCODE] => US
[INVNUM] => AZ101425x001252x352621x1x579
)
<---end paypal send transaction details in function purchase--->
<---start paypal response transaction details in function purchase--->
time: 08/20/15 12:10:57 PM
Array
(
[TIMESTAMP] => 2015-08-20T19:10:57Z
[CORRELATIONID] => 9abf23471a5
[ACK] => Success
[VERSION] => 85.0
[BUILD] => 000000
[AMT] => 11.00
[CURRENCYCODE] => USD
[AVSCODE] => Y
[CVV2MATCH] => M
[TRANSACTIONID] => 8WS0295W561945T
)
<---end paypal response transaction details in function purchase--->
<---start paypal send transaction details in function purchase--->
time: 08/20/15 12:10:57 PM
Array
(
[METHOD] => DoDirectPayment
[VERSION] => 85.0
[PAYMENTACTION] => Sale
[AMT] => 11.00
[CURRENCYCODE] => USD
[DESC] =>
[CREDITCARDTYPE] => visa
[EXPDATE] => 082017
[CVV2] => 665
[IPADDRESS] => xx.xx.xx.xx
[FIRSTNAME] => xx
[LASTNAME] => xx
[STREET] => xx
[STREET2] =>
[CITY] => xx
[STATE] => xx
[ZIP] => xx
[COUNTRYCODE] => US
[INVNUM] => AZ101425x001252x344289x1x941
)
<---end paypal send transaction details in function purchase--->
<---start paypal response transaction details in function purchase--->
time: 08/20/15 12:11:02 PM
Array
(
[TIMESTAMP] => 2015-08-20T19:11:02Z
[CORRELATIONID] => 4f41a4c7b33
[ACK] => Success
[VERSION] => 85.0
[BUILD] => 000000
[AMT] => 11.00
[CURRENCYCODE] => USD
[AVSCODE] => Y
[CVV2MATCH] => M
[TRANSACTIONID] => 9TP856375554029
)
<---end paypal response transaction details in function purchase--->
<---start return values from function multi_payment--->
time: 08/20/15 12:11:02 PM
Array
(
[photo] => Array
(
[id] => 8WS0295W561945T
)
)
Array
(
[photo] => Array
(
[status] => Error processing payment - Please try again.
)
)
Array
(
[photo] => Array
(
[id] => 9TP856375554029
)
)
THEN SHE PAYS AGAIN to get the duplicate..
<---start paypal send transaction details in function purchase--->
time: 08/20/15 12:11:44 PM
Array
(
[METHOD] => DoDirectPayment
[VERSION] => 85.0
[PAYMENTACTION] => Sale
[AMT] => 11.00
[CURRENCYCODE] => USD
[DESC] =>
[CREDITCARDTYPE] => visa
[EXPDATE] => 082017
[CVV2] => 665
[IPADDRESS] => xx.xx.xx.xx
[FIRSTNAME] => xx
[LASTNAME] => xx
[STREET] => xx
[STREET2] =>
[CITY] => xx
[STATE] => xx
[ZIP] => xx
[COUNTRYCODE] => US
[INVNUM] => AZ101425x001252x352621x1x349
)
<---end paypal send transaction details in function purchase--->
<---start paypal response transaction details in function purchase--->
time: 08/20/15 12:11:49 PM
Array
(
[TIMESTAMP] => 2015-08-20T19:11:49Z
[CORRELATIONID] => 8b30928b03
[ACK] => Success
[VERSION] => 85.0
[BUILD] => 000000
[AMT] => 11.00
[CURRENCYCODE] => USD
[AVSCODE] => Y
[CVV2MATCH] => M
[TRANSACTIONID] => 9TP856375554029
)
<---end paypal response transaction details in function purchase--->
It’s a duplicate of the 3rd one from first batch she tried above.
HOW IS THAT POSSIBLE?!?!
(FYI Some of the Corrlelation ID and Transaction IDs have been shortened on purpose for security)
When I issue a print_r ($_SESSION) on my local server I receive the following
Array
(
[group] => Rich Primosch
[ok] => 1
[golfer] => Fritz Davis
[uniq] => 38
[fname] => Fritz
[lname] => Davis
[hphone] => 352-487-0597
[cphone] => 352-487-6189
[email] => fritz#hadleyvillage.org
[vid] => 527571
[handicap] => 23
[admin] => 0
[page] => signup.php
)
However when I issue the same print_r ($_SESSION) on the webhost's server I get this response
Array
(
[group] => __PHP_Incomplete_Class Object
(
[__PHP_Incomplete_Class_Name] => window
[curdate] => 1293771600
[datetime] => 1293813211
[monplay] => 1294030800
[wedplay] => 1294203600
[friplay] => 1294376400
[monclose] => 1293750000
[wedclose] => 1293922800
[friclose] => 1294030740
[monopen] => 1293426000
[wedopen] => 1293426000
[friopen] => 1293426000
[ismonopen] =>
[iswedopen] => 1
[isfriopen] => 1
)
[ok] => 1
[golfer] => mysqli_result Object
(
)
[uniq] => 175
[fname] => Fritz
[lname] => Davis
[hphone] => 352-487-0597
[cphone] => 352-487-6189
[email] => fritz#hadleyvillage.org
[vid] => 723234
[handicap] => 23
[admin] => 0
[page] => signup.php
)
Why I even see the incomplete class object, I have no idea. It is never assigned to a $_SESSION variable and yes, the class definition is included before session_start().
There are several differences in the two responses. My question is why? Is there a difference in settings somewhere or is there a programming error.
I have seen many references to the PHP_Incomplete_Class Object but they all say make sure that the class definition proceeds session_start. In my case it does but that should be inconsequential because I only use the object on one page and do not store it in a session.
Suggestions are appreciated.
-dmd-
try var_dump instead in both machines, it may say something interesting, "group" value seems to be an object, of what type? does it have a __sleep() magic method?
ensure your test machine and production server has the same php version to better understand the issue.
#see http://www.php.net/manual/en/language.oop5.serialization.php