** Hot News **
Make Online Payments via Appeon
Appeon Adds PAYPAL Support!
Many Appeon customers have requested the ability to make online payments on their mobile devices. Appeon Corporation has responded by adding an API to their Appeon Mobile 2015 product which enables developers interact with the PayPal system. This feature takes advantage of the already numerous iOS, SDK, APIs, and Android SDK APIs to access the native features of the target mobile device.
At the current stage, Appeon supports PayPal system only. Below is the sample code for making an online payment via PayPal ....
------------------------------------ PayPal code snippet ------------------------------------
eon_mobile_paymentex lnv_payment
eon_mobile_str_paymentinit lstr_paymentinit
eon_mobile_str_paymentsubmit lstr_paymentsubmit
integer li_re
lnv_payment = create eon_mobile_paymentex
//bind oe_paymentok, oe_paymentcancel, oe_paymentfailed, and oe_error events of lnv_payment with
//ue_paymentok, ue_paymentcancel, ue_paymentfailed, and ue_error events of the parent window.
lnv_payment.of_register ( parent, "ue_paymentok", "ue_paymentcancel", "ue_paymentfailed", "ue_error")
//initialize platform
lnv_payment.of_setappplatform(1)
//initialize payment
lstr_paymentinit.s_clientid = "AXMNlBBgmfChHPgrMAtrrdTtkWk52THb9Hl54uZ6vASDWSOll8"
li_re = lnv_payment.of_init (lstr_paymentinit)
if li_re = 1 then
//submit payment
lstr_paymentsubmit.dbl_countmoney = 9.99
lstr_paymentsubmit.s_currency = "USD"
lstr_paymentsubmit.s_productname = "shoes"
li_re = lnv_payment.of_submit (lstr_paymentsubmit)
if li_re = 1 then
MessageBox ("","Payment is successful!")
else
MessageBox ("","Payment failed!")
end if
else
MessageBox("","Failed to initialize payment!")
end if
destroy lnv_payment
-------------------------------------------------------------------------------------------------------------
For more information on this and other great Appeon features, check out the Appeon for PowerBuilder product (click here). Also, don't forget to join the Appeon discussion group on LinkedIn for more tips & techniques .... Discussion.
Regards ... Chris
No comments:
Post a Comment