omnipay payment wall integration -Error - omnipay

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.

Related

UnSupportedEntityException when trying to create/render records containing slug extension

I am trying to implement slugs in my bundle, but when i try to create a record and run my message consumer i get the following error:
Unexpected exception occurred during Direct URL generation ["exception" => Oro\Bundle\RedirectBundle\Exception\UnsupportedEntityException { …}] ["processor" => "Oro\Bundle\RedirectBundle\Async\DirectUrlProcessor","message_id" => "oro.6256de2124b630.96491198","message_body" => ["createRedirect" => true,"id" => [3],"class" => "Phpro\OroBundleBlogBundle\Entity\BlogPostCategory"],"message_properties" => ["oro.message_queue.client.topic_name" => "oro.redirect.generate_direct_url.entity","oro.message_queue.client.queue_name" => "oro.default","oro.security.token" => "organizationId=1;userId=1;userClass=Oro\Bundle\UserBundle\Entity\User;roles=ROLE_ADMINISTRATOR"],"message_headers" => ["content_type" => "application/json","message_id" => "oro.6256de2124b630.96491198","timestamp" => "1649860129","priority" => "2"],"elapsed_time" => "34 ms","memory_usage" => "107.57 MB"]
The slugs are stored, but the use of the get_slug_urls_for_prototypes twig filter results in the following error An exception has been thrown during the rendering of a template (""). Again because of the UnsupportedEntityException
Am i missing some configuration?
As mentioned in the OroCommerce documentation the entity must implement the interface to support slugs. Make sure you fulfilled this requirement.

Error: 10548. Invalid Configuration. The merchant's account is not able to process transactions

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.

Shopify APP API

$shopify = shopify\client( $shop, $app_settings->api_key, $shop_data->access_token, false );
$products = $shopify('GET', '/admin/products.json', array('published_status' => 'published'));`
I am getting the following response by printing the $shopify:
Closure Object
(
[static] => Array
(
[base_uri] => https://4f4b14c3eb5464ae238dd6cf4b88bce6:c2608b7067c5bf96028876023114b68c#pilibaba.myshopify.com/
[oauth_token] => c2608b7067c5bf96028876023114b68c
[private_app] => 2f996f1bd2a0f4fb343703555c89a234
)
[parameter] => Array
(
[$method_uri] =>
[$query] =>
[$payload] =>
[&$response_headers] =>
[$request_headers] =>
[$curl_opts] =>
)
)
after that accessing the $product i am getting the following error.
Fatal error:
Uncaught phpish\shopify\CurlException: [3] malformed in /*****/shopify_app/shopify_app.php on line 36 thrown in /******/shopify_app/shopify.php on line 67
Is it a problem with my access token? as i do have all the store permission while installing the app.
I did research for this error by didnt find any help either from shopify support team.
change keys of your url:
apikey = c2608b7067c5bf96028876023114b68c
access_token = 4f4b14c3eb5464ae238dd6cf4b88bce6
https://c2608b7067c5bf96028876023114b68c:4f4b14c3eb5464ae238dd6cf4b88bce6#pilibaba.myshopify.com/admin/shop.json

Is there any concept like google plus app access token

I am currently developing an app for Google+. Is there any way to fetch/search public data with out user authentication, I mean, using an app access token
https://www.googleapis.com/oauth2/v1/activities
Yes, see https://developers.google.com/+/api/oauth#apikey which talks about using an API Key instead of using a user login.
Quoting that page:
For Google+ API calls that do not need to identify a particular user, you can use your application API key. This is useful for server-side applications, or web applications that do not require the user to sign in with Google.
[...]
After you have an API key, your application can append the query parameter key=yourAPIKey to all request URLs. The API key is safe for embedding in URLs; it doesn't need any encoding.
You can get the API key via the new Developers Console by going to http://console.developers.google.com/ and selecting your project, then clicking on the APIs & auth tab on the left and then Credentials. There should be a section on the right Public API Access with a button to press to create a new key if one doesn't already exist.
Still no luck,
Here is the response :
Array
(
[url] => https://www.googleapis.com/oauth2/v1/activities?query=stackoverflow&maxResults=100&orderBy=recent&key=54XXXXXXX4723.apps.googleusercontent.com
[content_type] => text/html; charset=UTF-8
[http_code] => 404
[header_size] => 390
[request_size] => 262
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.813163
[namelookup_time] => 0.411874
[connect_time] => 0.454496
[pretransfer_time] => 0.605186
[size_upload] => 0
[size_download] => 9
[speed_download] => 11
[speed_upload] => 0
[download_content_length] => -1
[upload_content_length] => 0
[starttransfer_time] => 0.813109
[redirect_time] => 0
[certinfo] => Array
(
)
[primary_ip] => XXX.XXX.XXX.XX
[primary_port] => 443
[local_ip] => 192.XXX.XXX.XXXX
[local_port] => 52227
[redirect_url] =>
)
The answer around the key is correct for general public access. However, the URL you are using is not correct. You want the activities list API I suspect: https://developers.google.com/+/api/latest/activities/list
GET https://www.googleapis.com/plus/v1/people/{userId}/activities/public?key={YOUR_KEY}

PHP_Incomplete_Class Object / Different responses from print_r

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