Paypay Plugin recurring problem

91 views
Skip to first unread message

ramez....@gmail.com

unread,
Aug 3, 2017, 6:11:20 AM8/3/17
to Kill Bill users mailing-list
Hello,

I have a problem with killbill-paypal-express which is:

Problem :
the first day payment returns : success
the second day payment returns : PLUGIN_FAILURE with message (This Express Checkout session has expired. Token value is no longer valid.)

from the sandbox account i can see that the token still valid and active
below find steps to add payment method.

please help.


1. all setup is ok and valid
2. i had uploaded th plug-in config from paypal sandbox account
3. i'm using "Recurring payments via a billing agreement ID (BAID)"
a. first : SetExpressCheckout
curl -v \
-X POST \
-u admin:password \
-H 'X-Killbill-ApiKey: bob' \
-H 'X-Killbill-ApiSecret: lazar' \
-H 'X-Killbill-CreatedBy: admin' \
-H 'Content-Type: application/json' \
-d '{
"kb_account_id": "13d26090-b8d7-11e2-9e96-0800200c9a66",
"currency": "USD",
"options": {
"return_url": "http://www.google.com/?q=SUCCESS",
"cancel_return_url": "http://www.google.com/?q=FAILURE",
"billing_agreement": {
"description": "Your subscription"
}
}
}' \
http://127.0.0.1:8080/plugins/killbill-paypal-express/1.0/setup-checkout

b. second : get redirection url
redirect user to paypal on callback url success i capture the Token

c. third : add a payment method with the token value
curl -v \
-X POST \
-u admin:password \
-H 'X-Killbill-ApiKey: bob' \
-H 'X-Killbill-ApiSecret: lazar' \
-H 'X-Killbill-CreatedBy: admin' \
-H 'Content-Type: application/json' \
-d '{
"pluginName": "killbill-paypal-express",
"pluginInfo": {
"properties": [{
"key": "token",
"value": "20G53990M6953444J"
}]
}
}' \
"http://127.0.0.1:8080/1.0/kb/accounts/13d26090-b8d7-11e2-9e96-0800200c9a66/paymentMethods?isDefault=true"

ramez....@gmail.com

unread,
Aug 5, 2017, 8:40:38 AM8/5/17
to Kill Bill users mailing-list
Are there any action or thing I'm missing.

Even after trying rwmove the plugin and re install it and follow the instructions of (Recurring payments via a billing agreement ID (BAID))

Stull facing the tokeb expiry issue


Kilbill: v 0.18.9
Paypal express: v 5.0.5

I

ramez....@gmail.com

unread,
Aug 7, 2017, 3:40:01 AM8/7/17
to Kill Bill users mailing-list, ramez....@gmail.com
I found this link in paypal :
https://developer.paypal.com/docs/classic/api/errors/

SHORT This Express Checkout session has expired.
LONG This Express Checkout session has expired. Token value is no longer valid.
Note:
To inform the customer that the Express Checkout transaction has expired and must be restarted, display an error message and provide a button that enables the customer to restart the Express Checkout flow and redirect him or her back to PayPal to approve the use of PayPal again.

Because you are restarting the entire checkout process, do not reuse the expired token value in the SetExpressCheckout request. However, because you already know the final OrderTotal, be sure to update the value for that element, if appropriate. You might also want to update the values for ReturnURL and CancelURL, if necessary.


will it solve the error problem

Pierre-Alexandre Meyer

unread,
Aug 8, 2017, 6:35:57 AM8/8/17
to Ramez Hanna, Kill Bill users mailing-list
Did you verify in the sandbox that a BAID was indeed created instead of a one-off token (https://developer.paypal.com/docs/classic/express-checkout/ec_set_up_reference_transactions/)?

If the token is still marked as active in the sandbox, and you get this error, it could mean that the payment method isn't configured correctly in Kill Bill: the wrong token might be used for subsequent payments.

Did you check the Kill Bill logs to make sure the right token is indeed sent during the payment? If it is, I would suggest to reach out to PayPal support so they can investigate if your sandbox is correctly configured (reference transactions must be enabled for instance). Make sure to provide the BAID used for testing.

Hope that helps,


--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/af378a7c-9dd5-4736-b404-9626fe02904f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Pierre

ramez....@gmail.com

unread,
Aug 8, 2017, 8:04:06 AM8/8/17
to Kill Bill users mailing-list, ramez....@gmail.com
Thanks Pierre for the response and here the answer on each point

Did you verify in the sandbox that a BAID was indeed created instead of a one-off token (https://developer.paypal.com/docs/classic/express-checkout/ec_set_up_reference_transactions/)?

- I found the Token and it was maked as active as Follow:
- Billing ID B-5SY29003XU09XXXXX
- Status Active
- Description this is a payment agreement

If the token is still marked as active in the sandbox, and you get this error, it could mean that the payment method isn't configured correctly in Kill Bill: the wrong token might be used for subsequent payments.

- and this is the payment method Config:
- Name: killbill-paypal-express
- ID: 76143655-b0e5-4a98-86ad-XXXXXX
- baid B-5SY29003XU09XXXXX
- payerId: 8QSTL6PXXXXXXX
- paypalExpressToken EC-2JB664312L0XXXXX
- token: B-5SY29003XU09XXXXX


Did you check the Kill Bill logs to make sure the right token is indeed sent during the payment? If it is, I would suggest to reach out to PayPal support so they can investigate if your sandbox is correctly configured (reference transactions must be enabled for instance). Make sure to provide the BAID used for testing.

- where can i get the logs for the payment from killbill?

- i will contact paypal support team to make sure.

Pierre-Alexandre Meyer

unread,
Aug 8, 2017, 10:03:31 AM8/8/17
to Ramez Hanna, Kill Bill users mailing-list
On Tue, Aug 8, 2017 at 1:04 PM, <ramez....@gmail.com> wrote:
- where can i get the logs for the payment from killbill?

It depends on how Kill Bill was installed, but it's typically either under the Tomcat logs/ directory or under /var/log/tomcat7 (Docker images). The main file is usually called killbill.out.

--
Pierre

ramez....@gmail.com

unread,
Aug 9, 2017, 6:04:09 PM8/9/17
to Kill Bill users mailing-list
Thanks Pierre enabling reference transactions on paypal solved the problem many thanks for your help
Reply all
Reply to author
Forward
0 new messages