News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Issues with new PayPal Checkout plugin

Started by razor7, December 07, 2023, 15:19:22 PM

Previous topic - Next topic

razor7

Hi!

Just finished new PayPal checkout plugin onboarding, accessed my paypal account through the onboarding popup and allowed iStraxx UG (haftungsbeschränkt) connection (or something like that), then after saving no fields where populated and the following issue displayed in the plugin edit view.

Currently I'm using php 8.0.12 and J 4.4.1

You can find attached the paypal edit screen, blurred data was data introduced by me.

PS: After the onboarding popup finished, I didn't see any config options or so, just a link to access my PP account, which I did, then in the PP account I was able to obtain my api credentials.

0 vmTrace There was an error get/post https://api-m.paypal.com/v1/customer/partners/WBA3Y7FQXGVW4/merchant-integrations/ Code: 400 sent headers: Var0:

Joomla\Registry\Registry Object
(
    [data:protected] => stdClass Object
        (
            [transport] => stdClass Object
                (
                    [curl] => Array
                        (
                            [64] =>
                            [81] =>
                            [10004] =>
                            [10006] =>
                        )

                )

            [headers] => Array
                (
                    [Content-Type] => application/json
                    [Authorization] => Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXry72OWdxSby_VPNXXXXXXXXXXXBDeIh-fw63hBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx-XXXXX
                    [PayPal-Partner-Attribution-Id] => VirtueMart_Cart_PPCP
                    [userAgent] => VirtueMart.10925
                )

            [userAgent] => Mozilla/5.0 Joomla!/4.4.1 Joomla
        )

    [initialized:protected] =>
    [separator:protected] => .
)

Array
(
    [0] => __construct
    [1] => __clone
    [2] => __toString
    [3] => count
    [4] => jsonSerialize
    [5] => def
    [6] => exists
    [7] => get
    [8] => getIterator
    [9] => loadArray
    [10] => loadObject
    [11] => loadFile
    [12] => loadString
    [13] => merge
    [14] => extract
    [15] => offsetExists
    [16] => offsetGet
    [17] => offsetSet
    [18] => offsetUnset
    [19] => set
    [20] => append
    [21] => remove
    [22] => toArray
    [23] => toObject
    [24] => toString
    [25] => flatten
    [26] => __get
    [27] => __set
)

recieved: Var0:

