- removed milestone
- changed version to 1.1
WordPress Shortcodes
Add shortcodes so that people can easily display IPN transactions in their own pages or posts. Here's a thread where a guy is asking about this feature and provides a sample of what he's wanting.
I'm thinking we could have a shortcode that outputs a list of the IPN transactions, and maybe accepts a parameter for how many of the most recent IPN's you'd like to include in the output.
Also another shortcode to output IPN data for a given transaction ID.
Comments (11)
-
reporter -
reporter -
assigned issue to
-
assigned issue to
-
Today I have started work on this ticket, below are shortcode example to used for display PayPal IPN listening.
[paypal_ipn_list txn_type="" payment_status="" limit="" field1="txn_id" filed2="invoice" filed3="payment_date" field4="first_name" field5="last_name" field6="mc_gross" field7="txn_type" filed8="payment_status"]
let me know your suggestion for the same.
-
reporter I guess this shortcode would be used to display multiple IPN records at once..?? And then setting the different fields would make it only return those fields which I include..??
That would be good, yes, but then I think we should also add another shortcode where they can display individual transaction data if they want to. For example, I might pass in a transaction ID and I just want that one transaction to be returned in a nicely formatted display table. Or, I could also specify the transaction ID and the exact field I want to pull, so if I wnat to only display the "first name" of a particular transaction I could do that.
Does that make sense?
-
done with shortcode, ref
#34→ <<cset 95f44227d28f>>
-
Yes it make sense.
below are shortcodes:
Shortcode for PayPal IPN listing
[paypal_ipn_list field1="txn_id" field2="invoice" field3="payment_date" field4="first_name" field5="last_name" field6="mc_gross" field7="txn_type" field8="payment_status"]
limit="" [here user can add any digit, otherwise by default 10 transaction will display]
txn_type="" [add any transaction type e.g: 'cart' or 'subscr_payment' otherwise we consider as all txn_type data ]
payment_status="" [add any payment_status e.g: 'Completed' or 'Pending' otherwise we consider as all payment_status data]
Also add field1="any ipn response field name" field2="any ipn response field name" ....
Shortcode for single transaction
[paypal_ipn_transaction txn_id="05G68101PJ022154L" field1="txn_id" filed2="invoice" filed3="payment_date" field4="first_name" field5="last_name" field6="mc_gross" field7="txn_type" filed8="payment_status"]
txn_id="" [here user will add transaction id] same as field1, field2....
-
I am done with this issue and push to development branch. please review it and let me know any suggestion on this issue.
-
reporter I like the paypal_ipn_list shortcode a lot. The individual transaction data isn't what I was wanting, though.
What I was thinking of was a way to grab individual field values at a time so that people could display it any way they want on a page. For example, if they wanted to create a page that said "Hi, {first_name} {last_name}" using the IPN data. So the shortcode itself in this case would output nothing but the value of that 1 field.
So using that example, it might look like this...
Hi, [paypal_ipn_data txn_id="7EY918813N481574L" field="first_name"] [paypal_ipn_data txn_id="7EY918813N481574L" field="last_name"]
That way people could build pages to look however they want and they could pick and choose individual field values to display within their own page design.
-
changes on single transaction, ref
#34→ <<cset 4c0af8069f1d>>
-
reporter - changed status to closed
This is now working as I expected.
-
reporter - removed version
- Log in to comment