payment plugin

  • konstantina
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 9 months ago - 5 years 9 months ago #89500 by konstantina
payment plugin was created by konstantina
This is my first try on making a plugin. It is a redirect method for payments.
The parts of code that i use are here
github.com/VivaPayments/API/tree/master/CreateOrder/PHP

The only place that createorder part is working is at processPayment so i put it there. My main problem is to find a way to pass the total amount from cart to vivapayment, i guess this has to be done using only the session and not db for example.
Last edit: 5 years 9 months ago by konstantina.

Please Log in or Create an account to join the conversation.

  • Giang Dinh Truong
  • Giang Dinh Truong's Avatar
  • Offline
  • Administrator
  • Administrator
More
5 years 9 months ago #89512 by Giang Dinh Truong
Replied by Giang Dinh Truong on topic payment plugin
Hello Konstantina,

The total amount of cart is stored in the variable $data, you can assign value of this variable as total amount when submitting to vivapayment server.

Hope that this is useful.
Sincerely, Giang
The following user(s) said Thank You: konstantina

Please Log in or Create an account to join the conversation.

  • konstantina
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 9 months ago #89552 by konstantina
Replied by konstantina on topic payment plugin
yes!!! Thanks a lot that was really helpful.

Please Log in or Create an account to join the conversation.

  • Giang Dinh Truong
  • Giang Dinh Truong's Avatar
  • Offline
  • Administrator
  • Administrator
More
5 years 9 months ago #89594 by Giang Dinh Truong
Replied by Giang Dinh Truong on topic payment plugin
No problem at all!

Have a nice day!
Sincerely, Giang

Please Log in or Create an account to join the conversation.

  • konstantina
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 9 months ago - 5 years 9 months ago #89669 by konstantina
Replied by konstantina on topic payment plugin
Ehm i want to ask something last. It is about the transaction.
I use this code github.com/VivaPayments/API/commit/089ac...138d13268564cd660351 into verifypayment() to verify transaction and get the transaction id. But it seems that verifypayment is never executed. Since the payment is completed(or not) in payment environment you return back to my eshop and done!
Where i write that code to get that transaction id so i can post it in completed order screen?
Last edit: 5 years 9 months ago by konstantina.

Please Log in or Create an account to join the conversation.

  • Giang Dinh Truong
  • Giang Dinh Truong's Avatar
  • Offline
  • Administrator
  • Administrator
More
5 years 9 months ago #89721 by Giang Dinh Truong
Replied by Giang Dinh Truong on topic payment plugin
Hello Konstantina,

You must set the verify payment URL so it can be call back from the ViVaPayment gateway like this: youdomain.com/index.php?option=com_eshop..._payment_plugin_name

Hope that this is useful.
Sincerely, Giang

Please Log in or Create an account to join the conversation.

  • konstantina
  • Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 9 months ago - 5 years 9 months ago #89888 by konstantina
Replied by konstantina on topic payment plugin
Do you mean like this into the processPayment()?

$this->setData('verify_payment_url', $siteUrl . 'index.php?option=com_eshop&task=checkout.verifyPayment&payment_method=os_viva');
Last edit: 5 years 9 months ago by konstantina.

Please Log in or Create an account to join the conversation.

  • Giang Dinh Truong
  • Giang Dinh Truong's Avatar
  • Offline
  • Administrator
  • Administrator
More
5 years 9 months ago #89910 by Giang Dinh Truong
Replied by Giang Dinh Truong on topic payment plugin
Yes, it is like that.
Sincerely, Giang

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #106390 by Geo
Replied by Geo on topic payment plugin
Hi konstantina!

Have you finally managed to complete the plug-in?

Please Log in or Create an account to join the conversation.

  • Giang Dinh Truong
  • Giang Dinh Truong's Avatar
  • Offline
  • Administrator
  • Administrator
More
4 years 8 months ago #106524 by Giang Dinh Truong
Replied by Giang Dinh Truong on topic payment plugin
Hope that Konstantina will get back soon!

Please Log in or Create an account to join the conversation.

Moderators: Giang Dinh Truong