Joomla\CMS\Http\Response Object
(
    [phrases:Laminas\Diactoros\Response:private] => Array
        (
            [100] => Continue
            [101] => Switching Protocols
            [102] => Processing
            [103] => Early Hints
            [200] => OK
            [201] => Created
            [202] => Accepted
            [203] => Non-Authoritative Information
            [204] => No Content
            [205] => Reset Content
            [206] => Partial Content
            [207] => Multi-Status
            [208] => Already Reported
            [226] => IM Used
            [300] => Multiple Choices
            [301] => Moved Permanently
            [302] => Found
            [303] => See Other
            [304] => Not Modified
            [305] => Use Proxy
            [306] => Switch Proxy
            [307] => Temporary Redirect
            [308] => Permanent Redirect
            [400] => Bad Request
            [401] => Unauthorized
            [402] => Payment Required
            [403] => Forbidden
            [404] => Not Found
            [405] => Method Not Allowed
            [406] => Not Acceptable
            [407] => Proxy Authentication Required
            [408] => Request Timeout
            [409] => Conflict
            [410] => Gone
            [411] => Length Required
            [412] => Precondition Failed
            [413] => Payload Too Large
            [414] => URI Too Long
            [415] => Unsupported Media Type
            [416] => Range Not Satisfiable
            [417] => Expectation Failed
            [418] => I'm a teapot
            [421] => Misdirected Request
            [422] => Unprocessable Entity
            [423] => Locked
            [424] => Failed Dependency
            [425] => Too Early
            [426] => Upgrade Required
            [428] => Precondition Required
            [429] => Too Many Requests
            [431] => Request Header Fields Too Large
            [444] => Connection Closed Without Response
            [451] => Unavailable For Legal Reasons
            [499] => Client Closed Request
            [500] => Internal Server Error
            [501] => Not Implemented
            [502] => Bad Gateway
            [503] => Service Unavailable
            [504] => Gateway Timeout
            [505] => HTTP Version Not Supported
            [506] => Variant Also Negotiates
            [507] => Insufficient Storage
            [508] => Loop Detected
            [510] => Not Extended
            [511] => Network Authentication Required
            [599] => Network Connect Timeout Error
        )

    [reasonPhrase:Laminas\Diactoros\Response:private] => Bad Request
    [statusCode:Laminas\Diactoros\Response:private] => 400
    [headers:protected] => Array
        (
            [Connection] => Array
                (
                    [0] => keep-alive
                )

            [Content-Length] => Array
                (
                    [0] => 82
                )

            [Cache-Control] => Array
                (
                    [0] => max-age=0, no-cache, no-store, must-revalidate
                )

            [Content-Type] => Array
                (
                    [0] => application/json
                )

            [Paypal-Debug-Id] => Array
                (
                    [0] => ea55343aad89d
                )

            [Set-Cookie] => Array
                (
                    [0] => l7_az=ccg01.phx; Path=/; Domain=paypal.com; Expires=Thu, 07 Dec 2023 14:34:03 GMT; HttpOnly; Secure
                )

            [Traceparent] => Array
                (
                    [0] => 00-0000000000000000000ea55343aad89d-112857789ceb04b3-01
                )

            [Accept-Ranges] => Array
                (
                    [0] => bytes
                )

            [Via] => Array
                (
                    [0] => 1.1 varnish, 1.1 varnish
                )

            [Edge-Control] => Array
                (
                    [0] => max-age=0
                )

            [Date] => Array
                (
                    [0] => Thu, 07 Dec 2023 14:04:03 GMT
                )

            [Strict-Transport-Security] => Array
                (
                    [0] => max-age=63072000; includeSubDomains; preload
                )

            [X-Served-By] => Array
                (
                    [0] => cache-gru-sbgr1930037-GRU, cache-eze2230062-EZE
                )

            [X-Cache] => Array
                (
                    [0] => MISS, MISS
                )

            [X-Cache-Hits] => Array
                (
                    [0] => 0, 0
                )

            [X-Timer] => Array
                (
                    [0] => S1701957843.385340,VS0,VE311
                )

            [Vary] => Array
                (
                    [0] => Accept-Encoding
                )

        )

    [headerNames:protected] => Array
        (
            [connection] => Connection
            [content-length] => Content-Length
            [cache-control] => Cache-Control
            [content-type] => Content-Type
            [paypal-debug-id] => Paypal-Debug-Id
            [set-cookie] => Set-Cookie
            [traceparent] => Traceparent
            [accept-ranges] => Accept-Ranges
            [via] => Via
            [edge-control] => Edge-Control
            [date] => Date
            [strict-transport-security] => Strict-Transport-Security
            [x-served-by] => X-Served-By
            [x-cache] => X-Cache
            [x-cache-hits] => X-Cache-Hits
            [x-timer] => X-Timer
            [vary] => Vary
        )

    [protocol:Laminas\Diactoros\Response:private] => 1.1
    [stream:Laminas\Diactoros\Response:private] => Laminas\Diactoros\Stream Object
        (
            [resource:protected] => Resource id #139
            [stream:protected] => php://memory
        )

    [body] => stdClass Object
        (
            [name] => VALIDATION_ERROR
            [message] => Invalid request
            [debug_id] => ea55343aad89d
        )

)

Array
(
    [0] => __get
    [1] => __construct
    [2] => getStatusCode
    [3] => getReasonPhrase
    [4] => withStatus
    [5] => getProtocolVersion
    [6] => withProtocolVersion
    [7] => getHeaders
    [8] => hasHeader
    [9] => getHeader
    [10] => getHeaderLine
    [11] => withHeader
    [12] => withAddedHeader
    [13] => withoutHeader
    [14] => getBody
    [15] => withBody
)

#0  vmTrace() called at [/home/c2041823/public_html/plugins/vmpayment/paypal_checkout/helpers/ppc_token.php:157]
#1  PayPalToken::sendCURL() called at [/home/c2041823/public_html/plugins/vmpayment/paypal_checkout/helpers/ppc_onboarding.php:123]
#2  PayPalOnboarding::checkMerchant() called at [/home/c2041823/public_html/plugins/vmpayment/paypal_checkout/paypal_checkout.php:1267]
#3  plgVmPaymentPaypal_checkout->OnStoreInstallPluginTable() called at [/home/c2041823/public_html/administrator/components/com_virtuemart/helpers/vdispatcher.php:75]
#4  vDispatcher::directTrigger() called at [/home/c2041823/public_html/administrator/components/com_virtuemart/models/paymentmethod.php:248]
#5  VirtueMartModelPaymentmethod->store() called at [/home/c2041823/public_html/administrator/components/com_virtuemart/helpers/vmcontroller.php:178]
#6  VmController->save() called at [/home/c2041823/public_html/administrator/components/com_virtuemart/controllers/paymentmethod.php:52]
#7  VirtuemartControllerPaymentmethod->save() called at [/home/c2041823/public_html/libraries/src/MVC/Controller/BaseController.php:693]
#8  Joomla\CMS\MVC\Controller\BaseController->execute() called at [/home/c2041823/public_html/administrator/components/com_virtuemart/virtuemart.php:77]
#9  require_once(/home/c2041823/public_html/administrator/components/com_virtuemart/virtuemart.php) called at [/home/c2041823/public_html/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71]

1 vmdebug setIdByRequest Var0:

virtuemart_user_id

2 vmdebug Model VirtueMartModelUser no id in request virtuemart_user_id
3 vmdebug Get user, setIdByRequest 0
4 vmdebug Get user id 0
5 vmdebug my $methods Var0:

1

6 vmdebug PayPal sendCURL my URL https://api-m.paypal.com/v1/notifications/webhooks Var0:

7 vmdebug PayPal sendCURL my result by getHttp Var0:

stdClass Object
(
    [webhooks] => Array
        (
            [0] => stdClass Object
                (
                    [id] => 3J982441WA250204E
                    [url] => https://XXXXXXXXXXXXXXXXXXXXXXXXX.com/index.php?option=com_virtuemart&view=plugin&vmtype=vmpayment&name=paypal_checkout&task=webhook
                    [event_types] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [name] => CHECKOUT.ORDER.APPROVED
                                    [description] => An order has been approved by buyer.
                                    [status] => ENABLED
                                )

                            [1] => stdClass Object
                                (
                                    [name] => CHECKOUT.ORDER.COMPLETED
                                    [description] => Webhook event emitted after all the purchase_units have been processed
                                    [status] => ENABLED
                                )

                            [2] => stdClass Object
                                (
                                    [name] => CHECKOUT.PAYMENT-APPROVAL.REVERSED
                                    [description] => Payment approval has been reversed.
                                    [status] => ENABLED
                                )

                            [3] => stdClass Object
                                (
                                    [name] => MERCHANT.PARTNER-CONSENT.REVOKED
                                    [description] => The consents for a merchant account setup are revoked or an account is closed.
                                    [status] => ENABLED
                                )

                            [4] => stdClass Object
                                (
                                    [name] => PAYMENT.AUTHORIZATION.CREATED
                                    [description] => A payment authorization is created, approved, executed, or a future payment authorization is created.
                                    [status] => ENABLED
                                )

                            [5] => stdClass Object
                                (
                                    [name] => PAYMENT.AUTHORIZATION.VOIDED
                                    [description] => A payment authorization is voided.
                                    [status] => ENABLED
                                )

                            [6] => stdClass Object
                                (
                                    [name] => PAYMENT.CAPTURE.COMPLETED
                                    [description] => A payment capture completes.
                                    [status] => ENABLED
                                )

                            [7] => stdClass Object
                                (
                                    [name] => PAYMENT.CAPTURE.DENIED
                                    [description] => A payment capture is denied.
                                    [status] => ENABLED
                                )

                            [8] => stdClass Object
                                (
                                    [name] => PAYMENT.CAPTURE.PENDING
                                    [description] => The state of a payment capture changes to pending.
                                    [status] => ENABLED
                                )

                            [9] => stdClass Object
                                (
                                    [name] => PAYMENT.CAPTURE.REFUNDED
                                    [description] => A merchant refunds a payment capture.
                                    [status] => ENABLED
                                )

                            [10] => stdClass Object
                                (
                                    [name] => PAYMENT.CAPTURE.REVERSED
                                    [description] => PayPal reverses a payment capture.
                                    [status] => ENABLED
                                )

                        )

                    [links] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [href] => https://api.paypal.com/v1/notifications/webhooks/3J982441WA250204E
                                    [rel] => self
                                    [method] => GET
                                )

                            [1] => stdClass Object
                                (
                                    [href] => https://api.paypal.com/v1/notifications/webhooks/3J982441WA250204E
                                    [rel] => update
                                    [method] => PATCH
                                )

                            [2] => stdClass Object
                                (
                                    [href] => https://api.paypal.com/v1/notifications/webhooks/3J982441WA250204E
                                    [rel] => delete
                                    [method] => DELETE
                                )

                        )

                )

        )

)

9 vmdebug vmInfo: All Webhooks set
10 vmdebug my $SQLfields Var0:

Array
(
    [id] => int(11) UNSIGNED NOT NULL AUTO_INCREMENT
    [virtuemart_order_id] => int(1) UNSIGNED
    [order_number] => char(64)
    [virtuemart_paymentmethod_id] => mediumint(1) UNSIGNED
    [payment_name] => varchar(600)
    [payment_order_total] => decimal(15,5) NOT NULL
    [payment_currency] => smallint(1)
    [ppOrderId] => varchar(100)
    [capture_id] => varchar(100)
    [authorize_id] => varchar(100)
    [cost_per_transaction] => decimal(10,2)
    [cost_percent_total] => decimal(10,2)
    [body] => varchar(10000)
)

11 vmdebug my update Var0:

Array
(
    [#__virtuemart_payment_plg_paypal_checkout] => Array
        (
            [0] => Array
                (
                    [id] => int(11) UNSIGNED NOT NULL AUTO_INCREMENT
                    [virtuemart_order_id] => int(1) UNSIGNED
                    [order_number] => char(64)
                    [virtuemart_paymentmethod_id] => mediumint(1) UNSIGNED
                    [payment_name] => varchar(600)
                    [payment_order_total] => decimal(15,5) NOT NULL
                    [payment_currency] => smallint(1)
                    [ppOrderId] => varchar(100)
                    [capture_id] => varchar(100)
                    [authorize_id] => varchar(100)
                    [cost_per_transaction] => decimal(10,2)
                    [cost_percent_total] => decimal(10,2)
                    [body] => varchar(10000)
                    [created_on] => datetime
                    [created_by] => int(11) NOT NULL DEFAULT '0'
                    [modified_on] => datetime
                    [modified_by] => int(11) NOT NULL DEFAULT '0'
                    [locked_on] => datetime
                    [locked_by] => int(11) NOT NULL DEFAULT '0'
                )

            [1] => Array
                (
                    [id] => PRIMARY KEY (`id`)
                    [virtuemart_order_id] => KEY (`virtuemart_order_id`)
                )

            [2] => Array
                (
                )

        )

)

12 vmdebug My Memory Limit in MB 507
14 vmdebug vmInfo: alterTable DROP INDEX d49zm0h7_virtuemart_payment_plg_paypal_checkout.virtuemart_order_id
16 vmdebug vmInfo: alterKey ADD INDEX virtuemart_order_id
18 vmdebug vmInfo: Método de pago successfully saved
19 vmdebug vmTime: "VirtueMartControllerPaymentmethod" Finished task apply: 2.43842697143555
20 vmdebug End used Ram 8M
21 vmdebug Peak memory peak 8M
MGS Creativa - VirtueMart Payment Plugin Experts
http://www.mgscreativa.com

Take a look at our downloads section for VirtueMart payment plugins and mouch more!
http://www.mgscreativa.com/en/online-store



Gingerweb

same here - 100% only happens in VirtueMart 4.2.4 10922 - rolled back and all working fine

rdcustom

this forum seems to be dead... no answers, no support...

MAD King

I have the same problem on a new installation.
Seems that VM is dying. No support anymore the all the problems and bugs.
No update for months.

VirtueMart 4.2.4 10922
Joomla 4.2.2
Joomla! 4.4.5
VirtueMart 4.2.12 11012

Milbo

I dont get you guys. Why do you say that VirtueMart dies? If you want that it dies, tell the world that it dies. But it is a lie.

I told you often. I cannot answer in the forum and do the development. Makes sense, eh? and it makes also not fun to answer grumpy people, who just see their part and expet the worst from the other. that is not cooperative, guys. What you do is badmouthing and you should know better.

Here read the news and you should notice, that we worked really hard the last months. It makes no sense to release a buggy version. So the release was meant for christmas, but we still found small errors here and there.

and you can see, that a lot development was done for Paypal, weeks,... and the error above should be solved by this
- PayPal Checkout, replaced all cUrl against VmConnector::getHttp

https://virtuemart.net/news/virtuemart-for-joomla-5
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Gingerweb

Quote from: Milbo on February 06, 2024, 19:37:49 PM

and you can see, that a lot development was done for Paypal, weeks,... and the error above should be solved by this
- PayPal Checkout, replaced all cUrl against VmConnector::getHttp

Thanks! Is this Paypal issue fixed in VM 4.2.6 Milbo?

Milbo

Should be fixed, if not,  let me take a look whats going wrong in your case.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Gingerweb

Quote from: Milbo on February 08, 2024, 17:23:30 PM
Should be fixed, if not,  let me take a look whats going wrong in your case.

yes confirmed it is fixed in my installation once i update the VM to 4.2.6 10972
many thanks

Milbo

Great,

so it works now for you. Did you notice the new features/fixes?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Gingerweb

Quote from: Milbo on February 10, 2024, 23:15:27 PM
so it works now for you. Did you notice the new features/fixes?

For the Paypal plugin? It is different, seems you now login to PP and go through payment then come back to the shop to "confirm purchase" - different definitely but seems to work!
Thanks for all you do for VM, great job!

geraldb

#12
Joomla: 4.4.2 VM: 4.2.6 10126
Hello dear forum team

During the payment process you get the following error message. See appendix. I think it has to do with the update to the current version.

After clicking on PayPal Checkout, a popup with a white background appears. When you close it, the normal PayPal dialog appears.



Does anything need to be changed in the settings after the update?

audiorock

Quote from: geraldb on February 19, 2024, 10:06:26 AMJoomla: 4.4.2 VM: 4.2.6 10126
Hello dear forum team

During the payment process you get the following error message. See appendix. I think it has to do with the update to the current version.

After clicking on PayPal Checkout, a popup with a white background appears. When you close it, the normal PayPal dialog appears.



Does anything need to be changed in the settings after the update?


Hi, I have same problem in my site.

There is the solution?

Milbo

I am still fighting that it does not work sometimes. One customer has the problem, it works on his development server, but not on the live server. I write a pn to you, then you can contact me via skype and maybe we can find the culprit.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/